Change label of specific metric inside prometheus and VM database

89 views
Skip to first unread message

Lukáš Míča

unread,
Mar 17, 2023, 11:24:22 AM3/17/23
to Prometheus Users
Hello,
I would like to ask you, if is it possible additionaly change label values of metrics which were already scraped inside prometheus and Victoria Metrics database.
Thank you for the response
Lukáš

Brian Candler

unread,
Mar 17, 2023, 11:44:37 AM3/17/23
to Prometheus Users
[Talking about prometheus only here]

You can change labels within PromQL expressions in queries:

And you can use recording rules to generate new timeseries with the result of those queries.

But changing the labels *inside* the database on *already scraped* data? I haven't seen anything like that.

If you can export and re-ingest the corrected data, e.g. using backfilling, then you can delete the old timeseries.

Serg

unread,
Mar 26, 2023, 2:24:18 AM3/26/23
to promethe...@googlegroups.com, Lukáš Míča
Stored series could not be further altered. Although you can delete them
using HTTP API:
https://prometheus.io/docs/prometheus/latest/querying/api/#delete-series
> --
> You received this message because you are subscribed to the Google
> Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to prometheus-use...@googlegroups.com
> <mailto:prometheus-use...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/92e1b938-9a9d-4798-b633-444d4751e414n%40googlegroups.com <https://groups.google.com/d/msgid/prometheus-users/92e1b938-9a9d-4798-b633-444d4751e414n%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages