Sending CheckMK metrics to Prometheus

Hi,

The compagny I work as two IT deptarments.
Mine is using Check MK v 2.0.0p32, the other Prometheus 2.45.1.

Lately, we have been ask by them if we could share our metrics.
(Presently, there is an ongoing effort to incorporate both teams)

I’ve read a few articles on how to do Prometheus to Check MK but have failed to find one for the other way.

I was wondering if it was possible, and if so any pointers will be appreciated !

Cheers,

Hi Francois,

the easiest way would probably to pump those metrics into an influxdb and retrieve them from there. Sending metrics to InfluxDB and Graphite - via InfluxDB v2 API or Carbon plaintext protocol

1 Like

First I’d upgrade my Checkmk to 2.2 if you can, 2.0 is quite old now :slight_smile:

There are a number of ways this can be done. I’m sure your other team is using Grafana to display metrics. You can use the Checkmk Grafana plugin to allow metrics from both Checkmk and Prometheus in the same tool.

You could also install the Prometheus preferred agent Telegraf on your Checkmk server. Here you could let Checkmk send InfluxDB V.2.x metrics to Telegraf, and telegraf can then use prometheus remote-write to push the metrics to Prometheus. However his requires some tweaking and is not plug-n-play at the moment

The last option would be to setup a separate Influx DB 2.x database that you send metrics to, and configure that in Grafana to view metrics. Influx 1.x (graphite) is not supported in Checkmk 2.x. Influxdb 2.x in Checkmk allows to send more data like host and service labels that can be very useful.

2 Likes

Hello,
I have the same problem - we monitor network devices using checkmk (2.2 EE) and we need to share these metrics in prometheus format.
I tried sending them to telegraf in influxdb 2 format, but cmc complains with http 404 error. I suspect checkmk tries to verify if “influxdb” is alive by checking some kind of healthcheck. And telegraf acting as influxdb v2 doesn’t expose this specific url.
I know my telegraf works as influxdb2 forwarder, because it works with another telegraf.
I use most recent telegraf version.

Yea so Checkmk requires the /ping end-point to be available. Telegraf does not think its needed but Influx thinks it is…

Checkmk even changed they way they handle this some time ago

That why I said a “workaround” is needed. The quickest way for me was to setup a simple nginx that handles both

location /ping
and
/api/v2/write

see also (but won’t help of course)