Best method to query REST API endpoint and parse JSON health output?

Hi all,

Looking for some guidance, I have a server that reports health metrics via REST API calls.

Is there a way in check_mk to call a REST API and parse output for monitoring (via WATO) or is the only option to write a check plugin, something like a wrapper around cURL and jq?

Has anyone done this, looking for some guidance on how others went about monitoring such endpoints.

I know there is check_http but it is not useful at parson JSON output.

Yes, but you should write logic as well. You would have to define CRT thresholds for example, what data to classify as “Services”. There is no magic sauce here that can do it for you.
There are plenty of active checks that uses APIs but they have all been written for that purpose, we have written some of our owns as well to monitor Hypervisors, storage devices etc.

1 Like

It would be great if we had something in WATO for this, one of the main drivers to use CMK is the vast amount of built-in checks so we don’t have to write our own logic. Some sort of REST API studio where we can define services and thresholds.

There are many apps out there that expose REST API for monitoring for which there is not a plugin, it would be great to have something baked in to monitor such APIs other than “write your own plugin”.

True but there are no standards for this. Unless everyone unites around open telemetry for example this “studio” would have to think about all use cases.

There are also plenty of JSON data that is not standardised, even Checkmk can’t produce correct JSON…

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.