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
Trigger all checks?
Re: Trigger all checks?
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
_______________________________________________________________
SCHEDULE_FORCED_SVC_CHECK
https://old.nagios.org/developerinfo/ex ... and_id=129
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 > $commandfileSCHEDULE_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 > $commandfileBe sure to check out the Knowledgebase for helpful articles and solutions!