host_down_disable_service_checks - passive checks

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ghugon
Posts: 23
Joined: Tue May 07, 2019 7:55 am

host_down_disable_service_checks - passive checks

Post by ghugon »

Hi,

I'd like to be able to do passive checks while host_down_disable_service_checks is enabled, is that possible ?
(https://support.nagios.com/forum/viewto ... 20#p292425)
We decided it shouldn't negate the performance benefits we get from host_down_disable_service_checks as it would only do one passive service check per service instead of one every x minutes if host_down_disable_service_checks is not enabled.

But it doesn't seem to work when done through nagios xi ui and when done using a script aswell.
Also, the checks are done by gearman workers.

The eventhandler script would look something like this, right ?

Code: Select all

#!/bin/bash
HOSTNAME=$1
HOSTSTATE=$2
SERVICENAME=$3
DATE=$(date)
COMMANDFILE='/usr/local/nagios/var/rw/nagios.cmd'
case "$HOSTSTATE" in 
    DOWN) 
    /bin/printf "[%lu] PROCESS_SERVICE_CHECK_RESULT;$HOSTNAME;$SERVICENAME;2;CRITICAL" $DATE > $COMMANDFILE
esac
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: host_down_disable_service_checks - passive checks

Post by scottwilkerson »

ghugon wrote:Also, the checks are done by gearman workers.
This is your problem right here. You cannot process a command on a worker that is trying to write to the command pipe (/usr/local/nagios/var/rw/nagios.cmd) on the Nagios server, it just won't work.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked