Add a generic Plugin for polling of JSON status APIs

136 votes

Many applications provide an HTTP API that can be used to query the health status, as is common with Docker containers.

It is about time for a rule-based check with which the JSON output can be evaluated:

Example:
{"status":"UP","components":{"module1":{"status":"UP","details":{"System":"available","Version":"1.5.0","Count":"5"}},"module2":{"status":"UP","details":{"System":"available","Version":"1.5.0","Count":"25"}}},}

* create for each key matching regex R a own Service with Label L as prefix (LABEL_KEY) or use only one Service with Name "LABEL"
* Verify that the key X exists
* Verify that the key X has a value less, equal or grater then N
* Verify that the key X has a value that matches/not matches one or more strings/regex
* Report value y of the key X as performance data

If any of these criteria are not met, report the worst state.

Under consideration Checks&Agents Suggested by: Lars Sörensen Upvoted: yesterday Comments: 7

Comments: 7