Page 1 of 1

Background info on disabling check on the interface

Posted: Thu Apr 24, 2014 9:22 am
by keif
Hello everyone,

I have a question about what happens in the background when I use the "Disable checks of all services on this host" link on the Nagios Core web interface for a specific host.

How does Nagios know to keep it disabled? Is there a config file where the change is made, like a flag changed? Or does the host that was changed sit in a variable?

I'm hoping it's as simple as a flag being set. The reason I ask is I'm looking for a way for my bash script to differentiate between a disabled host vs an enabled host (Which I cannot use the web interface to determine).

Any help would be appreciated. Thanks!

Re: Background info on disabling check on the interface

Posted: Thu Apr 24, 2014 10:30 am
by slansing
I think that you can pass that through the nagios command pipe via a script if you would like, it essentially stops nagios from scheduling checks for that object ID. I believe this change is pushed to:

Code: Select all

/usr/local/nagios/var/status.dat
And flips the following to 0 or 1 depending on what you tell it:

Code: Select all

   active_service_checks_enabled=1
        active_host_checks_enabled=1
http://nagios.sourceforge.net/docs/3_0/extcommands.html
http://nagios.sourceforge.net/docs/3_0/ ... ml#cmd_cgi

Re: Background info on disabling check on the interface

Posted: Thu Apr 24, 2014 10:52 am
by keif
slansing wrote:I think that you can pass that through the nagios command pipe via a script if you would like, it essentially stops nagios from scheduling checks for that object ID. I believe this change is pushed to:

Code: Select all

/usr/local/nagios/var/status.dat
And flips the following to 0 or 1 depending on what you tell it:

Code: Select all

   active_service_checks_enabled=1
        active_host_checks_enabled=1
http://nagios.sourceforge.net/docs/3_0/extcommands.html
http://nagios.sourceforge.net/docs/3_0/ ... ml#cmd_cgi
Thank you so much slansing. That was exactly what I was looking for.

Re: Background info on disabling check on the interface

Posted: Thu Apr 24, 2014 11:07 am
by tmcdonald
I'll be closing this thread now, but feel free to open another if you need anything in the future!