Page 1 of 1

How do I disable passive checks for specific service/host?

Posted: Wed Jan 11, 2017 10:23 am
by skynardo
I am trying to disable Passive Checks during certain time frames for specific hosts. I attempted to do this by creating a new Schedule named "7_days_exclude_midnight_to_six_am", then I edited the specific passive service check for the host, went to the check_settings tab and selected this new schedule in the "check_period" drop down. This however, does not seem to work, or at least the checks still come in to Nagios during this timeframe and trigger an Event Handler defined in my underlying passive service template that I am using for this particular service check on all hosts called "ug_passive_service_linux_12". What does the "check_period" actually do?

Re: How do I disable passive checks for specific service/hos

Posted: Wed Jan 11, 2017 11:16 am
by WillemDH
Skynardo,

The check period is only working for active checks. Passive checks are initiated from the client side. There is no mechanism to prevent passive checks from arriving into one specific service.

Grtz

Re: How do I disable passive checks for specific service/hos

Posted: Wed Jan 11, 2017 1:49 pm
by mcapra
Thanks @WillemDH!

From the Nagios Core Object Definitions documentation:

Code: Select all

check_period    	This directive is used to specify the short name of the time period during which active checks of this host can be made.
There isn't currently a similar directive for passive checks since, as Willem pointed out, the checks are initiated/executed on the remote device then the results are fed back to Nagios XI. You can enable/disable passive checks completely for a given check, but not on an interval.

Re: How do I disable passive checks for specific service/hos

Posted: Wed Jan 11, 2017 2:28 pm
by WillemDH
It's just a thought, but if you really need that feature, the only workarounds I can think of are:

- Configuring downtime for the passive service at 00:00 and ressetting the state (force check should work) at 06:00
- Disabling sending of the passive events on the client side
- Creating a script which disactivates the passive service at 00:00 and re-enables it at 06:00.

Grtz

Re: How do I disable passive checks for specific service/hos

Posted: Wed Jan 11, 2017 2:40 pm
by skynardo
That is unfortunate, would be nice if this could also be set for passive checks and if set for an incoming passive check, send it to the bit bucket.
I think that in our environment I can set up a recurring downtime schedule for my host/service to get the results I want because the Event Handler that I want to stifle checks if the service is in DOWNTIME and exits if it is. Thanks for the explanation.

Re: How do I disable passive checks for specific service/hos

Posted: Wed Jan 11, 2017 3:08 pm
by dwhitfield
This wasn't mentioned specifically, but there is a Recurring Scheduled Downtime option. Check out page 5 of https://assets.nagios.com/downloads/nag ... s%20XI.pdf

Re: How do I disable passive checks for specific service/hos

Posted: Wed Jan 11, 2017 3:09 pm
by rkennedy
I believe scheduled downtime is the way to go. At that point, it should treat active / passive checks in the same manner.

The hard thing that comes to play by creating a 'suppress' button for passive checks, are multiple other issues that can occur. Notifications, event handlers, and freshness all come to mind.

Let us know if you have any further questions, or ideas about it.