Ran the following commands to add hosts to scheduled downtime. The hosts shows up at the XI GUI but it disappears and reappears. Causing the notification to be sent. One minute it say there are HOSTS(107) and another minute there HOST(41) It goes back and forth after the refresh.
What is causing the scheduled host downtime to go up and down?
What can i do to fix it?
Running 5.2.7.
#!/bin/sh
FILE1=/home/doc/test.txt
for server1 in `cat $FILE1`;
do
now=`date +%s`
commandfile='/usr/local/nagios/var/rw/nagios.cmd'
#SCHEDULE_HOST_DOWNTIME;<host_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment>
/usr/bin/printf "[%lu] SCHEDULE_HOST_DOWNTIME;$server1;1460404026;1460490426;1;0;3970446;hjl414_adm;Change 91477\n" $now > $commandfile
done
SCHEDULE_HOST_DOWNTIME causing GUI status to flip
-
mcitunixops
- Posts: 5
- Joined: Wed Jan 27, 2016 11:28 am
Re: SCHEDULE_HOST_DOWNTIME causing GUI status to flip
This should not happen, sounds like you may have multiple Nagios processes running. Could you post the output of
ps -ef | grep nagios.cfg
You could just restart Nagios altogether and see if the issue persists afterwards.
ps -ef | grep nagios.cfg
You could just restart Nagios altogether and see if the issue persists afterwards.
Be sure to check out the Knowledgebase for helpful articles and solutions!