Trigger all checks?

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
jriker1
Posts: 115
Joined: Tue Dec 15, 2015 8:40 pm

Trigger all checks?

Post by jriker1 »

Is there a way to force triggering of all checks in the system rather than going thru the gui one by one? I am considering upgrading my nagios to 4.2.0 from 4.1.1 and figured an easy check to see if all is good other than it's running is to force all the checks to trigger. Thoughts?

Thanks.

JR
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Trigger all checks?

Post by bwallace »

Implementing one of the scripts linked below should enable you to accomplish a forced check of either all hosts or services:

SCHEDULE_FORCED_HOST_SVC_CHECKS
https://old.nagios.org/developerinfo/ex ... and_id=130

Code: Select all

#!/bin/sh
# This is a sample shell script showing how you can submit the SCHEDULE_FORCED_HOST_SVC_CHECKS command
# to Nagios.  Adjust variables to fit your environment as necessary.

now=`date +%s`
commandfile='/usr/local/nagios/var/rw/nagios.cmd'

/bin/printf "[%lu] SCHEDULE_FORCED_HOST_SVC_CHECKS;host1;1110741500\n" $now > $commandfile
_______________________________________________________________

SCHEDULE_FORCED_SVC_CHECK
https://old.nagios.org/developerinfo/ex ... and_id=129

Code: Select all

#!/bin/sh
# This is a sample shell script showing how you can submit the SCHEDULE_FORCED_SVC_CHECK command
# to Nagios.  Adjust variables to fit your environment as necessary.

now=`date +%s`
commandfile='/usr/local/nagios/var/rw/nagios.cmd'

/bin/printf "[%lu] SCHEDULE_FORCED_SVC_CHECK;host1;service1;1110741500\n" $now > $commandfile
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked