Page 1 of 1
API for performance metrics?
Posted: Mon Dec 13, 2021 1:13 pm
by lucas.shearer
I am trying to query performance metrics with an API call. Looking for metrics such as CPU Usage, Memory, Disk Utilization, and Network Utilization with their respective timestamps. Is there an API which can do this? I have looked through the API documentation within the "help" tab and don't see anything with this capability. Please let me know if I am missing something or how this can be done!
Thanks!!
Re: API for performance metrics?
Posted: Tue Dec 14, 2021 12:33 pm
by pbroste
Hello
@lucas.shearer
Thanks for reaching out, the following will result in
host and service status:
https://xxx.xxx.xxx.xxx/nagiosxi/help/a ... hoststatus
https://xxx.xxx.xxx.xxx/nagiosxi/help/a ... jects-host
Code: Select all
curl -XGET "https://xxx.xxx.xxx.xxx/nagiosxi/api/v1/objects/hoststatus?apikey=AEiMFttHuQRqWEDbqgXYelB6GPCakE3F7i6CKQsNIMoAS9Pcol3eE3Ohe5ejYUGH&pretty=1" -k
For service
https://xxx.xxx.xxx.xxx/nagiosxi/help/a ... vicestatus
https://xxx.xxx.xxx.xxx/nagiosxi/help/a ... ts-service
Code: Select all
curl -XGET "https://xxx.xxx.xxx.xxx/nagiosxi/api/v1/objects/service?apikey=AEiMFttHuQRqWEDbqgXYelB6GPCakE3F7i6CKQsNIMoAS9Pcol3eE3Ohe5ejYUGH&pretty=1" -k
Please let us know if you have further questions,
Perry