Check Attempt

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

Check Attempt

Post by wiproltdwiv »

Dear Team,
We are monitoring 7000+ hosts, with check settings as shown in the screenshot and monitoring time is 11:00 to 16:00 hrs.
our requirement is, everyday at 11:00 hrs a new check should happen unless whatsoever the previous state of the host/service.
please suggest whether it's possible, if so how can we implement the same.

Regards,
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check Attempt

Post by lmiltchev »

Are you asking about running a check at exactly 11:00 every day against all 7000+ hosts and their services?
Be sure to check out our Knowledgebase for helpful articles and solutions!
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

Re: Check Attempt

Post by wiproltdwiv »

yes..fresh check should happen at 11:00 everyday, unless whatsoever the previous state of the host/services. ( either soft checks completed and waiting for hard check or next soft check at the end of monitoring time 16:00 hrs )
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check Attempt

Post by tmcdonald »

That is a lot of checks to be running at the same time and would almost certainly bring your system to a halt. I'm not 100% sure how Nagios schedules checks while entering a timeperiod, so I am going to do some testing. However, short of modifying nagios.cfg and changing how the checks are spaced out ("interleaved") I don't believe it is possible to force checks at a specific time. At the very least if it is possible it is not built-in or simple to do.
Former Nagios employee
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Check Attempt

Post by WillemDH »

Although like Ludmill and Trevor say, scheduling 7000 checks at the same time could cause serious issues, I think technically it's definitely possible with a cron job.

If all the hosts are in a hostgroup, make a bash script that queries all hosts in the hostgroup and for each hostgroup, force a check with an external command?

http://old.nagios.org/developerinfo/ext ... and_id=127
Nagios XI 5.8.1
https://outsideit.net
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check Attempt

Post by scottwilkerson »

WillemDH wrote:Although like Ludmill and Trevor say, scheduling 7000 checks at the same time could cause serious issues, I think technically it's definitely possible with a cron job.

If all the hosts are in a hostgroup, make a bash script that queries all hosts in the hostgroup and for each hostgroup, force a check with an external command?

http://old.nagios.org/developerinfo/ext ... and_id=127
And here is a script for a cron you could use to schedule an immediate check on all hosts, you may need to change objectsfile variable if you have moved your objects.cached

Code: Select all

#!/bin/sh

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

for line in `grep host_name $objectsfile | cut -f3 | sort -u`
do
printf "[%lu] SCHEDULE_HOST_CHECK;$line;$now\n" $now > $commandfile
done

Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked