SCHEDULE_HOST_SVC_CHECKS doesn't work

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
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

SCHEDULE_HOST_SVC_CHECKS doesn't work

Post by emi65 »

Hi

I'm using Nagios Core 4.2.1
Linux version 2.6.32-573.3.1.el6.x86_64
Red Hat Enterprise Linux Server release 6.7 (Santiago)

I send this command to move forward the check time

The script is very simple

#!/bin/bash
ORASTART=`date +%s`
ORAEND=`date +%s -d '12 minutes'`
cmdfile=/var/spool/nagios/cmd/nagios.cmd
echo "[`date +%s`] SCHEDULE_HOST_SVC_CHECKS;$1;$ORAEND" > $cmdfile

I verify that the check time of the services does't change
I am sure that in the past this external command worked well

Any suggestion ?

Thanks
Emilio
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Post by tgriep »

Take a look at this link for some details on why the rescheduling of the checks may not of worked.
https://old.nagios.org/developerinfo/ex ... mand_id=30
I tested using the SCHEDULE_FORCED_HOST_SVC_CHECKS command and it seemed to work and schedule the check 12 minutes out.
Be sure to check out our Knowledgebase for helpful articles and solutions!
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Post by emi65 »

me too .... I tested using the SCHEDULE_FORCED_HOST_SVC_CHECKS and It is works fine

But SCHEDULE_FORCED_HOST_SVC_CHECKS
"Forced checks are performed regardless of what time it is (e.g. timeperiod restrictions are ignored) and whether or not active checks are enabled on a service-specific or program-wide basis"

I prefer to use SCHEDULE_HOST_SVC_CHECKS

Did you test it ?

Thanks
Emilio
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Post by emi65 »

Hi

also I tested

SCHEDULE_SVC_CHECK


with same bad resulsts

Seem that
SCHEDULE_SVC_CHECK
SCHEDULE_HOST_SVC_CHECKS

doesn't work

Regards
Emilio
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Post by tgriep »

If the check is already scheduled to happen before your new scheduled time, it will not set the new time to the check.
Note that the services may not actually be checked at the time you specify. This could occur for a number of reasons: active checks are disabled on a program-wide or service-specific basis, the services are already scheduled to be checked at an earlier time, etc.
That is why you need to use FORCED to reschedule your checks.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked