no error if no notification_options

Rob Brown dtownrobbrown at gmail.com
Wed Oct 3 03:45:06 CEST 2007


Recently, I messed up my (version 2.2) configs and it took me a while
to figure out why I wasn't getting any alerts: turns out the scripts I
use to generate my configs were not writing out the
notification_options directive on my templates. Even though I had
notifications enabled everywhere, I was not getting alerts.
While admittedly, this was my problem and not Nagios', it would have
been nice to see a warning in the verification routine. Like:
Warning: service xyz has no notification options enabled.
That would have tipped me off right away.

I checked this against a 3.0b2 version i'm running on a dev server and
it seemed to exhibit the same behavior. According to the docs, I
thought notification_options was a required directive? In that case,
shouldn't it throw an error?

here's a snippit of a config that passes verify:

define service {
        name                            generic-service
        max_check_attempts              3
        normal_check_interval           30
        retry_check_interval            15
        active_checks_enabled           1
        passive_checks_enabled          1
        check_period                    24x7
        parallelize_check               1
        freshness_threshold             0
        flap_detection_enabled          1
        retain_status_information       1
        retain_nonstatus_information    1
        notification_period             24x7
        notifications_enabled           1
        register                        0
}

define service {
        hostgroup_name                  zzdummy
        service_description             zzdummy
        use                             generic-service
        check_command                   check_dummy
        contact_groups                  nagios_dev
}

notice in the template: no notification_options
no alerts will ever be sent for this service.
Is this a bug or am I missing something?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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