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
Downtime within Nagios xi
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
Re: Downtime within Nagios xi
Yes you can still use commands through nagios.cmd
-
- Posts: 17
- Joined: Wed Sep 25, 2019 3:06 am
Re: Downtime within Nagios xi
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
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
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
Re: Downtime within Nagios xi
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
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