FIX KubernetesPodnothealthy Alert

Kube state metrics assigns value of current pod phase with 1, so according to that Kubernetes Pod not healthy fixed.
This commit is contained in:
Selçuk Arıbalı 2020-04-02 21:01:04 +03:00 committed by GitHub
parent c20227b458
commit c98a04784e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -986,7 +986,7 @@ groups:
severity: warning
- name: Kubernetes Pod not healthy
description: Pod has been in a non-ready state for longer than an hour.
query: 'min_over_time(sum by (namespace, pod) (kube_pod_status_phase{phase=~"Pending|Unknown|Failed"})[1h:])'
query: 'min_over_time(sum by (namespace, pod) (kube_pod_status_phase{phase=~"Pending|Unknown|Failed"} == 1)[1h:])'
severity: error
- name: Kubernetes pod crash looping
description: Pod {{ $labels.pod }} is crash looping