Prometheus appending metric_name to timeseries

9 views
Skip to first unread message

ryan woods

unread,
Jun 29, 2020, 7:40:43 AM6/29/20
to Prometheus Users
Hey guys,

I seem to be running into a strange issue where Prometheus is adding a 'metric_name' label to a timeseries but instead of updating the existing one it creates a new timeseries (See attached screenshot). This is causing issues in Grafana as single stat panels can only understand a single timeseries and not multiple.

What would be causing prometheus to do this?


Thanks,
Ryan
Screenshot 2020-06-29 at 12.39.27.png

Ben Kochie

unread,
Jun 29, 2020, 8:54:44 AM6/29/20
to ryan woods, Prometheus Users
I don't think this is anything that Prometheus does automatically. My guess is that it is a relabeling issue, can you share the relevant portion of your prometheus.yml?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/26212b98-2166-4fb7-bb08-a5d47e80a209o%40googlegroups.com.

Brian Candler

unread,
Jun 29, 2020, 5:08:45 PM6/29/20
to Prometheus Users
On Monday, 29 June 2020 12:40:43 UTC+1, ryan woods wrote:
I seem to be running into a strange issue where Prometheus is adding a 'metric_name' label to a timeseries but instead of updating the existing one it creates a new timeseries

That's standard behaviour.  A timeseries is uniquely identified by its set of labels: e.g. these are two different timeseries

foo{bar="xyz"}
foo{bar="xyz",baz="123"}

Therefore, if you change the labels, then you have made a new timeseries, by definition.  Over time, the old one will age out.
Reply all
Reply to author
Forward
0 new messages