Re: [prometheus-users] how to get count of no.of instance

2024-05-28 Thread 'Brian Candler' via Prometheus Users
Those mangled screenshots are no use. What I would need to see are the actual results of the two queries, from the Prometheus web interface (not Grafana), in plain text: e.g. foo{bar="baz",qux="abc"} 42.0 ...with the *complete* set of labels, not expurgated. That's what's needed to formulate t

Re: [prometheus-users] how to get count of no.of instance

2024-05-26 Thread 'Brian Candler' via Prometheus Users
The labels for the two sides of the division need to match exactly. If they match 1:1 except for additional labels, then you can use xxx / on (foo,bar) yyy # foo,bar are the matching labels or xxx / ignoring (baz,qux) zzz # baz,qux are the labels to ignore If they match N:1 then you need to u

Re: [prometheus-users] how to get count of no.of instance

2024-05-26 Thread Sameer Modak
I tried the same i m not getting any data post adding below sum(kafka_consumergroup_lag{cluster=~"$cluster",consumergroup=~ "$consumergroup",topic=~"$topic"}) by (consumergroup, topic) / count(up{job= "prometheus.scrape.kafka_exporter"}) On Saturday, May 25, 2024 at 11:53:44 AM UTC+5:30 Ben Koch

Re: [prometheus-users] how to get count of no.of instance

2024-05-24 Thread Ben Kochie
You can use the `up` metric sum(...) / count(up{job="kafka"}) On Fri, May 24, 2024 at 5:53 PM Sameer Modak wrote: > Hello Team, > > I want to know the no of instance data sending to prometheus. How do i > formulate the query . > > > Basically i have below working query but issues is we have 6

[prometheus-users] how to get count of no.of instance

2024-05-24 Thread Sameer Modak
Hello Team, I want to know the no of instance data sending to prometheus. How do i formulate the query . Basically i have below working query but issues is we have 6 instances hence its summing value of all instances. Instead we just need value from one instance. sum(kafka_consumergroup_lag{