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!
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.