about nagiosxi rest api

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Olin
Posts: 50
Joined: Tue Dec 26, 2017 1:46 am

about nagiosxi rest api

Post by Olin »

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 !
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: about nagiosxi rest api

Post by cdienger »

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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: about nagiosxi rest api

Post by tgriep »

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.

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"
This for scheduling downtime for host and all of the services

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" -k
For bash script examples and a list of external commands, take a look at this link.
https://old.nagios.org/developerinfo/ex ... ndlist.php
Be sure to check out our Knowledgebase for helpful articles and solutions!
Olin
Posts: 50
Joined: Tue Dec 26, 2017 1:46 am

Re: about nagiosxi rest api

Post by Olin »

thanks @tgriep and @cdienger

And what time is the 5.5 release ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: about nagiosxi rest api

Post by scottwilkerson »

Olin wrote:thanks @tgriep and @cdienger

And what time is the 5.5 release ?
It is soon, can't give an exact date as it is in final testing.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked