Check_MK & Grafana - solution/help for mean/min/max calculation

Schönen Guten Morgen,

we use check_mk and grafana to show some nice dashboards and graphing to the management and some monitors in the building.

No I have a question, as far as I know I can’t realy calculate values in grafana directly. We need some calculated values like mean/min/max/365day min/max and so on. We use check_mk as datasource so the values are coming directly from the check_mk server. The host/service in check_mk does not deliver those values.
How can I calculate those values and show them in a diagram as line or bar or whatever is needed.

thanks :slight_smile:



I use google translation to understand your problem ^^

For help you, we need to know your check_mk and grafana version.

Which database are you use ?

Influxdb ? PNPnagios ? Checkmk datasource ?

To have “mean” value you can select it like that, on legend values:

Then, with pie, you can have a thing like that:

As you can see, if I choise “last” instead of “mean”, I have the last value (100)

You have other option on “Transform” as “Add Field from calculation”

I hope I help you.


Hey, thanks for your help. We use check_mk as datasource.
If I use the “mean” option in the legend I just get a pure number and no line because it’s just the legend table itselfe.
If I use the “trasformation” option the calculated value is the same like the normale datasource value. I guess thats because I just have one value at one time (12 o’clock - 21 degree celsius) so both lines (the cmk value and the transformed one) are congruent.


A table like that is not good for you ?

With Last Mean and Max.

Sadly not, I need a line in the diagram and sometimes I need a calculated value like “mean over the last XX days” as a line in the Grafana Panel.

Like the red line ?

yes, something like that with custom calculations