Closed infraweavers closed 1 year ago
Those json exports are a relict from times when there was no rest api. So now i would put something like this in the rest api. There is /services/stats
, /hosts/stats
, /processinfo
and /processinfo/stats
.
Does any of those return the values you are looking for already?
Those json exports are a relict from times when there was no rest api. So now i would put something like this in the rest api. There is
/services/stats
,/hosts/stats
,/processinfo
and/processinfo/stats
. Does any of those return the values you are looking for already?
Ahh! I did have a suspicion this would already exist, but my search skills were clearly lacking. This almost does what we want (not 100% that extinfo.cgi would necessarily give what we want either) as we have thruk pointing to 3 sites at current and we're trying to get the checklatency and number of hosts for a specific site.
~2 problems~ 1 problem I can see currently:
hosts/stats
or services/stats
(unless it's called something else)-b sitename
is the fix for thisAha, check latency is here checks/stats
; yeah we can make this work. Cool thanks!
It is also possible to add a /sites/ url prefix, see http://thruk.org/documentation/rest.html#_backends-sites
Is your feature request related to a problem? Please describe. Under OMD 5, naemon has been changed to not write a state file anymore, this means that
naemonstats
does not work. It appears that the output in thruk contains the same information (check latency, number of hosts being checked etc). However the only way we have found to get this information on the command line is to usethruk 'extinfo.cgi?type=4
which does not seem to suppose&view_mode=xml
or JSON. This means that we will have to parse HTML to get the information we require.Describe the solution you'd like Make extinfo.cgi support
view_mode
Describe alternatives you've considered We can re-enable the state file, however it seems like that is the wrong direction of travel; I can forsee this being removed completely at some point
Additional context