Nagios v2.0b3 Notification problems

I have just recently installed Nagios v2.0b3, but i can not seem to get notifications to work.

I have created a “fake” host, with an equally fake service to be able to test the notification.
In this host i inherit some options from a template, among these is the “enable_notification 1” which is in both my host and service template.

The main config file has enabled notifications, and when i issue the mail command manually (copy paste from the config files editing the variables) the mail is sent succesfully.

However when nagios should notify me, nothing happens, the mail log shows no mail ever getting sent, and nagios own log file is close to useless for these kind of problems.

Any ideas? I can post parts of the conf files if needed.

disable and reenable the notifications for the host from the nagios console. then try again :slight_smile:
And use a real host to check… if there is no status change you won’t get notified.

Luca

When you say Nagios Console, what do you refer to?
The “external command file”, or some fancy console i have yet to discover?

It took me forever to figure this one out.
Read the docs and you will soon realize just what needs to be changed by using the console/cgis/website/whatever you want to call it.
nagios.sourceforge.net/docs/1_0/ … tion_notes

So, clik on the service that you want to enable notifications for, and then disable/enable notifications.
“Enable notifications for this service”

Well thanks for the replies and all, but after quite a lot of fiddeling around that did not help either.
Nagios reports the warning/error on a service alright (in my case i just did a ping check and set some very small reply times to get it to whine), but when i disable/reenable notifications i does not change anything really (the service still changes status from “OK” to “ERROR or WARNING”). When i take a look at the “View notifications for this service” page, it reports that “No notifications have been recorded for this service in the current log file”…

Im loosing it here, could it be something with my install or perhaps the version that has a bug?

how did you define the service?

what did you set as max_check_attempts?
and retry_check_interval ? the notification options, period and interval?

Luca

Here is for the service:
These settings are inherited from a template:
notification_interval 60
max_check_attempts 3 (should be overwritten by the setting below if i understand things right that is)
notifications_enabled 1

These are directly in the service configuration (not inherited):
max_check_attempts 5
check_period 24x7 (as defined in some of the example configs)
notification_period 24x7
retry_check_interval 1

I think that is all the notification options (not sure that there might be some others related to notifcation aswell)

in your event log page are you getting info about failed checks for ping? should be something like this:

[08-03-2005 09:54:09] SERVICE ALERT: servername;ping;CRITICAL;HARD;3;PING CRITICAL - Packet loss = 60%, RTA = 255.00 ms

With your config you need 5 checks to fail at one minute from one another for a notifcation to be sent.

Luca

now there might be the problem…i get the messages in the log file, but im not so sure about five in a minute…so i would need to change what…the retry_check_interval 1 to something like 10 or so to get it to be within 10 minutes?

the check is executed every minute (if you didn’t change something else in the cofig the standard time is one minute)

retry_check_interval 1 tells nagios to check again after 1 minute.
max_check_attempts 5 asks for 5 retries… (each one minute after the last)

so if the ping once goes below the minimum critical or warning level it resets to ok. and you don’t get notified.

try changiung max_check_attempts to 1.

for testing i used a small local webserver and checked that… diasbling a http server is definetely easier to keep under control than a missing ping packet :slight_smile:

Luca

Thanks i will look into it (hope your still browsing the forums in 20 minutes time :P)

will try to have a look in the afternoon :smiley:
as i’m working on nagios SMS notifications right now i think i will do… :stuck_out_tongue:

damn SMS stuff… but at least if it works we will have some decent holidays… (i hope… :smiley: )

Luca

Okay i have the “max_check_attempt” set to 1 for the service (the template still says other wise, and the “retry_check_interval” is still 1
The ping have failed, but it seems unwilling to make a notification…or to check it again for that matter
Could it be that i should try to setup the service without inheriting anything from a template?

do you have notification_options set to “c,r”?

Luca

The notification_options in the “host” section is set to d,u,r
but i can see i have no notification_options in the service section…

well… try :slight_smile:

Luca

I have set the notification_options to w,c,u,r
And the service has just gone critical (all other settings as described previously) and it still fails to do anything :confused:

beh…im attaching a copy of the configuration.

[file=e107_files/public/6834_cisco13.txt]6834_cisco13.txt[/file]

Any nagios check_plugin will not send a notification if there is nobody defined to get one.
No group defined in the service?
No members in a host group?
No contacts defined?
No contactgroups defined?

Luca - I was looking at doing SMS directly but have ended up getting an SMS forwarding mail account from the mobile provider. It’s a good (if potentially expensive) short term workaround.