Hello
I have looked at the REST API's in Nagios IX.
I havent found any useful to give me uptime / availability of service groups / hosts . Is that a missing parameter ?
BR,
Reidar
API Service uptime
Re: API Service uptime
You can query the API for information on all of your hosts by using a command like this -
If you wanted to dive into a specific host, just append the name= field to the end -
For service groups, it would be - http://192.168.3.115/nagiosxi/api/v1/ob ... a&pretty=1
As for Uptime, this isn't going to be currently possible through the Rest API. I filed a feature request for it, ID #9706.
Code: Select all
http://192.168.3.115/nagiosxi/api/v1/objects/hoststatus?apikey=32klfcka&pretty=1
Code: Select all
http://192.168.3.115/nagiosxi/api/v1/objects/hoststatus?apikey=32klfcka&pretty=1&name=Host1
As for Uptime, this isn't going to be currently possible through the Rest API. I filed a feature request for it, ID #9706.
Former Nagios Employee
Re: API Service uptime
Thank you for the info.
I have been digging around in the API a little now..
I cant find anything useful to generate my own uptime/availability out of using the API. That is a problem....
My need is to generate a report of service group availability last 30 days using an API.
BR,
Reidar
I have been digging around in the API a little now..
I cant find anything useful to generate my own uptime/availability out of using the API. That is a problem....
My need is to generate a report of service group availability last 30 days using an API.
BR,
Reidar
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: API Service uptime
Have you looked through the plugins at https://exchange.nagios.org/directory/P ... ics/Uptime ?
Re: API Service uptime
I really want to do all integration with API ( JSON REST ) for compatibility with upgrades of the product.
It seems like Nagios XI is missing information that could be useful in the REST methods.
BR
It seems like Nagios XI is missing information that could be useful in the REST methods.
BR
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: API Service uptime
As of right now, FR 9706 is pending approval, so I can't really say to wait for 5.4.0. Feel free to pop back in and ask about the status at any time.