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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

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

Post 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?
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

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

Post 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
Nagios XI 5.8.1
https://outsideit.net
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

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

Post 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.
Former Nagios employee
https://www.mcapra.com/
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

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

Post 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
Nagios XI 5.8.1
https://outsideit.net
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

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

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

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

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post 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.
Former Nagios Employee
Locked