Page 1 of 1

SCHEDULE_HOST_DOWNTIME causing GUI status to flip

Posted: Mon Apr 11, 2016 8:48 pm
by mcitunixops
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

Re: SCHEDULE_HOST_DOWNTIME causing GUI status to flip

Posted: Tue Apr 12, 2016 10:18 am
by bwallace
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.