prometheusgrafanapromqltelemetry

How to exclude multiple labels from Prometheus Query?


I want to exclude mulitple app groups from my query... Not sure how to go about it.. My thoughts are like this

count(master_build_state{app_group~! "oss-data-repair", "pts-plan-tech-solution", kubernets_namespace = "etc"} ==0) 

I do not want to include those two app_groups, but am not sure how to implement in PromQL. You would thing to add () or [], but it throws errors. Let me know if anyone can help!

Thanks


Solution

  • count(master_build_state{app_group !~ "(oss-data-repair|pts-plan-tech-solution)", kubernets_namespace="etc"} ==0)