diff --git a/assets/prometheus-operator/alerts.yaml b/assets/prometheus-operator/alerts.yaml index 92fc1f2..c4fcb1d 100644 --- a/assets/prometheus-operator/alerts.yaml +++ b/assets/prometheus-operator/alerts.yaml @@ -13,11 +13,11 @@ groups: severity: warning - alert: PrometheusOperatorReconcileErrors annotations: - description: Errors while reconciling {{ $labels.controller }} in {{ $labels.namespace - }} Namespace. + description: '{{ $value | humanizePercentage }} of reconciling operations failed + for {{ $labels.controller }} controller in {{ $labels.namespace }} namespace.' summary: Errors while reconciling controller. expr: | - rate(prometheus_operator_reconcile_errors_total{job="prometheus-operator"}[5m]) > 0.1 + (sum by (controller,namespace) (rate(prometheus_operator_reconcile_errors_total{job="prometheus-operator"}[5m])) / (sum by (controller,namespace) (rate(prometheus_operator_reconcile_operations_total{job="prometheus-operator"}[5m])) > 0.1 for: 10m labels: severity: warning diff --git a/site/content/prometheus-operator/_index.md b/site/content/prometheus-operator/_index.md index 0b7edb5..a6e2f47 100644 --- a/site/content/prometheus-operator/_index.md +++ b/site/content/prometheus-operator/_index.md @@ -38,11 +38,11 @@ labels: {{< code lang="yaml" >}} alert: PrometheusOperatorReconcileErrors annotations: - description: Errors while reconciling {{ $labels.controller }} in {{ $labels.namespace - }} Namespace. + description: '{{ $value | humanizePercentage }} of reconciling operations failed + for {{ $labels.controller }} controller in {{ $labels.namespace }} namespace.' summary: Errors while reconciling controller. expr: | - rate(prometheus_operator_reconcile_errors_total{job="prometheus-operator"}[5m]) > 0.1 + (sum by (controller,namespace) (rate(prometheus_operator_reconcile_errors_total{job="prometheus-operator"}[5m])) / (sum by (controller,namespace) (rate(prometheus_operator_reconcile_operations_total{job="prometheus-operator"}[5m])) > 0.1 for: 10m labels: severity: warning