Getting metrics total over a given period

Hello,

I have created a custom agent sending regularly some metrics to CheckMK about an internal API (number of orders received, number of created orders, numbers of errors during creation), I use those metrics to create a graph that I include into a report sent to our customer every month and this works well.

My question is, in addition to the maximum, minimum and average values I would like to display the total (received, created, errors) over the period defined for the graph/report.

I can’t find a way to achieve that, is there any way to do it?

Thank you in advance for your help! :slight_smile:

1 Like

Hi.
You can use the graph editor to create your own graph based on the given metrics. You will also able to sum more than one value in it. Please have a look at Measured values and graphing - Evaluating measured values in Checkmk quickly and easily
An other option is using the new Graphig API to create a summarized Metric.

Regards,
Christian

1 Like

Hi Christian,

Thank you for you answer. :slight_smile:

Yes, I’m aware that I can sum several metrics values but it’s not what I’m trying to achieve.

Let’s focus on “received” metric, I have all the values for received orders, let’s say hour by hour for one month, the sum that I want to retrieve is the total amount of the “received” ones for the given month.

CheckMK doesn’t seem to provide any way to sum the metric itself but only the values of max/min/avg between two ore more metrics, the thing I would like is something like max/min/avg/total. :confused:

I hope I’m clear enough.

Best regards,
Jean-Marc

That is not possible.
As you aggregate the metrics over time inside the RRD file.
What you need to do is, calculation of the area beneath the curve to get the total value over time. This function is not available inside CheckMK and it would only be a approximation of the real numbers.

For your scenario you should also save the total counter metric. Some check do this already exactly like you want it.

Hi Andreas,

Thank you for you answer! :slight_smile:

So you mean I need to add an additional metric which will be the total incremented over time.
Like 0 → 0 + 100 → 100 + 125 → …
Am I right?

Do you have any example?

Best regards,

Jean-Marc