Backend api - getservicestatus
-
arul_anand_2000
- Posts: 3
- Joined: Thu Dec 10, 2015 3:42 am
Backend api - getservicestatus
Hi,
I had increased the max service check age to 600 minutes from 5 minutes in Ndoutils as i want data for analysis exported to external system. I am using url - http://10.168.18.151/nagiosxi/backend/? ... t=6bm9jkb0 to pull data from Nagios server and it works perfectly. Is there a way to specify start time and end time to url to get only the specific data. Is there any document which specifies the list of arguments that can be passed to getservicestatus command.
Thanks in Advance.
Regards,
Arul.
I had increased the max service check age to 600 minutes from 5 minutes in Ndoutils as i want data for analysis exported to external system. I am using url - http://10.168.18.151/nagiosxi/backend/? ... t=6bm9jkb0 to pull data from Nagios server and it works perfectly. Is there a way to specify start time and end time to url to get only the specific data. Is there any document which specifies the list of arguments that can be passed to getservicestatus command.
Thanks in Advance.
Regards,
Arul.
Re: Backend api - getservicestatus
Are you looking for a past result of a service check or a graph? I'm a bit confused on this part, can you clarify what you're looking to do?arul_anand_2000 wrote:Is there a way to specify start time and end time to url to get only the specific data.
Check out page 4 @ https://assets.nagios.com/downloads/nag ... ios-XI.pdfarul_anand_2000 wrote:Is there any document which specifies the list of arguments that can be passed to getservicestatus command.
Also, take a look at the file /usr/local/nagiosxi/html/backend/index.php.
Is that the information you're looking for?
Former Nagios Employee
-
arul_anand_2000
- Posts: 3
- Joined: Thu Dec 10, 2015 3:42 am
Re: Backend api - getservicestatus
Thanks for the update rkennedy. To be more specify we are trying build an analytical system which will use metrics data like CPU, Memory usage etc. We want to get the data from Nagios to Analytical system. In case of Nagios open source there tables from which we pull the historical data. In case of Nagios XI those tables were not updated. We were using getServiceStatus API to get the current data and send it other system. The problem is if there is down time in Other system metric data is lost. We wanted to know if there is a way to pull the historical data by specifying start and end time. We are not looking for embedded graph but for past service check data for all hosts and metrics in one single api call. Is there a way to achieve it.
Regards,
Arul.
Regards,
Arul.
Re: Backend api - getservicestatus
At this time, there is not a way to pull historical data. To further use it though, you can specifiy a few more fields to narrow down the results you receive from getservicestatus.
?cmd=getservicestatus&host_name=localhost&service_description=Ping - example of other variables that can be used with it.
?cmd=getservicestatus&host_name=localhost&service_description=Ping - example of other variables that can be used with it.
Former Nagios Employee
Re: Backend api - getservicestatus
I asked the developers about a function that I found, 'gethistoricalservicestatus'. Currently it's not working properly.
I was informed that 'gethistoricalservicestatus' should be fixed for the next minor release - at that point you'll be able to use that for historical data.
I was informed that 'gethistoricalservicestatus' should be fixed for the next minor release - at that point you'll be able to use that for historical data.
Former Nagios Employee
-
arul_anand_2000
- Posts: 3
- Joined: Thu Dec 10, 2015 3:42 am
Re: Backend api - getservicestatus
Thanks a lot for the update. Can you please let me know when this minor release would be available. Can we get this as a patch if we contact support.
Regards,
Arul.
Regards,
Arul.
Re: Backend api - getservicestatus
At this time I do not have an estimate on when the next minor release will occur as it's in the developers hands.
As for a patch, you'll just have to wait for the release.
As for a patch, you'll just have to wait for the release.
Former Nagios Employee
Re: Backend api - getservicestatus
Was this update eventually released? If so, which version?
Thanks!
Thanks!
Re: Backend api - getservicestatus
There has been an update since then, and gethistoricalservicestatus appears to be working after what I just tested.
This is showing me a past state -
While this shows me current -
I'm running 5.2.5 on this machine. Are you seeing issues @awilson?
This is showing me a past state -
Code: Select all
http://192.168.4.254/nagiosxi/backend/?cmd=gethistoricalservicestatus&ticket=tickettest&username=nagiosadmin&host_name=rkennedy.nagios.local&name=Uptime
Code: Select all
http://192.168.4.254/nagiosxi/backend/?cmd=getservicestatus&username=nagiosadmin&ticket=tickettest&host_name=rkennedy.nagios.local&name=Uptime
Former Nagios Employee
Re: Backend api - getservicestatus
No issues. Thanks!