[RESOLVED] find service with MAX check execution time

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

[RESOLVED] find service with MAX check execution time

Postby Francesco » Mon Feb 26, 2018 6:20 am

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:
viewtopic.php?f=16&t=29865#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
viewtopic.php?f=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
User avatar
Francesco
 
Posts: 118
Joined: Wed Oct 28, 2015 5:02 am
Location: /usr

Return to Nagios XI

Who is online

Users browsing this forum: Google [Bot] and 6 guests