hi ,
i want to use nagiosxi rest api to set Schedule downtime or Disable notifications enable notifications or acknowledged or noacknowledged?
can you give me some advises?
thank you !
about nagiosxi rest api
Re: about nagiosxi rest api
While these are not available, the eventual goal is to be able to do pretty much anything via the API and the 5.5 release will contain some big improvements.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: about nagiosxi rest api
You can use the External Commands CGI to and uses curl commands of bash scripts to achieve what you want.
I have a few examples of the curl commands you can look at for examples.
This works for scheduling downtime for a host.
This for scheduling downtime for host and all of the services
For bash script examples and a list of external commands, take a look at this link.
https://old.nagios.org/developerinfo/ex ... ndlist.php
I have a few examples of the curl commands you can look at for examples.
This works for scheduling downtime for a host.
Code: Select all
curl -d "cmd_typ=55&cmd_mod=2&host=localhost&com_data=TestingDowntime&trigger=0&start_time=06-30-2016 18:30:00&end_time=06-30-2016 18:40:00&fixed=1&childoptions=0&btnSubmit=Commit" "http://192.168.112.130/nagios/cgi-bin/cmd.cgi" -u "nagiosadmin:nagiosadmin"Code: Select all
curl -d "cmd_typ=86&cmd_mod=2&host=localhost&com_data=TestingDowntime&trigger=0&start_time=02-08-2018 18:30:00&end_time=02-08-2018 18:40:00&fixed=1&childoptions=0&btnSubmit=Commit" "https://192.168.112.129/nagios/cgi-bin/cmd.cgi" -u "nagiosadmin:nagiosadmin" -khttps://old.nagios.org/developerinfo/ex ... ndlist.php
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: about nagiosxi rest api
It is soon, can't give an exact date as it is in final testing.