Page 8 of 9
Re: Random emails
Posted: Wed Sep 24, 2014 12:14 pm
by Box293
I got your PM of the contacts file, this looks fine now.
I would look at removing the retention.dat file.
service nagios stop
rm /usr/local/nagios/var/retention.dat
service nagios start
Re: Random emails
Posted: Wed Sep 24, 2014 1:01 pm
by JohnFLi
I stopped the Nagios service.
deleted retention.dat
started the Nagios service
Restart the host G1VTENF01
the emails continue
Code: Select all
Delivery has failed to these recipients or groups:
[email protected]
The e-mail address you entered couldn't be found. Please check the recipient's e-mail address and try to resend the message. If the problem continues, please contact your helpdesk.
Diagnostic information for administrators:
Generating server: G1VPEXC01.firemountain.local
[email protected]
#550 5.1.1 RESOLVER.ADR.RecipNotFound; not found ##rfc822;$
Original message headers:
Received: from g1vpnag01.firemountain.local (10.100.1.227) by
G1VPEXC01.firemountain.local (10.100.1.106) with Microsoft SMTP Server id
14.2.347.0; Wed, 24 Sep 2014 10:58:14 -0700
Its just odd that emails get sent to $ on service state changes.
Re: Random emails
Posted: Wed Sep 24, 2014 1:03 pm
by Box293
Yes it is odd indeed.
I'll have a bit more of a look on the copy of your VM we have here and see if I can find anything.
Re: Random emails
Posted: Wed Sep 24, 2014 1:17 pm
by JohnFLi
maybe set a machine for it to actualy check, then restart it. thats how I can make it happend
g1vtenf01 is what I've used today to check it.
Re: Random emails
Posted: Wed Sep 24, 2014 1:33 pm
by Box293
What is the output of these commands?
grep '_notification_commands' /usr/local/nagios/nagiosql/*.cfg
grep '_notification_commands' /usr/local/nagios/var/objects.cache
grep '_notification_commands' /usr/local/nagios/var/objects.precache
If the objects.cache or objects.precache contain double commands (like notify-service-by-email,notify-host-by-email) then stop nagios, delete the files and restart nagios.
Re: Random emails
Posted: Wed Sep 24, 2014 1:41 pm
by JohnFLi
grep '_notification_commands' /usr/local/nagios/nagiosql/*.cfg
Code: Select all
grep '_notification_commands' /usr/local/nagios/nagiosql/*.cfg
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacts.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacts.cfg: service_notification_commands notify-service-by-email
/usr/local/nagios/nagiosql/contacttemplates.cfg: host_notification_commands notify-host-by-email
/usr/local/nagios/nagiosql/contacttemplates.cfg: service_notification_commands notify-service-by-email
grep '_notification_commands' /usr/local/nagios/var/objects.cache
Code: Select all
grep '_notification_commands' /usr/local/nagios/var/objects.cache
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
grep '_notification_commands' /usr/local/nagios/var/objects.precache
Code: Select all
grep '_notification_commands' /usr/local/nagios/var/objects.precache
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
Re: Random emails
Posted: Wed Sep 24, 2014 2:57 pm
by Box293
OK so I know I've said this before BUT I think I've found the source of your problem (fingers crossed).
You have the notify-host-by-email command assigned to the event_handler directive in the WEB-windows-server template. This is then being used by the G1VTENF01 host.
What is happening is that the event handler is being fired off in relation to a host object however it has no contact information so it is generating the $@ and hence these are NDR's.
So you need to check all of your host and service templates AND host and service objects to ensure they are not using the notify-xxx-by-email event handlers.
Update the WEB-windows-server template first, apply config and restart nagios. Then try your G1VTENF01 host test and see if the NDR gets sent.
Only your contact objects should be using the notify-xxx-by-email event handlers.
Re: Random emails
Posted: Wed Sep 24, 2014 4:29 pm
by JohnFLi
Jeepers......
I think you finally found it!!!
I took the notify host out of the template. Restarted the host. no random email
put the notify host back in the template, restarted the host, got a bogus email
removed the notify out of the template again, restarted, no email
it is looking good!!!
Re: Random emails
Posted: Wed Sep 24, 2014 4:49 pm
by Box293
Awesome !!!
It might have taken us a while, but we've both learnt something about Nagios

Re: Random emails
Posted: Wed Sep 24, 2014 4:57 pm
by JohnFLi
true that. Wish I would have gotten a copy of the VM to you sooner.