Page 1 of 1

What API's to schedule down time & enable/disabled alert?

Posted: Tue Sep 24, 2019 5:17 am
by ibmkenexa
Team,

Our present version Nagios XI "5.2.7" and planning to automate nagios alerts like enable/disable and put schedule down time tasks.

Can you please provide API's for alerts enable/disable and schedule down time.

Please answer below questions:

1. Is the version 5.2.7 support full nagios api's ?
2. If we want to upgrade to new version, can we use same license to upgrade to new version ?

Re: What API's to schedule down time & enable/disabled alert

Posted: Tue Sep 24, 2019 11:43 am
by benjaminsmith
Hello @ibmkenexa,

There has been a lot of development done on the API since 5.2.7, so I would recommend upgrading to the latest version to be able to schedule downtime, enable/disable notifications and more. If you have any questions about your current license, please send a messages to [email protected].

Once you upgrade, the documentation for the API is found in the UI at Help > API Docs. There you'll find example commands.

For example, to enable/disable notifications, you can use the external nagios core commands from the API.

Code: Select all

#Disable
curl -XPOST "http://192.168.23.100/nagiosxi/api/v1/system/corecommand?apikey=<api-key>" -d "cmd=DISABLE_NOTIFICATIONS"
#Enable
curl -XPOST "http://192.168.23.100/nagiosxi/api/v1/system/corecommand?apikey=<api-key" -d "cmd=ENABLE_NOTIFICATIONS"