Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear old data in Grafana

Tags:

grafana

I'm using Prometheus and Grafana for monitoring the servers. Grafana data were stored in /home/user/data folder.

This folder occupied the majority of the file system .

Need to remove the old data in Grafana data folder ( Data which is older than a month )

like image 519
soundararajan.c Avatar asked Dec 04 '17 09:12

soundararajan.c


People also ask

How do I delete old Grafana data?

If your Grafana's datasource is prometheus, you can stop prometheus, delete content of this path, start prometheus again and restart grafana If you have data for more than 15 days, then you set storage retention. reducing it to less value will delete the data before the specified time.

How do I clear my Grafana dashboard?

In the Dashboards/Manage tab, select the dashboard(s) you want to delete. Then click Delete. In the message that appears to confirm whether you want to delete the dashboard, click Delete.

How do I delete Prometheus data?

Prometheus: How to delete data from Prometheus If you have scrape some data that you do not need anymore, you can delete them using the admin API. ⚠️ Once you have deleted data, there is no way to retrieve them. You should be very careful before validating such a query!

Does Grafana store data?

No; Grafana is not a data store; it is a visualisation tool.


1 Answers

Grafana does not save data from Prometheus. It queries Prometheus and displays UI. In this case, you would have to look at purging Prometheus data.

Prometheus by default has a 15 day retention period. But this could be adjusted by the -storage.local.retention flag to suit your needs.

like image 117
CGS Avatar answered Sep 28 '22 05:09

CGS