chore(KubernetesOutOfCapacity alert): Don't include pods that are not running

This commit is contained in:
Gustavo Motizuki 2021-04-13 11:42:40 +12:00
parent c3ba0cf199
commit b9d6131697

View file

@ -1498,7 +1498,7 @@ groups:
for: 2m
- name: Kubernetes out of capacity
description: "{{ $labels.node }} is out of capacity"
query: 'sum(kube_pod_info) by (node) / sum(kube_node_status_allocatable_pods) by (node) * 100 > 90'
query: 'sum by (node) ((kube_pod_status_phase{phase="Running"} == 1) + on(pod, namespace) group_left(node) (0 * kube_pod_info)) / sum(kube_node_status_allocatable_pods) by (node) * 100 > 90'
severity: warning
for: 2m
- name: Kubernetes Job failed