Background info on disabling check on the interface

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
keif
Posts: 2
Joined: Thu Apr 24, 2014 9:15 am

Background info on disabling check on the interface

Post 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!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Background info on disabling check on the interface

Post 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
keif
Posts: 2
Joined: Thu Apr 24, 2014 9:15 am

Re: Background info on disabling check on the interface

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Background info on disabling check on the interface

Post by tmcdonald »

I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked