Clear old data in Grafana

心已入冬 提交于 2019-12-06 02:29:27

Grafana does not saves 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

According to official documentation of Prometheus:

--storage.tsdb.path: This determines where Prometheus writes its database. Defaults to data/

--storage.tsdb.retention: This determines when to remove old data. Defaults to 15d

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!