Can't stop notifications using notifications_enabled (nagios bug?)

Yanek Korff yanek at mail.com
Thu Nov 11 20:46:57 CET 2004


I want to have notifications globally "enabled," but only receive notifications from very few (5-10) out of the several thousand service checks our Nagios server is running.  I seem to be having trouble in a general sense getting notifications to 
be, by default, disabled.

If I have my service template defined as:
        notification_period             24x7
        notification_interval           0
        notification_options            w,c
        notifications_enabled           0

And individual services are defined with (redundant, I know):
        notification_period             24x7
        notification_interval           0
        notification_options            w,c
        notifications_enabled           0

I get notifications from these services anyway!  And it's real haphazard.  I use a script to write all my nagios configuration files out so they're VERY consistent.  No possibility of typo in just one file or anything.  In a list of 25 services for a 
given host, I'll see this (NOTE: all of these checks are running THROUGH nrpe, unless otherwise specified):
notifications are disabled (good!) for:
check_procs checks for a particular daemon
check_procs checks for all processes (RSZDT) and running processes (R)
check_users, check_vmstat with arguments to check CPU (plugin I wrote)

notifications are NOT disabled (bad, they should be, notifications_enabled is set to 0 just like the others)
check_procs checks for zombie processes (Z)
check_disk, check_load, check_swap, check_vmstat with arguments to check faults and paging,
check_mailq, check_ntp, REMOTE checks via check_tcp, REMOTE dnsmatch (plugin I wrote to validate A <-> PTR),

So strange!  A few of them show up as notifications being disabled, but others don't.  IF I click on a service that says disabled in the service status details for host page, the service state information does say service notifications are disabled.  
If I check the ones that list as enabled in the service status details page, sure enough the sevice notifications say ENABLED in the status details for host page.

BUT.  If I go into View Config and look at whether notifications are enabled for any of these services, they ALL SAY THAT NOTIFICATIONS ARE NOT ENABLED.  Boggles the mind.



Now... if I change the template to period "none" and options "n" and I DON'T specify anything in the service checks, then notifications don't get sent out.  Which is what I want.  But why would notifications get sent out when 
notifications_enabled is set to 0?  Right now, notifications_enabled is set to 0 in the template... I recompiled the nagios binary with -DDEBUG4 and I can see:

SERVICE NOTIFICATION ATTEMPT: Service 'Local - Daemon: snort' on host 'hostname-goes-here'
        Current time: Thu Nov 11 14:35:32 2004
        Notifications are temporarily disabled for this service, so we won't send one out!
        Sending out a notification for this service is not viable at this time.

It's clear that the notification is being suppressed by period being "none," not notifications_enabled being 0.  Can someone provide some clarity here?

-Yanek.
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list