Ok, so I've spent a bunch of time on this and I can not seem to get it working in my environment.
I have a Nagios 3.3.1 server with NConf 1.3. All works well and I'm pretty happy.
However, I have a need to schedule host downtime, for various reasons, daily or weekly and wanted to create and cron to handle this.
Easy enough right? I found the following script (customized slightly) and I have been unable to get it to successfully schedule downtime for a host.
I'll show an example of the command line to run this script:
./nagios_host_downtime.sh hostname '20120417 06:30:00' '20120417 08:30:00' 120 nagiosadmin test
In the log file – /usr/local/nagios/var/nagios.log – I see:
[1334609909] EXTERNAL COMMAND: SCHEDULE_HOST_DOWNTIME;hostname;1334665800;1334553600;0;0;nagiosadmin;test;
However, in the Downtime section of the web console I never see an entry and will still receive alerts during the downtime.
Any one have any thoughts? I might just be screwing up something simple, but I've waste a good amount of time with no joy and just need this to work.
Best Answer
You´re missing
duration
--
I just tested
What works as expected.