Prune Promethues data

Please, describe the problem here and provide additional information below (if applicable) …

I am doing some house keeping and notice that my promethues is taking quite a bit of disk space.

4.1G /var/lib/prometheus/data
4.1G /var/lib/prometheus

Versions of the related components and OS (frontend, hypervisors, VMs):

v7.01

Steps to reproduce:

Current results:

Expected results:

whats the safest way to prune the data

Hello @hoosain,

This is probably more for Prometheus than for OpenNebula :wink:

Prometheus doesn’t have a built-in “prune now” button for existing historical data… it manages old data automatically based on your retention settings.
From what I could investigate, by default Prometheus keep a 15 days track of data.

You can set a shorter retention policy, by configuring this on Prometheus, or you can manually delete the data (which is not recommendable).

So basically, the suggestion is to update your retention settings, and then restart prometheus to check if the old data has been cleaned up.

Regards,