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,
Check Attempt
-
wiproltdwiv
- Posts: 281
- Joined: Sat Sep 08, 2012 12:52 am
Check Attempt
You do not have the required permissions to view the files attached to this post.
Re: Check Attempt
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
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 )
Re: Check Attempt
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
Re: Check Attempt
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
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
https://outsideit.net
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check Attempt
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.cachedWillemDH 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
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