Hi BrianThanx , i kinda got to the same query but im seeing something weird.request_process_time{stack=~"failoversvc.*"} and lock_state{stack=~"failoversvc.*"} == 1 <------- this gives me no resultButrequest_process_time{stack=~"failoversvc.*"} and on (stack,instance) lock_state{stack=~"failoversvc.*"} == 1 <------ gives me dataCan you help me understand what is keyword `on` doing or what is it adding to the mix?
Regards
On Tuesday, March 14, 2017 at 9:35:41 AM UTC-7, Brian Brazil wrote:On 14 March 2017 at 16:15, Meher Garda <meher...@gmail.com> wrote:HiWe have a service setup in active/passive mode.Each service spits out two metrics, lock_state and request_process_timeboth these metrics have the following common labels: env (dev or qa or prod) , instance (instance ip) , stack (consul service name )With querylock_state{stack=~"failoversvc.*"} == 1 , I can find out which instance has the lock and is activeWith queryrequest_process_time{stack=~"failoversvc.*"} , I can get the value for this metricIs it possible, to run the second query only for the instance which has the lock ?
request_process_time{stack=~"failoversvc.*"} and lock_state{stack=~"failoversvc.*"} == 1
--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/24986391-a2ec-4ba1-a6da-d1858d570019%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/24986391-a2ec-4ba1-a6da-d1858d570019%40googlegroups.com.