Improve KubernetesOutOfCapacity alert (#211)

This commit is contained in:
Gustavo Kazuo Motizuki 2021-05-02 05:27:46 +12:00 committed by GitHub
parent 97c48862d7
commit 18672ff0f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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