Email Problem

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
SteveOrd
Posts: 7
Joined: Sun Jun 30, 2013 1:26 pm

Email Problem

Post 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 "$@ouremail.com" as well as, or sometimes instead of "ITDept@ouremail.com". 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
SteveOrd
Posts: 7
Joined: Sun Jun 30, 2013 1:26 pm

Re: Email Problem

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Email Problem

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
SteveOrd
Posts: 7
Joined: Sun Jun 30, 2013 1:26 pm

Re: Email Problem

Post by SteveOrd »

Hi,

No, is volatile was not specified so I added is_volatile 0 to the ping check command. No difference.

Steve
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Email Problem

Post by abrist »

Any reason why the notification command is set as an event handler instead of a notification handler?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
SteveOrd
Posts: 7
Joined: Sun Jun 30, 2013 1:26 pm

Re: Email Problem

Post by SteveOrd »

Hi,

Sorry, being a newbie can you tell me where I check and/or change that?

Steve
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Email Problem

Post by abrist »

Post the service definition for the check. Usually, people configure it in the services.cfg or in the host's config.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
SteveOrd
Posts: 7
Joined: Sun Jun 30, 2013 1:26 pm

Re: Email Problem

Post 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
SteveOrd
Posts: 7
Joined: Sun Jun 30, 2013 1:26 pm

Re: Email Problem

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Email Problem

Post by slansing »

Ah! There you go, are your emails being sent out properly?
Locked