Grafana dashboard showing deleted information from prometheus

守給你的承諾、 提交于 2019-12-24 19:29:16

问题


I'm using grafana and prometheus to monitor my app which is installed on aws. when upgrading my app I receive a new instance id for my machine. while prometheus is updated with the new instance id, grafana still shows the old instance id in addition to the new one.

How can I clear old and unnecessary inforamtion from grafana?

I get the instance id as parameter by running the following query:

label_values(cts_per_processor_task_duration_seconds_sum{job="octane-apps",region="$region"}, instance)

From what I see, it is not deleted from the dashboard JSON file.

THANKS!


回答1:


The new instance is also monitored by prometheus, but the "old" data is still in the storage. There is a default data retention time of 15 days, so all the data for your old machine should be gone after that period automatically. Being able to compare data of the old version of your app (historical) with current data is a nice feature though, why do you want to get rid of the data immediately? If you just like to "hide" it in certain graphs or boards, add a template variable and then use the select box to filter your machines.



来源:https://stackoverflow.com/questions/54731984/grafana-dashboard-showing-deleted-information-from-prometheus

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