|
| 1 | +--- |
| 2 | +$schema: /openshift/prometheus-rule-1.yml |
| 3 | +apiVersion: monitoring.coreos.com/v1 |
| 4 | +kind: PrometheusRule |
| 5 | +metadata: |
| 6 | + labels: |
| 7 | + prometheus: app-sre |
| 8 | + role: alert-rules |
| 9 | + name: obsctl-reloader-production |
| 10 | +spec: |
| 11 | + groups: |
| 12 | + - name: obsctl-reloader.rules |
| 13 | + rules: |
| 14 | + - alert: ObsCtlRulesStoreServerError |
| 15 | + annotations: |
| 16 | + dashboard: https://grafana.app-sre.devshift.net/d/no-dashboard/obsctl-reloader.rules?orgId=1&refresh=10s&var-datasource={{$externalLabels.cluster}}-prometheus&var-namespace={{$labels.namespace}}&var-job=All&var-pod=All&var-interval=5m |
| 17 | + description: Failed to send rules from tenant {{ $labels.tenant }} to store {{ $value | humanizePercentage }}% of the time with a 5xx or 4xx status code. |
| 18 | + message: Failed to send rules from tenant {{ $labels.tenant }} to store {{ $value | humanizePercentage }}% of the time with a 5xx or 4xx status code. |
| 19 | + runbook: https://github.com/rhobs/configuration/blob/main/docs/sop/observatorium.md#obsctlrulesstoreservererror |
| 20 | + summary: Failing to send rules to Observatorium. |
| 21 | + expr: | |
| 22 | + ( |
| 23 | + sum_over_time(obsctl_reloader_prom_rules_store_ops_total{status_code=~"5..|4..", job="rules-obsctl-reloader"}[5m]) |
| 24 | + / |
| 25 | + sum(sum_over_time(obsctl_reloader_prom_rules_store_ops_total{job="rules-obsctl-reloader"}[5m])) |
| 26 | + ) or vector(0) |
| 27 | + > 0.10 |
| 28 | + for: 10m |
| 29 | + labels: |
| 30 | + service: telemeter |
| 31 | + severity: critical |
| 32 | + - alert: ObsCtlRulesSetFailure |
| 33 | + annotations: |
| 34 | + dashboard: https://grafana.app-sre.devshift.net/d/no-dashboard/obsctl-reloader.rules?orgId=1&refresh=10s&var-datasource={{$externalLabels.cluster}}-prometheus&var-namespace={{$labels.namespace}}&var-job=All&var-pod=All&var-interval=5m |
| 35 | + description: obsctl-reloader is failing to set rules for tenant {{ $labels.tenant }} before reaching Observatorium {{ $value | humanizePercentage }}% of the time due to {{ $labels.reason }}. |
| 36 | + message: obsctl-reloader is failing to set rules for tenant {{ $labels.tenant }} before reaching Observatorium {{ $value | humanizePercentage }}% of the time due to {{ $labels.reason }}. |
| 37 | + runbook: https://github.com/rhobs/configuration/blob/main/docs/sop/observatorium.md#obsctlrulessetfailure |
| 38 | + summary: Failing to set rules due to issue before talking to Observatorium. |
| 39 | + expr: | |
| 40 | + ( |
| 41 | + sum_over_time(obsctl_reloader_prom_rule_set_failures_total{reason!="rules_store_error", job="rules-obsctl-reloader"}[5m]) |
| 42 | + / |
| 43 | + sum_over_time(obsctl_reloader_prom_rule_set_total{job="rules-obsctl-reloader"}[5m]) |
| 44 | + ) or vector(0) |
| 45 | + > 0.10 |
| 46 | + for: 10m |
| 47 | + labels: |
| 48 | + service: telemeter |
| 49 | + severity: medium |
| 50 | + - alert: ObsCtlFetchRulesFailed |
| 51 | + annotations: |
| 52 | + dashboard: https://grafana.app-sre.devshift.net/d/no-dashboard/obsctl-reloader.rules?orgId=1&refresh=10s&var-datasource={{$externalLabels.cluster}}-prometheus&var-namespace={{$labels.namespace}}&var-job=All&var-pod=All&var-interval=5m |
| 53 | + description: obsctl-reloader is failing to fetch rules via the PrometheusRule CRD in the local cluster. |
| 54 | + message: obsctl-reloader is failing to fetch rules via the PrometheusRule CRD in the local cluster. |
| 55 | + runbook: https://github.com/rhobs/configuration/blob/main/docs/sop/observatorium.md#obsctlfetchrulesfailed |
| 56 | + summary: Failing to fetch rules from the local cluster. |
| 57 | + expr: | |
| 58 | + ( |
| 59 | + sum_over_time(obsctl_reloader_prom_rule_fetch_failures_total{job="rules-obsctl-reloader"}[5m]) |
| 60 | + / |
| 61 | + sum_over_time(obsctl_reloader_prom_rule_fetches_total{job="rules-obsctl-reloader"}[5m]) |
| 62 | + ) or vector(0) |
| 63 | + > 0.20 |
| 64 | + for: 5m |
| 65 | + labels: |
| 66 | + service: telemeter |
| 67 | + severity: critical |
0 commit comments