Page 1 of 1

SCHEDULE_HOST_SVC_CHECKS doesn't work

Posted: Mon Jul 17, 2017 3:40 am
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

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Posted: Mon Jul 17, 2017 3:23 pm
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.

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Posted: Tue Jul 18, 2017 1:43 am
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

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Posted: Tue Jul 18, 2017 4:28 am
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

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Posted: Tue Jul 18, 2017 11:59 am
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.