[RESOLVED] find service with MAX check execution time

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
Francesco
Posts: 124
Joined: Wed Oct 28, 2015 5:02 am
Location: /usr
Contact:

[RESOLVED] find service with MAX check execution time

Post by Francesco »

Hi all,
I already found the solution, but I want to share it with the community.

I have a "MAX Service Check Execution Time" very high, from 30s to 300s, a problem very similar to this one:
https://support.nagios.com/forum/viewto ... 65#p115564

With the API is possible to extract the servicestatus, which have the field execution_time:d, but I obtained an 500 error due PHP memory limit
https://support.nagios.com/forum/viewto ... =6&t=38699

The quick$&dirty solution was to rise the memory limit in PHP, but after reading again the API doc, I found a more elegant one:
  • orderby=execution_time:d
  • records=5

Code: Select all

https://<server>/nagiosxi/api/v1/objects/servicestatus?apikey=<apykey>&orderby=execution_time:d&records=5&pretty=1
Hope that help

P.S. the problem is the NRPE timeout configured to 30, and 300 seconds, by the previous admin :shock:
P.P.S. the post can be closed
Locked