Page 1 of 2
Email Problem
Posted: Sun Jun 30, 2013 1:35 pm
by SteveOrd
Hi,
I'm a newbie to NAGIOS and have just sucessfully set-up a server, configured it and now added most of our hosts in.
All is working fine except for a small problem with email notifictaion. Although it basically seems to be working our email administrator has complained that our email server is being flooded with dead emails. From looking at the logs it seems NAGIOS is sending email alerts to "
[email protected]" as well as, or sometimes instead of "
[email protected]". I have checked every config file I can think of but can see nothing amiss.
Has anyone got any ideas on where to start looking for this erroneous $ email address?
Many thanks.
Steve Ord
Re: Email Problem
Posted: Mon Jul 01, 2013 8:29 am
by SteveOrd
Hi,
I have since found, by comparing the NAGIOS logs with the dead emails received, that the failing messages are being sent by SOFT errors, the HARD errors are woking fine.
Any idea why NAGIOS would be sending alerts for SOFT events?
[01-07-2013 15:35:20] SERVICE EVENT HANDLER: Romsey_Switch_1;PING;WARNING;SOFT;1;notify-host-by-email
Steve
Re: Email Problem
Posted: Mon Jul 01, 2013 2:14 pm
by abrist
SteveOrd wrote:[01-07-2013 15:35:20] SERVICE EVENT HANDLER: Romsey_Switch_1;PING;WARNING;SOFT;1;notify-host-by-email
Looks like this notify command is getting fired off by an event handler. Any chance that you have this service check set to "is volatile?
Re: Email Problem
Posted: Mon Jul 01, 2013 3:13 pm
by SteveOrd
Hi,
No, is volatile was not specified so I added is_volatile 0 to the ping check command. No difference.
Steve
Re: Email Problem
Posted: Mon Jul 01, 2013 4:12 pm
by abrist
Any reason why the notification command is set as an event handler instead of a notification handler?
Re: Email Problem
Posted: Mon Jul 01, 2013 4:25 pm
by SteveOrd
Hi,
Sorry, being a newbie can you tell me where I check and/or change that?
Steve
Re: Email Problem
Posted: Mon Jul 01, 2013 4:30 pm
by abrist
Post the service definition for the check. Usually, people configure it in the services.cfg or in the host's config.
Re: Email Problem
Posted: Tue Jul 02, 2013 3:16 am
by SteveOrd
Hi,
Ah, is it becuase notify-host=by-email is defined in the config below?
define service {
#NAGIOSQL_CONFIG_NAME services
host_name lots of hosts (deleted)
service_description PING
use standard-service
check_command check_ping!200,10%!400,25%
is_volatile 0
max_check_attempts 4
check_period 24x7
event_handler notify-host-by-email
register 1
Thanks
Steve
Re: Email Problem
Posted: Tue Jul 02, 2013 4:34 am
by SteveOrd
Hi,
Have deleted that event handler entry and all now seems OK, I think that must have crept in when I was troubleshooting an initial problem with emails not being sent at all.
Thanks for your help.
Steve
Re: Email Problem
Posted: Tue Jul 02, 2013 12:42 pm
by slansing
Ah! There you go, are your emails being sent out properly?