From 9fe2a368604a2a125a8875544fb3f20f1de0c49f Mon Sep 17 00:00:00 2001 From: Alejandro Escobar Date: Thu, 5 Mar 2020 10:44:14 -0800 Subject: [PATCH] Workaround for PrometheusRuleFailures alert #D2IQ-65026 (#489) * Deleted status_class_5xx for rate3d * Changed the chart version to 8.7.4 Co-authored-by: Ashot <32540363+aayvazyan@users.noreply.github.com> Co-authored-by: Alejandro Escobar --- staging/prometheus-operator/Chart.yaml | 2 +- .../rules-1.14/kube-apiserver-error.yaml | 22 ------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/staging/prometheus-operator/Chart.yaml b/staging/prometheus-operator/Chart.yaml index e8b91e54c..fd0a1ad25 100644 --- a/staging/prometheus-operator/Chart.yaml +++ b/staging/prometheus-operator/Chart.yaml @@ -12,7 +12,7 @@ sources: - https://github.com/coreos/kube-prometheus - https://github.com/coreos/prometheus-operator - https://coreos.com/operators/prometheus -version: 8.7.3 +version: 8.7.4 appVersion: 0.35.0 tillerVersion: ">=2.12.0" home: https://github.com/coreos/prometheus-operator diff --git a/staging/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-error.yaml b/staging/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-error.yaml index baa6b79e2..3fd578184 100644 --- a/staging/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-error.yaml +++ b/staging/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-error.yaml @@ -49,12 +49,6 @@ spec: and status_class_5xx:apiserver_request_total:ratio_rate2h{job="apiserver"} > (3*0.010000) ) - or - ( - status_class_5xx:apiserver_request_total:ratio_rate3d{job="apiserver"} > (0.010000) - and - status_class_5xx:apiserver_request_total:ratio_rate6h{job="apiserver"} > (0.010000) - ) labels: job: apiserver severity: warning @@ -112,15 +106,6 @@ spec: labels: job: apiserver record: status_class:apiserver_request_total:rate1d - - expr: |- - sum by (status_class) ( - label_replace( - rate(apiserver_request_total{job="apiserver"}[3d] - ), "status_class", "${1}xx", "code", "([0-9])..") - ) - labels: - job: apiserver - record: status_class:apiserver_request_total:rate3d - expr: |- sum(status_class:apiserver_request_total:rate5m{job="apiserver",status_class="5xx"}) / @@ -163,11 +148,4 @@ spec: labels: job: apiserver record: status_class_5xx:apiserver_request_total:ratio_rate1d - - expr: |- - sum(status_class:apiserver_request_total:rate3d{job="apiserver",status_class="5xx"}) - / - sum(status_class:apiserver_request_total:rate3d{job="apiserver"}) - labels: - job: apiserver - record: status_class_5xx:apiserver_request_total:ratio_rate3d {{- end }} \ No newline at end of file