the same metric with different labels override each other

20 views
Skip to first unread message

Baitanik Talukder

unread,
Jun 25, 2020, 8:58:32 AM6/25/20
to Prometheus Users
Hello, 
I have metric like ::

  count  = Gauge( "testing", 'test', registry=registry,
                 labelnames=["target"])
 count.labels(target = "abc").set(4)


  count  = Gauge( "testing", 'test', registry=registry,
                 labelnames=["target"])
 count.labels(target = "xyz").set(7)
 
push_to_gateway("http://pushgateway.io", job="testing_job", registry=registry)

if I execute both only the last one is there in pushgateway.. 
how do I keep both values in pushgateway ?

Thanks and regards,
Baitanik

sayf eddine Hammemi

unread,
Jun 25, 2020, 10:13:24 AM6/25/20
to Baitanik Talukder, Prometheus Users
Dont redefine the variable

--
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/59852a44-c7e6-49ae-aedc-5dd4132d2752o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages