Local check remove old values

I created a local check for on of my machines.

Now I made some adjustments with the values that are being passed to checkmk.
I renamed one variable from the check output, but now I got two separate values, the old and new one.

Is it possible to remove the old data, as it is no longer needed?

Hi and welcome to the forum.

I assume you are talking about metrics? They are stored in the site directory in these files:

~/var/check_mk/rrd/HOSTNAME/SERVICE.rrd
~/var/check_mk/rrd/HOSTNAME/SERVICE.info

The *.info file contains some description and the *.rrd file the actual data.

Usually the files contain the data for all the graphs of a given service. So in your case both the “old” data and the “new” data is stored in these files.

By far the easiest way to get rid of the old data is to stop the site and delete these two files completely, i.e.:

omd stop
rm ~/var/check_mk/rrd/HOSTNAME/SERVICE.*
omd start

The files will be re-created automatically.

However, this will also delete the “new” data collected so far.


If you prefer to keep the “new” data, then it might get a bit complicated but here’s a description: [Check_mk (deutsch)] Performance Data gezielt löschen (it’s in German, though).

Thank you!

That was super simple, I was able to just remove the values from the .info under METRICS= and it does not show up anymore. This seams to keep the “old” data, but it was only a few data points, so I assume to be not a big deal.

Thank you very much!

Good to hear. I’m not sure if I understood correctly: you changed the *.info file but left the *.rrd file untouched? Maybe you get into trouble now if you add another metric (a third one) to the check.

It works like so:

In the *.info file under METRICS is a ;-separated list of metrics and in the *.rrd file is the corresponding data.
So the first metric from *.info belongs to the first dataset in the rrd file,
the second metric from *.info belongs to the second dataset in the rrd file, and so on.

If you just edit one of the files, they might get out of sync and checkmk might get confused.

But if it works for you, it works :slightly_smiling_face:

1 Like

You are correct!
It looked good at first, just took another look and it did not get any new data.

Thanks for the info!
Removing both worked now, with no issue.

Is there a way to reorder the metrics? I see that they are sorted alphabetically by default.

No, I don’t think you can change the order.

That’s a bummer, but thanks for the awesome help! :smiley:

1 Like