Page 1 of 1

Downtime within Nagios XI

Posted: Mon Dec 07, 2020 11:44 am
by scorit
Hi,

We use to send dowtime to set Nagios blackout period with nagios.cmd.

Now we upgraded with Nagios XI, I see we need to get through API calls to set system downtime.
curl -XPOST "https://dcvprdmon/nagiosxi/api/v1/syste ... pikey=xxxx

I am wondering if there is still the legacy method working ?


Thanks

Re: Downtime within Nagios XI

Posted: Mon Dec 07, 2020 1:03 pm
by scottwilkerson
Yes you can still use commands through nagios.cmd

Re: Downtime within Nagios XI

Posted: Mon Dec 07, 2020 4:03 pm
by scorit
Thanks. I tried this legacy script but it seems no downtime is commited on Nagios :
Any idea why it's not working ?

# This is a sample shell script showing how you can submit the CHANGE_HOST_CHECK_COMMAND command
# to Nagios. Adjust variables to fit your environment as necessary.
now=`date +%s`
commandfile='/usr/local/nagios/var/rw/nagios.cmd'

/usr/bin/printf "DISABLE_SVC_NOTIFICATIONS;host;Check daemon batch\n" $now > $commandfile

Re: Downtime within Nagios XI

Posted: Mon Dec 07, 2020 4:19 pm
by scottwilkerson
This looks correct to just disable notifications for the service if the host is host and the service_description is Check daemon batch
https://assets.nagios.com/downloads/nag ... mand_id=12

But this command doesn't schedule a downtime, that would look like the following
https://assets.nagios.com/downloads/nag ... and_id=122