Prometheus Users

23 views
Skip to first unread message

Yashaswini K

unread,
Dec 17, 2022, 3:50:55 AM12/17/22
to Prometheus Users
Hi Team,


Need one help, i would need to write a query which will check pod status for all cluster operator pods for all operator namespaces and trigger an alert along with details all of them are down or whichever pod is down.

below query can be used for the same? will it print whichever pod is down 

absent(kube_pod_info{pod=~".*authentication-operator.*|.*etcd-operator.*|.*ingress-operator.*|.*kube-apiserver-operator.*|.*kube-controller-manager-operator.*|.*kube-scheduler-operator.*|.*kube-storage-version-migrator-operator.*|.*monitoring-operator.*|.*network-operator.*|.*openshift-apiserver-operator.*|.*openshift-controller-manager-operator.*|.*cloud-credential-operator.*|.*cluster-autoscaler-operator.*|.*openshift-config-operator.*|.*console-operator.*|.*machine-api-operator.*|.*machine-approver.*|.*machine-config-operator.*|.*node-tuning-operator.*|.*storage-operator.*|.*prometheus-operator.*"}) == 1

 

Reply all
Reply to author
Forward
0 new messages