Re: [Nagios-users] no error if missing notification_options

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.
Locked
Guest

Re: [Nagios-users] no error if missing notification_options

Post by Guest »

Hi all,
I posted this over in the nagios-users list and only got one response
from someone with the same issue. I figured you all are probably the
ones to bounce it off of to see if there is a possible fix.
Basically, according to the docs, notification_options is a required
directive in a service definition, but does not generate an error if
omitted. Seems like it should. Makes it hard to troubleshoot if that
directive is missing.
Can you make that a requred directive and throw an error if missing?
Thanks.


-----Original Message-----
From: Aaron Devey [mailto:[email protected]]
Sent: Wednesday, October 03, 2007 12:21 PM
To: Rob Brown
Subject: Re: [Nagios-users] no error if missing notification_options

I had this exact same problem last week with nagios 2.9. It's a pain to
track down since everything looks right. The default of "no alerts" if
the notification_options aren't set seems like a bad default. If
nothing else, emitting a warning during the config check (nagios -v
nagios.cfg) would be helpful.

-Aaron

Rob Brown wrote:
>
> 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 post was automatically imported from historical nagios-devel mailing list archives
Original poster: aron Devey [mailto:[email protected]
Locked