Reputation: 37
[Prometheus] Hello! I intend to expose to Prometheus the same metric but with different labels, for example:
m2{device="A"} 25 1513076400000
m2{device="B"} 20 1513075500000
m2{device="C"} 18 1513078680000
These three elements refer to the same timeserie or 3 different timeseries? And why?
Thank you!
Upvotes: 1
Views: 1232
Reputation: 21035
Quoting from the prometheus data model intro:
Every time series is uniquely identified by its metric name and a set of key-value pairs, also known as labels.
So your three elements are three separate time series. The reason this is better than one big string (eg: m2_device_B
) is that labels make manipulation of related metrics much simpler (eg: sum by label
).
Upvotes: 1