2 operator conditions in single query

6 views
Skip to first unread message

sunils...@gmail.com

unread,
Feb 8, 2021, 7:56:49 PM2/8/21
to Prometheus Users
I have to query servers with memory utilization between 70-80  % . 
I can query them separately but how can I combine both the queries . 

I tried : 
mem_used_percent{host="hostname"} >= 70
mem_used_percent{host="hostname"} <= 80

Ben Kochie

unread,
Feb 9, 2021, 2:33:32 AM2/9/21
to sunils...@gmail.com, Prometheus Users
mem_used_percent{host="hostname"} >= 70 and mem_used_percent{host="hostname"} <= 80

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/b1dead7c-bafe-4641-9fb4-cdd542c6da74n%40googlegroups.com.

Sagar

unread,
Feb 10, 2021, 3:21:55 AM2/10/21
to Ben Kochie, Prometheus Users
Hi Ben, 

Thank you , it worked . 

Thanks 
Reply all
Reply to author
Forward
0 new messages