Grafana Dashboard Host Up/Down

Hi everyone,

I am starting to get a bit frustrated while trying to configure a Dashboard on Grafana. I successfully managed to integrate the CheckMK Raw PlugIn into Grafana.
I also downloaded the Status Panel Plug In in Grafana because I want to check if my hosts are UP or DOWN.

However this turns out to be a greater challenge for me than I had expected.I can’t find any setting options or I’m just too stupid for it. I want a dashboard that shows me my host in green when they are UP otherwise red when DOWN. Does anyone have any helpful tips for me?

This is currently not possible. It is a feature requested from time to time (see #17 for one of the first and a possible workaround), but as far as I know its currently not part of the roadmap.

The current plugin only supports fetching of metrics (stored as RRD files on disk). The status of the host/service is not stored in such a file. As far as I know there is no way to ask Checkmk for a history of the status of a host/service, it only shows the current status. But when adding the host/service status to Grafana we would also have to support historic values, which is not that easy to implement.

Feel free to update #200 to add your perspective or vote for the feature request on features.checkmk.com/suggestions/295543

Hi!

not sure if that works with the RAW edition but you might be able to use the RestAPI of CheckMK:

→ CheckMK Webui → Help → REST API documentation → Host Table

Endpoint: /domain-types/host/collections/all

query:

{"op": "and", "expr": [{"op": "!=", "left": "state", "right": "0"}, {"op": "=", "left": "acknowledged", "right": "0"}, {"op": "!=", "left": "scheduled_downtime_depth", "right": "0"}]}

the state expressions filters for the host state (0 is UP, 1 is DOWN, aso…)

columns:

state

I am currently using the JSON datasource in grafana and a simple table graph.

JSON datasource query:

$.value[*].extensions.name
$.value[*].extensions.state

br
Oliver

1 Like