up{instance=~"$instance"} == 1 == 0     # technically valid expression, but 
useless because it always gives zero results

What are you actually trying to do?  If this is something to do with 
Grafana then you're probably going about it the wrong way. In particular, 
Grafana lets you build a single panel with multiple queries.

On Monday, 12 September 2022 at 14:56:25 UTC+1 [email protected] wrote:

> Hello all,
>
> Can we apply filters in the prometheus query?
>
> I had a query up{instance=~"$instance"}
>
> for reachable up{instance=~"$instance"} == 1
> for unreachable up{instance=~"$instance"} == 0
>
> Can I combine the above two queries conditions (==0 and ==1) in a single 
> query?
>
> Thanks & regards,
> Bharath Kumar.
>
>

-- 
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/3f257e15-d1c0-469d-a96f-7d3fe2322ac1n%40googlegroups.com.

Reply via email to