Combining multiple metric to show on one graph in Prometheus

33 views
Skip to first unread message

PK

unread,
Sep 15, 2021, 5:15:08 AM9/15/21
to Prometheus Users
Hey everyone, Can anyone help me with this:

I want to combine two metrics in such a way that both should be displayed on one graph in Prometheus. For eg:
 metric_one{label1:value1} 123
 metrci_two{label2:value2} 345
  
I want these metrics should be displayed on one graph in Prometheus.
The collect() function for this is as:

Collect()
 ch<-prometheus.MustNewConstMetric(c.metric1,prometheus.CounterValue,float64(123))
 ch<-prometheus.MustNewConstMetric(c.metric2,prometheus.CounterValue,float64(345))
}

Brian Candler

unread,
Sep 15, 2021, 1:06:16 PM9/15/21
to Prometheus Users
Reply all
Reply to author
Forward
0 new messages