On 25 Feb 11:57, Sebastian Glock wrote:
> Hi, is there any option to insert 2 instances in 1 query? Something like
> that:
>
> ```
> (100 - avg_over_time(probe_success{instance="instance1" , "instance2"}[5m])
> * 100)
>
> ```
>
> I want to set query just for 2 insances of 10 and I'm looking for
> possibilities :)
> And yes i need it in just ONE query, not 2 not 3 :)
Sorry the mail was gone too fast
You can use a regex to do this:
(100 - avg_over_time(probe_success{instance=~"instance1|instance2"}[5m])
* 100)
You will keep the instance name in the resulting vector.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/2fd6e70b-7471-4570-8d53-2a4a417f4eb8n%40googlegroups.com.
--
Julien Pivotto
@roidelapluie
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/20210225200844.GA1100299%40oxygen.