Hi,
I am attempting to control 'notification_settings' and 'flap_detection_enabled' in a service definition, but the directives seem to be ignored by Nagios. The service definition is below. Nagios Core 3.5 and Check_MK 1.2.4p5 are being run from OMD version 1.20 (http://www.omdistro.org).
define service {
use check_mk_perf,check_mk_default
host_name ivrhost
service_description IVR Status
check_command check-mk-custom!/opt/omd/sites/ohmon/local/bin/check-ivr.pl
active_checks_enabled 1
flap_detection_enabled 0
notification_options u,c,r
}
After restarting Nagios with the above configuration, flap detection is still enabled and WARNING notifications are still being generated. I have verified that this service definition is indeed being read in by Nagios.
Any ideas why this setup is not working as expected?
Reading the docs, it appears to me this might have something to do with the state retention settings in Nagios, but I haven't yet figured how this should work.
Any help or insights would be greatly appreciated! Thanks!
Service definition directives being ignored?
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Service definition directives being ignored?
This was fixed in 4.2.0:
If this is a new install, what you could do is completely uninstall the OMB version of Nagios and do a source install for 4.2.3 (released today). Instructions are at https://support.nagios.com/kb/article.php?id=96. You could do this even if it isn't a new install, but it will be a lot more painful.
Please let us know if you run into any trouble installing 4.2.3.
Not sure what to tell you about upgrading on OMB. We generally suggest either sticking with the repos or with our source install. Obviously, we prefer source install, but we understand not everyone is going to do that.Setting “flap_detention_enabled” to 0 (zero) will now remove flapping state
If this is a new install, what you could do is completely uninstall the OMB version of Nagios and do a source install for 4.2.3 (released today). Instructions are at https://support.nagios.com/kb/article.php?id=96. You could do this even if it isn't a new install, but it will be a lot more painful.
Please let us know if you run into any trouble installing 4.2.3.
Re: Service definition directives being ignored?
Thank you for the quick reply. Upgrading Nagios Core at this time might not be possible for us, but it will be a priority for the next refresh of our system.
What about the 'notification_options' directive? Was the same sort of bug affecting that as well? Changing this directive in the service definition doesn't seem to have any effect on the which notifications produced by the service.
Once again, any help or insights would be greatly appreciated! Thanks!
What about the 'notification_options' directive? Was the same sort of bug affecting that as well? Changing this directive in the service definition doesn't seem to have any effect on the which notifications produced by the service.
Once again, any help or insights would be greatly appreciated! Thanks!
Re: Service definition directives being ignored? SOLVED
Updating to say that I solved the mystery and the problem. Turns out that the objects.cache and objects.precache files in var/nagios/ had gotten restored from backup with the wrong permissions. This was preventing the nagios user from updating them from the configuration files when Nagios restarted.
Fixing the permissions and restarting Nagios fixed it. Sorry for the erroneous post, but at least I found out about an interesting bug fix in 4.2.x!
Also, maybe this has already been added to newer versions of Nagios, but it would be nice if Nagios somehow warned about not being able to write files in the log file or to the console.
Thanks again for your response!
Fixing the permissions and restarting Nagios fixed it. Sorry for the erroneous post, but at least I found out about an interesting bug fix in 4.2.x!
Also, maybe this has already been added to newer versions of Nagios, but it would be nice if Nagios somehow warned about not being able to write files in the log file or to the console.
Thanks again for your response!
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Service definition directives being ignored? SOLVED
That's certainly something it can do. There's a lot of things it can do that it doesn't do out of the box.ehuott wrote:Also, maybe this has already been added to newer versions of Nagios, but it would be nice if Nagios somehow warned about not being able to write files in the log file or to the console.
For clarity, aside from the curiosity about features (which is fine to post about), your issue issue is resolved, correct?