SCHEDULE_HOST_SVC_CHECKS doesn't work

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

SCHEDULE_HOST_SVC_CHECKS doesn't work

Postby emi65 » Mon Jul 17, 2017 3:40 am

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

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Postby tgriep » Mon Jul 17, 2017 3:23 pm

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/externalcommands/commandinfo.php?command_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!
User avatar
tgriep
Madmin
 
Posts: 5675
Joined: Thu Oct 30, 2014 9:02 am

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Postby emi65 » Tue Jul 18, 2017 1:43 am

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

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Postby emi65 » Tue Jul 18, 2017 4:28 am

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

Re: SCHEDULE_HOST_SVC_CHECKS doesn't work

Postby tgriep » Tue Jul 18, 2017 11:59 am

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!
User avatar
tgriep
Madmin
 
Posts: 5675
Joined: Thu Oct 30, 2014 9:02 am


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 11 guests