Single timeseries for a label having different values

18 views
Skip to first unread message

PK

unread,
Sep 15, 2021, 7:16:52 AM9/15/21
to Prometheus Users
Hi everyone, Can anyone help me out in this.
I want a single time series for different combinations of label values. Is it possible in Prometheus?
For example

let's say I want to display person name with salary. Here name will be label and salary will be metric value:
metric__person(name:"abc") 40000
metric__person(name:"xyz") 60000

I want them in a single line in the Prometheus graph where on value 40000, it shows the abc and on 60000 it should show xyz.

For this, I am getting like this: (prom example1)
I want like:(prom example2)

prom example2.PNG
prom example1.PNG

Stuart Clark

unread,
Sep 15, 2021, 7:24:13 AM9/15/21
to PK, Prometheus Users
On 2021-09-15 12:16, PK wrote:
> Hi everyone, Can anyone help me out in this.
> I want a single time series for different combinations of label
> values. Is it possible in Prometheus?
> For example
>
> let's say I want to display person name with salary. Here name will be
> label and salary will be metric value:
> metric__person(name:"abc") 40000
> metric__person(name:"xyz") 60000
>
> I WANT THEM IN A SINGLE LINE IN THE PROMETHEUS GRAPH WHERE ON VALUE
> 40000, IT SHOWS THE ABC AND ON 60000 IT SHOULD SHOW XYZ.
>
> For this, I am getting like this: (prom example1)
> I want like:(prom example2)
>

That sounds like you are wanting a different type of database to a
timeseries database, and also it isn't looking to be th emonitoring type
use case that Prometheus is designed for.

A time series database would have time as the X axis in a graph, as it
is expected that the value will be varying over time, with labels able
to group together related time series (e.g. different servers running
the same software).

--
Stuart Clark
Reply all
Reply to author
Forward
0 new messages