Troubleshooting
Real SRE & Reliability errors and symptoms: likely causes, diagnosis, fix and prevention
Prometheus SLIs & Recording Rules
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q1 You applied a PrometheusRule for your SLO, but slo:sli_error:ratio_rate5m returns nothing in Prometheus.
Beginner
PrometheusRule for your SLO, but slo:sli_error:ratio_rate5m returns nothing in Prometheus.Likely causes โ The Prometheus Operator is not selecting the rule (label mismatch with ruleSelector), the rule is in a namespace outside ruleNamespaceSelector, or the expression itself returns no data.
Diagnose โ
kubectl get prometheus -n monitoring -o jsonpath='{.items[0].spec.ruleSelector}'
kubectl get prometheusrule -A --show-labels | grep checkout
curl -s localhost:9090/api/v1/rules | jq '.data.groups[].name'Fix โ Add the label the selector expects (kube-prometheus-stack defaults to release: <helm-release-name>), or install the chart with prometheus.prometheusSpec.ruleSelectorNilUsesHelmValues=false so all rules are picked up. If the group is loaded but empty, run the raw expression in the Prometheus UI and fix the selectors.
Prevent โ Keep a CI check that the rule group appears in /api/v1/rules after deploy, and standardize rule labels in a template.
Q2 promtool check rules fails with could not parse expression: 1:72: parse error: unexpected right parenthesis ')'.
Beginner
promtool check rules fails with could not parse expression: 1:72: parse error: unexpected right parenthesis ')'.Likely causes โ Unbalanced parentheses or braces in a multi-line PromQL expression, often after editing a long burn-rate and/or expression, or YAML folding (>) joining lines in an unexpected way.
Diagnose โ
promtool check rules slo-rules.yaml
promtool query instant http://localhost:9090 '<paste the expression>'The 1:72 is line:column inside the expression, not the YAML file.
Fix โ Use the literal block scalar | for multi-line expressions, align parentheses one level per line, and test the expression in the Prometheus UI first.
Prevent โ Run promtool check rules and promtool test rules in CI on every change; generate SLO rules with Sloth or Pyrra instead of hand-editing.
Q3 The availability SLI panel shows NaN every night between 02:00 and 05:00.
Beginner
NaN every night between 02:00 and 05:00.Likely causes โ Zero traffic in the window: 0 / 0 is NaN in PromQL. Alerts comparing NaN > threshold are silently false.
Diagnose โ
sum(rate(http_requests_total{job="checkout"}[5m]))If it is 0 during those hours, the ratio is undefined.
Fix โ For dashboards, display "no traffic" by using longer windows or wrapping with or vector(0) only for the error side. For alerting, keep NaN (no traffic means no failed users) but add a traffic-drop alert and synthetic probes so a total outage at night is still detected.
Prevent โ Every SLO gets a companion traffic-drop or absent() alert, and synthetic checks for low-traffic periods.
Q4 Your per-route SLI query fails with found duplicate series for the match group {route="/api/checkout"} on the right hand-side of the operation.
Intermediate
found duplicate series for the match group {route="/api/checkout"} on the right hand-side of the operation.Likely causes โ Division with one-to-one matching where the right side has several series per route (for example still split by instance or code) because it was not aggregated to the same labels as the left side.
Diagnose โ Run each side alone and compare the label sets:
sum by (route) (rate(http_requests_total{job="checkout",code=~"5.."}[5m]))
rate(http_requests_total{job="checkout"}[5m])Fix โ Aggregate both sides to identical labels:
sum by (route) (rate(http_requests_total{job="checkout",code=~"5.."}[5m]))
/
sum by (route) (rate(http_requests_total{job="checkout"}[5m]))Prevent โ In recording rules always use explicit sum by (...) on numerator and denominator with the same label list.
Q5 Prometheus logs vector contains metrics with the same labelset after applying rule labels for your SLI recording rule.
Advanced
vector contains metrics with the same labelset after applying rule labels for your SLI recording rule.Likely causes โ The rule's labels: block overwrites a label that distinguishes series in the result. For example, the expression returns one series per code, and the rule sets code: "all", so all results collapse to the same labelset.
Diagnose โ
kubectl logs -n monitoring prometheus-monitoring-kube-prometheus-prometheus-0 -c prometheus | grep "same labelset"Run the expression without the rule labels and inspect which labels vary.
Fix โ Aggregate away the varying label in the expression (sum without (code) (...)) or choose a rule label name that does not clash.
Prevent โ Make SLI recording rules return exactly one series per SLO (or per explicit dimension) and unit test them with promtool test rules.
Q6 Your latency SLI using le="0.3" returns an empty result, but the histogram exists.
Intermediate
le="0.3" returns an empty result, but the histogram exists.Likely causes โ 0.3 seconds is not a bucket boundary. The histogram may only have 0.25 and 0.5 buckets, or the le value is formatted differently ("0.30", or "1.0" vs "1" for whole numbers in some client libraries).
Diagnose โ
count by (le) (http_request_duration_seconds_bucket{job="checkout"})Fix โ Either add a 0.3 bucket in the instrumentation and redeploy, or align the SLO threshold with an existing bucket (for example 250 ms). Match the exact le string.
Prevent โ Define histogram buckets together with SLO thresholds; document the bucket layout in the SLO document. Native histograms in recent Prometheus versions remove most of this pain.
Q7 The SLI ratio is above 1.0 (or the latency "good" ratio is 1.07).
Intermediate
Likely causes โ Numerator and denominator select different series: the good-events query includes a job, route, or instance that the total does not, or they come from different metrics with different label filters.
Diagnose โ Compare label selectors character by character, and check counts:
count(http_request_duration_seconds_bucket{le="0.3"})
count(http_request_duration_seconds_count)Fix โ Use identical selectors on both sides, and for latency use _bucket{le=X} and _count of the same histogram.
Prevent โ Generate rules from one SLO spec (Sloth/Pyrra) and add a promtool unit test asserting the ratio stays within 0 to 1.
Q8 Errors clearly appear in the logs, but the SLI shows zero 5xx for low-traffic routes.
Advanced
Likely causes โ Labeled counters are created lazily: the code="500" series appears only at the first error. rate() needs at least two samples, so the first increment of a new series is invisible, and on low-traffic routes most errors are "first errors" after each pod restart.
Diagnose โ
http_requests_total{job="checkout",code="500"}Check whether the series appears only after errors and with value 1.
Fix โ Pre-initialize expected label combinations at startup (for example REQS.labels(route, "500") in Python, or .WithLabelValues(...) in Go), so the series exists at 0 before any error.
Prevent โ Make counter initialization part of the instrumentation library and the service template.
Q9 A Grafana panel using rate(http_requests_total[30d]) fails with query processing would load too many samples into memory in query execution.
Intermediate
rate(http_requests_total[30d]) fails with query processing would load too many samples into memory in query execution.Likely causes โ A raw 30-day range over many series exceeds Prometheus' --query.max-samples limit (default 50,000,000).
Diagnose โ Count series behind the selector and estimate samples: series x (30d / scrape interval).
count(http_requests_total{job="checkout"})Fix โ Pre-aggregate with recording rules (record 5m rates per SLO, then compute longer windows from those, in a slow-evaluated group), drop unneeded labels, or use a long-term store (Thanos, Mimir) with downsampling.
Prevent โ Dashboards and alerts for SLOs read only recording rules, never raw high-cardinality metrics over long ranges.
Q10 prometheus_rule_group_iterations_missed_total keeps increasing for the SLO rule group.
Advanced
prometheus_rule_group_iterations_missed_total keeps increasing for the SLO rule group.Likely causes โ The group takes longer to evaluate than its interval, usually because long-window rules ([1d], [3d], [30d]) over raw metrics run every 30 seconds.
Diagnose โ
prometheus_rule_group_last_duration_seconds{rule_group=~".*slo.*"}
prometheus_rule_group_interval_seconds{rule_group=~".*slo.*"}Fix โ Split rules into groups by window: short windows (5m to 1h) at 30s, long windows (6h to 30d) in a separate group with interval: 5m. Build long windows from pre-recorded short-window sums where possible.
Prevent โ Alert on missed iterations and on group duration above 50% of interval.
Q11 Your new ServiceMonitor is applied, but the service never appears under Status โ Targets.
Beginner
Likely causes โ ServiceMonitor not selected by the Prometheus resource (labels or namespace selector), its selector.matchLabels does not match the Service labels, or endpoints.port refers to a port name the Service does not define.
Diagnose โ
kubectl get servicemonitor -n shop checkout -o yaml | yq '.spec'
kubectl get svc -n shop checkout -o yaml | yq '.metadata.labels, .spec.ports'
kubectl get prometheus -n monitoring -o jsonpath='{.items[0].spec.serviceMonitorSelector}'Fix โ Match labels exactly, use the named Service port (port: http), and add the release label or set serviceMonitorSelectorNilUsesHelmValues=false.
Prevent โ Ship a ServiceMonitor in the service Helm chart template, tested in CI against a kind cluster.
Q12 The target shows DOWN with server returned HTTP status 404 Not Found.
Beginner
server returned HTTP status 404 Not Found.Likely causes โ Wrong metrics path (the app serves /actuator/prometheus or /stats/prometheus, not /metrics), wrong port (scraping the app port instead of a separate metrics port), or metrics disabled in this build.
Diagnose โ
kubectl -n shop port-forward svc/checkout 8080:8080 &
curl -s -o /dev/null -w '%{http_code}\n' localhost:8080/metricsFix โ Set path: and port: correctly in the ServiceMonitor endpoint.
Prevent โ Standardize the metrics path and port across services in the platform template.
Q13 Scrapes fail intermittently with context deadline exceeded.
Intermediate
context deadline exceeded.Likely causes โ The /metrics endpoint takes longer than scrapeTimeout (default 10s): huge cardinality, expensive collectors, or a CPU-throttled pod.
Diagnose โ
time curl -s localhost:8080/metrics | wc -lscrape_duration_seconds{job="checkout"}
scrape_samples_scraped{job="checkout"}Fix โ Reduce cardinality (drop per-user or per-URL labels), raise CPU limits, or increase scrapeTimeout modestly (must stay below the interval).
Prevent โ Alert on scrape_duration_seconds approaching the timeout and on sample count growth.
Q14 Prometheus got OOMKilled after a developer added a user_id label to http_requests_total.
Intermediate
user_id label to http_requests_total.Likely causes โ Cardinality explosion: one series per user x route x code x pod.
Diagnose โ
topk(10, count by (__name__) ({__name__=~".+"}))
count(count by (user_id) (http_requests_total))Also check prometheus_tsdb_head_series before and after the deploy.
Fix โ Drop the label at scrape time while the code is fixed:
metricRelabelings:
- action: labeldrop
regex: user_idThen remove it from the instrumentation; per-user data belongs in logs or traces.
Prevent โ Set sampleLimit on ServiceMonitors, alert on head series growth, and review metric labels in code review.
Q15 After migrating from ingress-nginx to Gateway API with Envoy, the SLO dashboard is blank and no burn alerts fire.
Intermediate
Likely causes โ The recording rules reference nginx_ingress_controller_requests, which no longer exists. Empty results mean NaN/no data, so alerts silently never fire.
Diagnose โ
absent(nginx_ingress_controller_requests)
count by (__name__) ({__name__=~"envoy_.*rq.*"})Fix โ Rewrite the SLI recording rules for the new metric names (for example Envoy's upstream request counters by response code class), validate against a week of overlap data, then switch.
Prevent โ Add absent() alerts on every metric an SLO depends on, so a renamed or missing metric pages as "SLO blind".
Q16 A 1m-window recording rule returns empty results intermittently. Scrape interval is 30s.
Intermediate
Likely causes โ rate() needs at least two samples in the window. With a 30s scrape interval and a 1m window, any missed or delayed scrape leaves only one sample.
Diagnose โ
count_over_time(http_requests_total{job="checkout"}[1m])Fix โ Use windows of at least 4x the scrape interval (2m for 30s scrapes); that is why the shortest SLO window is usually 5m. In Grafana use $__rate_interval.
Prevent โ Lint recording rules for windows shorter than 4x scrape interval.
Q17 Joining SLI series with kube_pod_labels to add a team label fails with many-to-many matching not allowed: matching labels must be unique on one side.
Advanced
kube_pod_labels to add a team label fails with many-to-many matching not allowed: matching labels must be unique on one side.Likely causes โ Both sides have multiple series per matching key: kube_pod_labels can have duplicates (several kube-state-metrics replicas, or pods recreated with the same name), and the SLI side is not unique either.
Diagnose โ
count by (namespace, pod) (kube_pod_labels) > 1Fix โ Make one side unique with aggregation and use group_left:
sum by (namespace, pod) (rate(http_requests_total[5m]))
* on (namespace, pod) group_left(label_team)
max by (namespace, pod, label_team) (kube_pod_labels)Prevent โ Prefer static team labels via ServiceMonitor relabeling or podTargetLabels instead of runtime joins in SLO rules.
Q18 In Thanos, the request counts used for error-budget events are exactly double what the app logs show.
Advanced
Likely causes โ Two Prometheus HA replicas scrape the same targets, and the query runs without deduplication, so sum() counts each series twice. Ratios look right (both sides doubled), but absolute budget numbers are wrong.
Diagnose โ
count by (prometheus_replica) (http_requests_total{job="checkout"})Fix โ Enable deduplication in Thanos Query with --query.replica-label=prometheus_replica (and the dedup toggle in Grafana's data source), or aggregate max by replica before summing.
Prevent โ Configure the replica label consistently and verify event counts against a second source when building SLO reports.
Q19 promtool test rules reports FAILED: alertname: CheckoutErrorBudgetBurnFast, time: 10m, exp:[0: Labels:{alertname="CheckoutErrorBudgetBurnFast", severity="page"}], got:[].
Intermediate
promtool test rules reports FAILED: alertname: CheckoutErrorBudgetBurnFast, time: 10m, exp:[0: Labels:{alertname="CheckoutErrorBudgetBurnFast", severity="page"}], got:[].Likely causes โ At eval_time: 10m the alert is not yet firing: the input series do not have enough history for the [1h] window to exceed the threshold, the for: duration has not elapsed, or the expected labels miss labels the rule adds (like slo).
Diagnose โ Evaluate the recording rules at that time in the test with promql_expr_test, and print what the alert produces at later times.
Fix โ Move eval_time later (after the long window is above threshold plus for:), increase the error ratio in input_series, and list every label in exp_labels, including ones from recording rules.
Prevent โ Keep a positive and a negative test case per alert tier, and document expected detection time in the test.
Q20 Prometheus refuses to load the rules file: invalid recording rule name: slo-checkout-error-ratio-5m.
Beginner
invalid recording rule name: slo-checkout-error-ratio-5m.Likely causes โ Recording rule names must be valid metric names: letters, digits, underscores and colons only. Hyphens are not allowed.
Diagnose โ
promtool check rules slo-rules.yamlFix โ Rename following the level:metric:operations convention: slo:sli_error:ratio_rate5m.
Prevent โ Lint in CI with promtool check rules, and document the naming convention.
Burn-Rate Alerts & Alertmanager
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q21 The burn-rate alert sits in Pending for the whole incident and never reaches Firing.
Intermediate
Pending for the whole incident and never reaches Firing.Likely causes โ The for: duration is longer than the condition stays true continuously. If the short-window ratio dips below threshold for even one evaluation, the pending timer resets. A long for: (15m) on a 5m short window makes this likely during spiky errors.
Diagnose โ
ALERTS{alertname="CheckoutErrorBudgetBurnFast"}
slo:sli_error:ratio_rate5m{slo="checkout-availability"}Graph the short-window ratio against the threshold.
Fix โ Use for: 2m (or less) on paging burn alerts; the long window already provides the noise filtering. Optionally use keep_firing_for (Prometheus 2.42+) to avoid flapping once firing.
Prevent โ Unit test alerts with spiky input series in promtool test rules.
Q22 After a rollback fixed the incident, the page kept firing for another 50 minutes.
Intermediate
Likely causes โ The alert uses only the 1h window. The 1h ratio stays above threshold long after recovery because it still contains the bad minutes.
Diagnose โ Read the alert expression: if there is no short-window and condition, this is expected behaviour.
Fix โ Add the short window (1/12 of the long one):
slo:sli_error:ratio_rate1h > 14.4 * 0.001
and
slo:sli_error:ratio_rate5m > 14.4 * 0.001Prevent โ Use the full multi-window, multi-burn-rate pattern, ideally generated by Sloth or Pyrra.
Q23 Checkout was completely down for 25 minutes and no burn-rate alert fired.
Advanced
Likely causes โ Requests never reached the service, so app metrics recorded zero traffic and the ratio was NaN (pods crashlooping, ingress misrouted, DNS broken). Or the failures were load balancer 502/503s that the app SLI does not see.
Diagnose โ
sum(rate(http_requests_total{job="checkout"}[5m]))
sum by (status) (rate(nginx_ingress_controller_requests{service="checkout"}[5m]))
up{job="checkout"}Fix โ Measure the SLI at the ingress or load balancer, add a traffic-drop alert, absent(up{job="checkout"} == 1), and external synthetic probes.
Prevent โ For every SLO, review "what failure would make this SLI go blind?" and cover each case.
Q24 The alert shows Firing in Prometheus, but Alertmanager's UI shows nothing.
Beginner
Firing in Prometheus, but Alertmanager's UI shows nothing.Likely causes โ Prometheus is not configured to send to this Alertmanager (wrong alerting.alertmanagers config or service discovery), network policy blocks it, or Alertmanager is down.
Diagnose โ
curl -s localhost:9090/api/v1/alertmanagers | jq '.data.activeAlertmanagers'rate(prometheus_notifications_errors_total[5m])
prometheus_notifications_dropped_totalFix โ Fix the Alertmanager endpoints in the Prometheus config (in the operator: spec.alerting.alertmanagers), and allow traffic on port 9093.
Prevent โ Alert on prometheus_notifications_errors_total and use a Watchdog heartbeat to an external dead man's switch.
Q25 Alertmanager won't load the new config: undefined receiver "pager" used in route.
Beginner
undefined receiver "pager" used in route.Likely causes โ A route references a receiver name that is not defined in receivers: (typo or the receiver block was removed).
Diagnose โ
amtool check-config alertmanager.yaml
kubectl logs -n monitoring alertmanager-monitoring-kube-prometheus-alertmanager-0 -c alertmanager | tailFix โ Add the receiver or fix the name:
receivers:
- name: "null"
- name: "pager"Prevent โ Run amtool check-config in CI before deploying Alertmanager config.
Q26 Alertmanager logs Notify for alerts failed with unexpected status code 404: no_service for the Slack receiver.
Beginner
Notify for alerts failed with unexpected status code 404: no_service for the Slack receiver.Likely causes โ The Slack incoming webhook URL was revoked or the app was removed from the workspace.
Diagnose โ
kubectl logs -n monitoring alertmanager-monitoring-kube-prometheus-alertmanager-0 -c alertmanager | grep -i slack
curl -s -X POST -H 'Content-type: application/json' --data '{"text":"test"}' "$SLACK_WEBHOOK_URL"rate(alertmanager_notifications_failed_total{integration="slack"}[5m])Fix โ Create a new webhook, store it in a Secret, and reference it with api_url_file or the operator's AlertmanagerConfig secret reference.
Prevent โ Alert on alertmanager_notifications_failed_total through a different channel than the one being monitored.
Q27 The same burn-rate incident re-pages the on-call every 5 minutes.
Intermediate
Likely causes โ repeat_interval too short, or the alert's labels change (for example {{ $value }} placed in labels instead of annotations), creating a "new" alert each evaluation. Two tier alerts with different names but no grouping also produce separate pages.
Diagnose โ
amtool --alertmanager.url=http://localhost:9093 alert query alertname=~"Checkout.*" -o extendedCheck whether label values change between notifications.
Fix โ Keep dynamic values in annotations only, group by [alertname, slo] or just [slo], set group_interval: 5m and repeat_interval: 4h for pages.
Prevent โ Lint rules to forbid template expressions in labels.
Q28 A burn-rate alert flaps between firing and resolved several times per hour during a partial outage.
Intermediate
Likely causes โ The error ratio hovers right around the threshold, so the short-window condition toggles. Each resolve-then-fire sends new notifications.
Diagnose โ Graph both window ratios with the threshold line during the incident.
Fix โ Add keep_firing_for: 10m to the rule (Prometheus 2.42+), which keeps the alert firing for a period after the condition clears. Make sure Alertmanager group_interval absorbs short resolve/fire cycles.
Prevent โ Include hovering-around-threshold input series in promtool tests.
Q29 You created a silence for a maintenance window, but the alert still pages.
Beginner
Likely causes โ Matchers do not match the alert's actual labels (typo, wrong label name, exact match where a regex was needed), the silence expired, or it was created on one Alertmanager that is not clustered with the one sending.
Diagnose โ
amtool --alertmanager.url=http://localhost:9093 silence query
amtool --alertmanager.url=http://localhost:9093 alert query --silencedCompare the silence matchers with the alert labels.
Fix โ Recreate with correct matchers, for example amtool silence add 'alertname=~"Checkout.*"' namespace=shop --duration=2h --comment="maintenance".
Prevent โ Ensure Alertmanager replicas are clustered and use maintenance tooling that creates silences via the API with tested matchers.
Q30 An inhibition rule should mute service alerts when the database is down, but both alerts arrive.
Intermediate
Likely causes โ The equal labels are not present (or differ) on both the source and target alert. If equal: [cluster] is set and the service alerts lack a cluster label, inhibition never applies. Matchers may also not match.
Diagnose โ
amtool --alertmanager.url=http://localhost:9093 alert query -o extendedCompare labels on PostgresDown and the service alert.
Fix โ Ensure both have the equal labels (add external_labels: {cluster: prod} in Prometheus, or relabel), and verify the matchers.
Prevent โ Test inhibition with synthetic alerts posted to Alertmanager's API in staging.
Q31 Every alert is delivered twice to PagerDuty from your 3-replica Alertmanager.
Advanced
Likely causes โ The replicas are not clustered (gossip not working), so each sends independently; or Prometheus sends to a load-balanced Service instead of all instances, which is fine only when clustering works.
Diagnose โ
alertmanager_cluster_members
alertmanager_cluster_failed_peersEach replica should report 3 members.
Fix โ Fix --cluster.peer settings and open port 9094 TCP/UDP between replicas (network policies). With the Prometheus Operator, ensure the Alertmanager pods can reach each other's mesh port.
Prevent โ Alert when alertmanager_cluster_members is lower than the replica count.
Q32 Your external dead man's switch fires: no Watchdog heartbeat for 10 minutes.
Intermediate
Likely causes โ Something in the alerting pipeline broke: Prometheus down or not evaluating rules, Alertmanager down, the route for Watchdog changed, or egress to the heartbeat service is blocked.
Diagnose โ
kubectl get pods -n monitoring
curl -s localhost:9090/api/v1/alerts | jq '.data.alerts[] | select(.labels.alertname=="Watchdog")'
amtool --alertmanager.url=http://localhost:9093 alert query alertname=WatchdogFix โ Restore the failing component; until then, treat the cluster as unmonitored and watch dashboards manually or declare an incident.
Prevent โ Keep the Watchdog route at the top of the routing tree with continue: false, and monitor the monitoring stack from a separate system.
Q33 The fast-burn alert expression slo:sli_error:ratio_rate1h > X and slo:sli_error:ratio_rate5m > X never returns results, even when both series exceed X.
Advanced
slo:sli_error:ratio_rate1h > X and slo:sli_error:ratio_rate5m > X never returns results, even when both series exceed X.Likely causes โ and matches on all labels. The 1h and 5m recording rules have different label sets (one has an extra route label or a different slo value), so no series pair matches.
Diagnose โ Query both series and compare full label sets.
Fix โ Make all window recording rules produce the same labels, or match explicitly:
slo:sli_error:ratio_rate1h > 0.0144 and on (slo) slo:sli_error:ratio_rate5m > 0.0144Prevent โ Generate all windows from one template so labels are identical; unit test the alert.
Q34 Applying your PrometheusRule fails with admission webhook "prometheusrulevalidate.monitoring.coreos.com" denied the request: Rules are not valid.
Beginner
PrometheusRule fails with admission webhook "prometheusrulevalidate.monitoring.coreos.com" denied the request: Rules are not valid.Likely causes โ The Prometheus Operator's admission webhook found invalid PromQL or invalid rule fields (wrong indentation, expr missing, invalid duration like for: 2min).
Diagnose โ
yq '.spec' checkout-slo.yaml > /tmp/rules.yaml
promtool check rules /tmp/rules.yamlFix โ Fix the reported expression or field (durations use 2m, not 2min) and reapply.
Prevent โ Keep rules as plain Prometheus rule files tested with promtool, and wrap them into the CRD in CI.
Q35 The 3-day ticket alert never fires, even during a slow multi-day burn.
Advanced
Likely causes โ Prometheus retention is shorter than the window (for example --storage.tsdb.retention.time=2d), so [3d] only sees 2 days of data, or a recent restart without persistent storage wiped history.
Diagnose โ
kubectl get prometheus -n monitoring -o jsonpath='{.items[0].spec.retention}'prometheus_tsdb_lowest_timestamp_secondsFix โ Increase retention beyond the longest SLO window (at least 30d for the budget) with persistent volumes, or evaluate long-window rules in Thanos Ruler or Mimir ruler against long-term storage.
Prevent โ Document retention requirements in the SLO platform and alert if the lowest timestamp is newer than 30 days.
Q36 The fast-burn page fired, yet the monthly SLO dashboard shows 99.96% against a 99.9% target. Is the alert wrong?
Intermediate
Likely causes โ Not wrong. Burn-rate alerts measure how fast the budget is being consumed right now, not whether the SLO is currently met. A 14.4x burn for an hour costs 2% of the monthly budget; left unchecked it would exhaust the budget in about 2 days.
Diagnose โ Check the 1h error ratio and budget remaining side by side.
Fix โ Nothing to fix in the alert; respond to the incident. Explain on the dashboard by showing burn rate next to budget remaining.
Prevent โ Train on-call on burn rate vs budget; include both on the SLO dashboard.
Q37 amtool config routes test severity=page team=payments returns default-receiver instead of payments-pager.
Intermediate
amtool config routes test severity=page team=payments returns default-receiver instead of payments-pager.Likely causes โ An earlier sibling route matches first without continue: true, or the payments route sits under a parent route whose matchers do not match these labels, or matchers use the wrong label name.
Diagnose โ
amtool config routes show --config.file=alertmanager.yaml
amtool config routes test --config.file=alertmanager.yaml --verify.receivers=payments-pager severity=page team=paymentsFix โ Reorder routes so more specific ones come first, fix the matchers, or add continue: true where an alert should reach multiple receivers.
Prevent โ Add amtool config routes test --verify.receivers cases to CI for each team.
Grafana SLO Dashboards
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q38 Your SLO dashboard ConfigMap is applied, but the dashboard never shows up in Grafana.
Beginner
Likely causes โ The ConfigMap is missing the label the Grafana sidecar watches (grafana_dashboard: "1" by default in kube-prometheus-stack), it is in a namespace the sidecar does not search, or the JSON is invalid.
Diagnose โ
kubectl get cm -A -l grafana_dashboard=1
kubectl logs -n monitoring deploy/monitoring-grafana -c grafana-sc-dashboard | tail -20Fix โ Add the label, put the ConfigMap in the monitoring namespace (or set grafana.sidecar.dashboards.searchNamespace: ALL), and validate the JSON with jq . dashboard.json.
Prevent โ Provision dashboards from Git with a CI JSON lint step.
Q39 An imported SLO dashboard shows Datasource ${DS_PROMETHEUS} was not found on every panel.
Beginner
Datasource ${DS_PROMETHEUS} was not found on every panel.Likely causes โ The JSON was exported with "Export for sharing externally", which replaces data source references with an input variable that is only resolved through the UI import flow, not through file provisioning.
Diagnose โ Search the JSON for ${DS_PROMETHEUS} and check the __inputs block.
Fix โ Replace references with the real data source UID ({"type":"prometheus","uid":"prometheus"}) or define a datasource template variable and use ${datasource}.
Prevent โ Export provisioned dashboards without the external-sharing option and use a data source variable.
Q40 The "error budget remaining" stat changes when you change the dashboard time picker from 7 days to 30 days.
Intermediate
Likely causes โ The query uses $__range or the panel's "reduce" over the selected range instead of a fixed SLO window. The budget must always be computed over the SLO window regardless of what range the viewer picks.
Diagnose โ Inspect the panel query and the stat panel's calculation setting.
Fix โ Query the fixed-window recording rule (slo:sli_error:ratio_rate30d) and set the stat to "Last" (not "Mean"). Optionally add a "relative time" override of now-30d.
Prevent โ Document which panels are window-bound and which follow the time picker.
Q41 You just created the SLO recording rules and the 30-day budget panel shows only a few hours of data.
Intermediate
Likely causes โ Prometheus evaluates recording rules only going forward; it does not backfill history for newly added rules.
Diagnose โ Check the earliest timestamp of the recorded series vs the raw metric.
Fix โ Backfill with promtool:
promtool tsdb create-blocks-from rules \
--start=$(date -d '-30 days' +%s) --end=$(date +%s) \
--url=http://localhost:9090 slo-rules.yamlThen copy the generated blocks into Prometheus' data directory. Alternatively, wait for the window to fill, and label the panel accordingly.
Prevent โ Add SLO rules early in a service's life, or include backfill in the rollout procedure.
Q42 The budget remaining panel shows 9,850% instead of 98.5%.
Beginner
9,850% instead of 98.5%.Likely causes โ Unit mismatch. The query already multiplies by 100 (returns 98.5), but the panel unit is "Percent (0.0-1.0)", which multiplies by 100 again. The reverse mistake (ratio 0.985 with unit "Percent (0-100)") shows 0.985%.
Diagnose โ Run the query in Explore and check the raw value.
Fix โ If the value is 0.985, use unit "Percent (0.0-1.0)" (percentunit). If you multiply by 100 in the query, use "Percent (0-100)".
Prevent โ Keep ratios as 0 to 1 in recording rules and format in Grafana with percentunit.
Q43 SLO panels time out with 504 Gateway Timeout when viewing 30 days.
Intermediate
504 Gateway Timeout when viewing 30 days.Likely causes โ Panels run raw rate() queries over many series and a long range with a small step, which is slow; a proxy (Grafana or ingress) times out first.
Diagnose โ Use Query inspector to see query time, and check Prometheus query logs or prometheus_engine_query_duration_seconds.
Fix โ Switch panels to recording rules, set a sensible Min interval (for example 5m for 30d views), and avoid regex selectors on high-cardinality labels.
Prevent โ Review dashboards for raw-metric queries; SLO dashboards should read only slo:* series.
Q44 Deploy annotations stopped appearing on the SLO dashboard after the CI system was migrated.
Beginner
Likely causes โ The new pipeline no longer posts to Grafana's annotation API, the service account token expired, or the dashboard's annotation query filters on a tag the new pipeline does not set.
Diagnose โ
curl -s -H "Authorization: Bearer $GRAFANA_TOKEN" "$GRAFANA_URL/api/annotations?tags=deploy&limit=5" | jq .Fix โ Add a pipeline step:
curl -s -X POST -H "Authorization: Bearer $GRAFANA_TOKEN" -H "Content-Type: application/json" \
"$GRAFANA_URL/api/annotations" \
-d '{"tags":["deploy","checkout"],"text":"checkout 2.14.0 deployed"}'Prevent โ Treat deploy annotations as part of the deployment contract and test them in the pipeline.
Q45 The SLO dashboard's 1h burn-rate panel shows 9x, but the alert evaluated 15x at the same moment.
Intermediate
Likely causes โ The panel computes rate() itself with $__rate_interval or a different window and step, while the alert uses the recorded 1h ratio. Panel step alignment and min interval also change what is displayed.
Diagnose โ Compare the panel query with the recording rule expression, and query the recorded series directly in Explore.
Fix โ Make the panel query the same recorded series the alert uses (slo:sli_error:ratio_rate1h / 0.001).
Prevent โ Single source of truth: dashboards and alerts both read recording rules.
Q46 After a Helm upgrade of kube-prometheus-stack, all SLO dashboards created in the Grafana UI are gone.
Intermediate
Likely causes โ Grafana ran without persistence; UI-created dashboards were stored in SQLite inside an ephemeral pod, lost when the pod was recreated.
Diagnose โ
helm get values monitoring -n monitoring | grep -A3 persistenceFix โ Recreate from any exported JSON, then provision dashboards as code via ConfigMaps (sidecar) or the Grafana Terraform provider. Enable persistence or an external database for Grafana state.
Prevent โ Dashboards as code in Git; the UI is for exploration, not the source of truth.
k6 Load Testing
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q47 k6 prints WARN[0030] Insufficient VUs, reached 100 active VUs and cannot initialize more executor=constant-arrival-rate scenario=steady.
Advanced
WARN[0030] Insufficient VUs, reached 100 active VUs and cannot initialize more executor=constant-arrival-rate scenario=steady.Likely causes โ With an arrival-rate executor, each in-flight request needs a VU. If the system slows down, more VUs are needed (Little's Law: rate x latency). When maxVUs is reached, k6 cannot start iterations on schedule and the target rate is not achieved, which hides how bad the slowdown is.
Diagnose โ Check dropped_iterations in the summary, and compute required VUs: rate x p99 latency (s). At 200 RPS and 2 s latency that is 400 VUs.
Fix โ Raise maxVUs (and preAllocatedVUs to avoid allocation cost mid-test), or treat the warning as the test result: the system cannot sustain the rate within acceptable latency.
Prevent โ Add a threshold on dropped_iterations (for example 'dropped_iterations': ['count<1']) so the test fails visibly.
Q48 CI fails with ERRO[0602] thresholds on metrics 'http_req_duration' have been crossed and exit code 99.
Beginner
ERRO[0602] thresholds on metrics 'http_req_duration' have been crossed and exit code 99.Likely causes โ The release candidate is slower than the latency threshold, or the test environment was degraded (noisy neighbour, cold caches, undersized staging), or the load generator itself was saturated.
Diagnose โ Read the end-of-test summary (p(95), p(99), http_req_waiting vs http_req_connecting), compare with the previous successful run, and check server-side latency and CPU throttling during the test window.
Fix โ If server-side latency regressed, block the release and profile the change. If the environment was at fault, fix it and re-run, rather than loosening the threshold.
Prevent โ Trend k6 results per build (JSON output or Prometheus remote write) and keep test environments sized consistently.
Q49 Every request fails with dial tcp: lookup checkout on 10.96.0.10:53: no such host.
Beginner
dial tcp: lookup checkout on 10.96.0.10:53: no such host.Likely causes โ The hostname does not resolve from where k6 runs: running locally against an in-cluster Service name, wrong namespace (needs checkout.shop.svc.cluster.local from another namespace), or the Service does not exist.
Diagnose โ
kubectl get svc -n shop checkout
kubectl run dns-test --rm -it --image=busybox:1.36 --restart=Never -- nslookup checkout.shop.svc.cluster.localFix โ Use the fully qualified Service name when running in-cluster, or port-forward / use an ingress URL when running outside.
Prevent โ Pass BASE_URL via -e and validate it with a smoke test stage before the main scenario.
Q50 Many requests fail with request timeout after exactly 60 seconds.
Intermediate
request timeout after exactly 60 seconds.Likely causes โ k6's default per-request timeout is 60s. The service is hanging (thread pool exhausted, waiting on a dependency without timeouts), so requests never complete.
Diagnose โ Check server-side: active connections, thread pools, DB pool waits, downstream latency. Check if the ingress has a longer timeout than k6.
Fix โ Fix the hang on the server (timeouts on dependencies, bulkheads). In the test, set a realistic timeout matching real clients: http.get(url, { timeout: '10s' }).
Prevent โ Every dependency call in the service has an explicit timeout; test with slow dependencies using chaos.
Q51 The test starts fine, then errors switch to dial tcp 10.96.41.12:8080: connect: connection refused.
Intermediate
dial tcp 10.96.41.12:8080: connect: connection refused.Likely causes โ Pods crashed or restarted under load (OOMKilled, liveness probe failures), leaving no ready endpoints, or the Service points to a port nobody listens on after a restart.
Diagnose โ
kubectl get pods -n shop -w
kubectl describe pod -n shop -l app=checkout | grep -A5 "Last State"
kubectl get endpointslices -n shop -l kubernetes.io/service-name=checkoutFix โ Fix the crash cause: memory limits, liveness probe too aggressive under load (use a cheap endpoint, longer timeouts), or startup time.
Prevent โ Load tests should also assert pod restarts are zero; liveness probes should never depend on downstream services.
Q52 The k6 load generator logs socket: too many open files.
Intermediate
socket: too many open files.Likely causes โ The file descriptor limit on the load generator is too low for the number of concurrent connections.
Diagnose โ
ulimit -n
cat /proc/$(pgrep k6)/limits | grep "open files"Fix โ Raise the limit: ulimit -n 250000 before running, or set LimitNOFILE in systemd or the container runtime. Reuse connections (k6 does keep-alive by default; avoid noConnectionReuse: true unless intended).
Prevent โ Use a tuned load-generator image or the k6 Operator with known limits, and document OS tuning for large tests.
Q53 At high rates, k6 errors with dial tcp 10.0.3.15:443: connect: cannot assign requested address.
Advanced
dial tcp 10.0.3.15:443: connect: cannot assign requested address.Likely causes โ Ephemeral port exhaustion on the load generator: too many new connections to one destination IP:port, with old sockets stuck in TIME_WAIT. Often caused by noConnectionReuse or noVUConnectionReuse, or the server closing connections after each request.
Diagnose โ
ss -tan state time-wait | wc -l
sysctl net.ipv4.ip_local_port_rangeFix โ Enable connection reuse, widen the port range (sysctl -w net.ipv4.ip_local_port_range="1024 65000"), and spread load across multiple generators or target IPs.
Prevent โ Run large tests distributed with the k6 Operator and check the generator's network metrics as part of the test.
Q54 Latency results look terrible, but the server's histograms show p99 of 80 ms. Load generator CPU is at 100%.
Intermediate
Likely causes โ The load generator is the bottleneck: k6 cannot process responses fast enough, so measured times include client-side scheduling delay.
Diagnose โ Watch generator CPU and memory during the test (top, node metrics); compare http_req_waiting against server-side latency.
Fix โ Give the generator more CPU, simplify the script (avoid heavy JSON parsing or large check functions per response, use discardResponseBodies: true when bodies are not needed), or distribute the test.
Prevent โ Keep generator CPU below roughly 80% during tests and record it alongside results.
Q55 k6 warns: The test has generated metrics with 100001 unique time series, which is higher than the suggested limit of 100000 and could cause high memory usage.
Intermediate
The test has generated metrics with 100001 unique time series, which is higher than the suggested limit of 100000 and could cause high memory usage.Likely causes โ URLs with unique IDs (/orders/8f2c...) become the name and url tags, so each request creates new metric series.
Diagnose โ Look for dynamic values in URLs and custom tags in the script.
Fix โ Group URLs with a static name tag:
http.get(`${BASE}/orders/${id}`, { tags: { name: 'GET /orders/:id' } });or use http.url template literals, which set the name tag automatically.
Prevent โ Review scripts for high-cardinality tags, same as Prometheus label hygiene.
Q56 Streaming k6 results to Prometheus fails with remote write receiver needs to be enabled with --web.enable-remote-write-receiver.
Intermediate
remote write receiver needs to be enabled with --web.enable-remote-write-receiver.Likely causes โ Prometheus does not accept remote write by default; the /api/v1/write endpoint returns 404 with that message.
Diagnose โ
curl -s -o /dev/null -w '%{http_code}\n' -X POST http://localhost:9090/api/v1/writeFix โ Enable the receiver. In kube-prometheus-stack: prometheus.prometheusSpec.enableRemoteWriteReceiver: true. Then run:
K6_PROMETHEUS_RW_SERVER_URL=http://localhost:9090/api/v1/write k6 run -o experimental-prometheus-rw test.jsPrevent โ Document the integration in the platform's load-testing guide and enable it in the shared test Prometheus.
Q57 The script fails at init with ReferenceError: BASE_URL is not defined.
Beginner
ReferenceError: BASE_URL is not defined.Likely causes โ Environment variables are not globals in k6; they are read from __ENV.
Diagnose โ Search the script for bare BASE_URL.
Fix โ
const BASE_URL = __ENV.BASE_URL || 'http://localhost:8080';and run with k6 run -e BASE_URL=http://checkout.shop:8080 test.js.
Prevent โ Validate required env vars at the start of setup() and fail fast with a clear message.
Q58 20% of checks failed, but k6 still exited with code 0 and CI passed.
Beginner
Likely causes โ check() only records results; it does not fail the test. Only thresholds affect the exit code.
Diagnose โ Look at the summary: checks.........: 80.00% with no threshold listed.
Fix โ Add a threshold on checks:
thresholds: { checks: ['rate>0.99'] }Prevent โ Template scripts with SLO thresholds on http_req_failed, http_req_duration and checks.
Q59 The k6 Kubernetes Job fails with The moduleSpecifier "/scripts/test.js" couldn't be found on local disk.
Beginner
The moduleSpecifier "/scripts/test.js" couldn't be found on local disk.Likely causes โ The ConfigMap with the script is not mounted, mounted at a different path, or the key name differs from test.js.
Diagnose โ
kubectl get cm -n loadtest k6-script -o yaml | head -20
kubectl get job -n loadtest k6-run -o yaml | yq '.spec.template.spec.volumes, .spec.template.spec.containers[0].volumeMounts'Fix โ Create the ConfigMap with the expected key (kubectl create configmap k6-script --from-file=test.js) and mount it at /scripts.
Prevent โ Use the k6 Operator TestRun resource, which handles script ConfigMaps consistently.
Q60 With constant-vus, the test reports p99 of 400 ms, but production users see multi-second latency at the same RPS.
Advanced
constant-vus, the test reports p99 of 400 ms, but production users see multi-second latency at the same RPS.Likely causes โ Coordinated omission: in a closed model, each VU waits for its response before sending the next, so when the server slows down, k6 sends fewer requests and never measures the queueing real users experience.
Diagnose โ Compare http_reqs rate during slow periods: it drops when latency rises.
Fix โ Use an open model (constant-arrival-rate or ramping-arrival-rate) with enough maxVUs so the request rate is independent of response time.
Prevent โ Make arrival-rate executors the default in the load-testing template for user-facing services.
Q61 A Grafana k6 dashboard shows no data, although experimental-prometheus-rw output reports no errors.
Intermediate
experimental-prometheus-rw output reports no errors.Likely causes โ Metric names differ from what the dashboard expects (k6 remote-write metrics are prefixed k6_, and trend metrics are exported as summaries or native histograms depending on K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM and K6_PROMETHEUS_RW_TREND_STATS), or the dashboard filters on a testid tag that was not set.
Diagnose โ
count by (__name__) ({__name__=~"k6_.*"})Fix โ Align the dashboard queries with the exported names, set the trend stats you need (for example K6_PROMETHEUS_RW_TREND_STATS="p(95),p(99),avg"), and tag runs with --tag testid=release-2.14.
Prevent โ Use the dashboard version that matches your k6 output settings and pin both.
Chaos Mesh, Litmus & AWS FIS
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q62 A NetworkChaos delay experiment does nothing, and chaos-daemon logs show RTNETLINK answers: No such file or directory / Specified qdisc kind is unknown.
Intermediate
NetworkChaos delay experiment does nothing, and chaos-daemon logs show RTNETLINK answers: No such file or directory / Specified qdisc kind is unknown.Likely causes โ The host kernel lacks the sch_netem module, which tc needs for delay and loss. Common on minimal VM images and some Docker Desktop or WSL kernels.
Diagnose โ
lsmod | grep sch_netem
kubectl logs -n chaos-mesh ds/chaos-daemon --tail=50 | grep -i rtnetlinkFix โ On the node: sudo modprobe sch_netem (on kind, the node containers share the host kernel, so load it on the host). On cloud nodes, install the kernel extras package (for example linux-modules-extra-$(uname -r) on Ubuntu).
Prevent โ Add a pre-flight check to the chaos platform that verifies kernel modules on all nodes.
Q63 Chaos experiments fail with dial unix /var/run/docker.sock: connect: no such file or directory on a containerd cluster.
Intermediate
dial unix /var/run/docker.sock: connect: no such file or directory on a containerd cluster.Likely causes โ Chaos Mesh was installed with the default Docker runtime settings, but the nodes run containerd (kind, EKS, GKE, most modern clusters).
Diagnose โ
kubectl get nodes -o jsonpath='{.items[0].status.nodeInfo.containerRuntimeVersion}'
helm get values chaos-mesh -n chaos-meshFix โ
helm upgrade chaos-mesh chaos-mesh/chaos-mesh -n chaos-mesh --reuse-values \
--set chaosDaemon.runtime=containerd \
--set chaosDaemon.socketPath=/run/containerd/containerd.sock(k3s uses /run/k3s/containerd/containerd.sock.)
Prevent โ Keep Chaos Mesh values per cluster type in Git.
Q64 kubectl apply -f podchaos.yaml fails with Internal error occurred: failed calling webhook ... context deadline exceeded.
Intermediate
kubectl apply -f podchaos.yaml fails with Internal error occurred: failed calling webhook ... context deadline exceeded.Likely causes โ The Chaos Mesh admission webhook (served by the controller manager) is unreachable: controller pods not ready, a NetworkPolicy blocks the API server, or on private clusters the control plane cannot reach the webhook port.
Diagnose โ
kubectl get pods -n chaos-mesh
kubectl get validatingwebhookconfigurations,mutatingwebhookconfigurations | grep -i chaos
kubectl logs -n chaos-mesh deploy/chaos-controller-manager --tail=50Fix โ Restore the controller manager, allow API server traffic to the webhook port, and on private GKE/EKS clusters open the firewall or security group rule for that port.
Prevent โ Monitor the chaos controller like any other platform component.
Q65 A PodChaos resource is created, but no pod is killed. The status shows no records.
Beginner
PodChaos resource is created, but no pod is killed. The status shows no records.Likely causes โ The selector matches no pods: wrong namespace, wrong label key or value, or namespace filtering is enabled and the namespace is not annotated.
Diagnose โ
kubectl describe podchaos checkout-pod-kill -n shop
kubectl get pods -n shop -l app=checkoutFix โ Correct selector.namespaces and labelSelectors. If Chaos Mesh was installed with controllerManager.enableFilterNamespace=true, annotate the target namespace: kubectl annotate ns shop chaos-mesh.org/inject=enabled.
Prevent โ Dry-run selectors with kubectl get pods -l ... before every experiment and keep selectors in reviewed manifests.
Q66 You deleted the NetworkChaos, but the 200 ms delay is still there and the resource is stuck in Terminating.
Advanced
NetworkChaos, but the 200 ms delay is still there and the resource is stuck in Terminating.Likely causes โ The controller could not recover the fault (chaos-daemon on that node restarted or the target pod's network namespace changed), so the finalizer is never removed and the tc rule may still exist.
Diagnose โ
kubectl get networkchaos -n shop inventory-latency -o yaml | yq '.metadata.finalizers, .status'
kubectl logs -n chaos-mesh ds/chaos-daemon --tail=100 | grep -i recoverFix โ Restart the affected target pods (removes the qdisc with the network namespace), then, as a last resort, force-clean the finalizer:
kubectl annotate networkchaos inventory-latency -n shop chaos-mesh.chaos-mesh.org/cleanFinalizer=forcedPrevent โ Always set duration on experiments and ensure chaos-daemon has PriorityClass and resources so it is not evicted mid-experiment.
Q67 NetworkChaos added 300 ms delay to the checkout pods, but the checkout latency SLI did not move.
Intermediate
NetworkChaos added 300 ms delay to the checkout pods, but the checkout latency SLI did not move.Likely causes โ The SLI comes from the app's own histogram, which measures time inside the handler. Delay on the pod's egress packets happens after the handler finishes, so only clients see it.
Diagnose โ Compare k6 or ingress latency (client side) with the app histogram during the experiment.
Fix โ Measure the latency SLI at the ingress or load balancer, or inject the delay on a downstream dependency so the caller's handler waits for it.
Prevent โ Validate that every SLI reacts to a fault you inject; an SLI that does not move during a known fault is blind to that failure mode.
Q68 A Litmus experiment pod never starts: error looking up service account shop/pod-delete-sa: serviceaccount "pod-delete-sa" not found.
Beginner
error looking up service account shop/pod-delete-sa: serviceaccount "pod-delete-sa" not found.Likely causes โ The ChaosEngine references chaosServiceAccount: pod-delete-sa, but the ServiceAccount and its RBAC were not created in the target namespace.
Diagnose โ
kubectl get sa -n shop
kubectl get chaosengine -n shop -o yaml | grep chaosServiceAccountFix โ Apply the experiment's RBAC manifest (ServiceAccount, Role, RoleBinding) in the namespace, or point the engine to an existing chaos ServiceAccount.
Prevent โ Template RBAC together with the ChaosEngine in the same manifest bundle.
Q69 Litmus pod-delete fails: pods is forbidden: User "system:serviceaccount:shop:pod-delete-sa" cannot delete resource "pods" in API group "" in the namespace "shop".
Beginner
pod-delete fails: pods is forbidden: User "system:serviceaccount:shop:pod-delete-sa" cannot delete resource "pods" in API group "" in the namespace "shop".Likely causes โ The ServiceAccount exists, but its Role lacks the delete verb on pods (or the RoleBinding points to another namespace).
Diagnose โ
kubectl auth can-i delete pods -n shop --as=system:serviceaccount:shop:pod-delete-sa
kubectl describe rolebinding -n shop | grep -A3 pod-deleteFix โ Grant the minimum needed verbs (get, list, delete on pods; create on events; access to chaosengines and chaosresults).
Prevent โ Use the RBAC manifests that ship with each ChaosHub experiment and test them in staging.
Q70 The Litmus ChaosResult verdict is Fail, with the promProbe marked failed, but the app looked healthy.
Intermediate
ChaosResult verdict is Fail, with the promProbe marked failed, but the app looked healthy.Likely causes โ The probe's query, comparator or criteria is wrong: comparing a ratio to a percentage (0.999 vs 99.9), wrong operator (<= vs >=), the query returning no data (counts as failure), or the Prometheus endpoint unreachable from the experiment pod.
Diagnose โ
kubectl describe chaosresult -n shop checkout-pod-deleteRun the probe's query manually against the same endpoint.
Fix โ Correct the query and comparator (for example criteria: ">=", value: "0.995" on a success ratio), use the in-cluster Prometheus Service URL, and set a reasonable probeTimeout and interval.
Prevent โ Test probes in a no-fault run first: the verdict must be Pass when nothing is injected.
Q71 Litmus experiments stay Awaited forever in an air-gapped cluster.
Intermediate
Awaited forever in an air-gapped cluster.Likely causes โ The chaos-runner or experiment image cannot be pulled (ImagePullBackOff) because images come from a public registry.
Diagnose โ
kubectl get pods -n shop | grep -E "runner|pod-delete"
kubectl describe pod -n shop <runner-pod> | grep -A5 EventsFix โ Mirror the Litmus images to your private registry and set the image references in the ChaosEngine / ChaosExperiment (and the image registry setting in ChaosCenter), plus an imagePullSecret if needed.
Prevent โ Include chaos tooling images in your standard image mirroring pipeline.
Q72 An AWS FIS experiment fails immediately with a target resolution error saying the target set is empty.
Intermediate
Likely causes โ No resources match the target's tags, filters or ARNs in that region (tag key typo, instances in another region, filters like State.Name excluding everything).
Diagnose โ
aws fis get-experiment --id EXP123 --query 'experiment.state'
aws ec2 describe-instances --filters "Name=tag:chaos-target,Values=checkout" \
--query 'Reservations[].Instances[].InstanceId'Fix โ Fix the tags or filters in the template and check the region.
Prevent โ Validate target selection with a describe call in the same automation that starts the experiment.
Q73 FIS fails with is not authorized to perform: ec2:TerminateInstances on resource: arn:aws:ec2:ap-south-1:123456789012:instance/i-0abc....
Beginner
is not authorized to perform: ec2:TerminateInstances on resource: arn:aws:ec2:ap-south-1:123456789012:instance/i-0abc....Likely causes โ The IAM role in the experiment template lacks permissions for the action, or an SCP or permission boundary denies it.
Diagnose โ
aws fis get-experiment-template --id EXT123 --query 'experimentTemplate.roleArn'
aws iam simulate-principal-policy --policy-source-arn <role-arn> \
--action-names ec2:TerminateInstancesFix โ Attach the AWS managed policy for the relevant FIS action category (for example the EC2 access policy for FIS) or a scoped custom policy, conditioned on the chaos tag.
Prevent โ Keep FIS roles in IaC with least privilege scoped by tags, and test templates in a sandbox account.
Q74 FIS aws:eks:pod-delete fails because FIS cannot create its pod in the cluster (forbidden).
Advanced
aws:eks:pod-delete fails because FIS cannot create its pod in the cluster (forbidden).Likely causes โ The FIS experiment role is not mapped into Kubernetes RBAC (no EKS access entry or aws-auth mapping), or the Kubernetes ServiceAccount named in the action lacks permissions in the target namespace.
Diagnose โ
aws eks list-access-entries --cluster-name prod
kubectl auth can-i create pods -n shop --as=system:serviceaccount:shop:fis-experimentFix โ Add an access entry (or aws-auth mapping) for the FIS role to a Kubernetes user or group, and create the ServiceAccount, Role and RoleBinding that the FIS pod actions require in the target namespace.
Prevent โ Provision FIS EKS integration with the cluster's IaC, and run a smoke experiment after cluster upgrades.
Q75 A FIS experiment with a stop condition on the SLO alarm kept running while errors rose.
Advanced
Likely causes โ The CloudWatch alarm was in INSUFFICIENT_DATA (metric missing or delayed), its evaluation periods were too long to react within the experiment, or it watched the wrong metric or dimension.
Diagnose โ
aws cloudwatch describe-alarm-history --alarm-name checkout-slo-burn --max-items 10
aws cloudwatch describe-alarms --alarm-names checkout-slo-burn \
--query 'MetricAlarms[].{state:StateValue,periods:EvaluationPeriods,period:Period}'Fix โ Use a 1-minute period with 1 to 3 datapoints, TreatMissingData: breaching for stop-condition alarms, and the correct dimensions. Verify the alarm fires by forcing it with aws cloudwatch set-alarm-state in a test.
Prevent โ Test stop conditions before every new experiment template.
Q76 A Chaos Mesh StressChaos CPU experiment pegged the node and evicted unrelated pods.
Intermediate
StressChaos CPU experiment pegged the node and evicted unrelated pods.Likely causes โ Stress workers ran without effective limits relative to the target container, so the injected load competed with other pods on the node, or the target pods had no CPU limits and the node's allocatable was exceeded.
Diagnose โ
kubectl describe stresschaos -n shop checkout-cpu
kubectl get events -A --field-selector reason=Evicted
kubectl top nodeFix โ Set stressors.cpu.workers and load conservatively, target containers with CPU limits, and use mode: one and short duration.
Prevent โ Run resource stress only on dedicated or well-limited workloads, and review blast radius in the experiment design.
Reliability Patterns in Production
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q77 Clients get 503s with body upstream connect error or disconnect/reset before headers. reset reason: overflow, and Envoy logs show flag UO.
Advanced
upstream connect error or disconnect/reset before headers. reset reason: overflow, and Envoy logs show flag UO.Likely causes โ The Istio/Envoy circuit breaker tripped: the DestinationRule connectionPool limits (maxConnections, http1MaxPendingRequests, http2MaxRequests) are lower than the current concurrency. UO means upstream overflow.
Diagnose โ
kubectl get destinationrule -n shop inventory -o yaml
kubectl exec -n shop deploy/checkout -c istio-proxy -- \
pilot-agent request GET stats | grep -E "upstream_rq_pending_overflow|upstream_cx_overflow"Fix โ If the limit is protecting a genuinely saturated service, it is working; fix capacity. If the limits were set too low, raise them based on Little's Law (RPS x latency) with headroom.
Prevent โ Size connection pool limits from load tests and alert on overflow counters.
Q78 NGINX ingress returns 504 and logs upstream timed out (110: Connection timed out) while reading response header from upstream.
Beginner
upstream timed out (110: Connection timed out) while reading response header from upstream.Likely causes โ The backend did not respond within proxy-read-timeout (default 60s): slow queries, a hung dependency, or a long-running endpoint that should be async.
Diagnose โ
kubectl logs -n ingress-nginx deploy/ingress-nginx-controller | grep "upstream timed out" | tail
kubectl get ingress -n shop checkout -o yaml | grep -i timeoutCheck the backend's latency and dependency traces for those requests.
Fix โ Fix the slow backend path (timeouts on its dependencies, indexes, async jobs). Only raise nginx.ingress.kubernetes.io/proxy-read-timeout for endpoints that legitimately take long.
Prevent โ Nest timeouts: backend dependency timeouts < backend request timeout < ingress timeout < client timeout.
Q79 After a 30-second database blip, Postgres keeps rejecting connections with FATAL: sorry, too many clients already for 20 minutes.
Advanced
FATAL: sorry, too many clients already for 20 minutes.Likely causes โ A retry storm and connection storm: every pod retried immediately, opened new connections to replace broken ones, and the pools' total maximum exceeds max_connections. The DB is now saturated by reconnect attempts (a metastable failure).
Diagnose โ
SELECT state, count(*) FROM pg_stat_activity GROUP BY state;
SHOW max_connections;Compare pods x pool max with max_connections.
Fix โ Shed load: scale callers down or disable retries via flag, terminate idle connections, then bring traffic back gradually. Longer term, put PgBouncer or RDS Proxy in front, cap pool sizes so their sum fits, and add backoff with jitter on reconnects.
Prevent โ Capacity check in reviews: replicas x maxPoolSize must fit max_connections at max HPA scale.
Q80 Customers were charged twice during an incident where the payment API timed out.
Advanced
Likely causes โ The client retried a non-idempotent POST after a timeout, but the first request had actually succeeded on the server.
Diagnose โ Match duplicate charges by customer and timestamp in payment logs; check retry configuration in the client library or mesh (VirtualService retries with retryOn: 5xx,reset).
Fix โ Refund duplicates. Add idempotency keys: the client generates a key per logical payment, the server stores the result per key and returns it on duplicates. Remove automatic retries for non-idempotent calls at the mesh layer.
Prevent โ Idempotency keys mandatory for all write APIs; retry policies reviewed per route.
Q81 Every rolling deploy produces a short burst of 502s on the AWS ALB.
Intermediate
Likely causes โ Pods terminate before the ALB stops sending traffic: no preStop delay, app exits immediately on SIGTERM, or deregistration delay is longer than terminationGracePeriodSeconds. ALB access logs show elb_status_code 502 with target_status_code -.
Diagnose โ
kubectl get deploy checkout -n shop -o yaml | yq '.spec.template.spec | {grace: .terminationGracePeriodSeconds, lifecycle: .containers[0].lifecycle}'
kubectl get ingress -n shop checkout -o yaml | grep -i deregistrationFix โ Add preStop: sleep 15, handle SIGTERM gracefully, set terminationGracePeriodSeconds above preStop plus drain time, and align the target group deregistration_delay.timeout_seconds. With the AWS Load Balancer Controller, enable pod readiness gates.
Prevent โ Run a pod-kill chaos experiment under load after any change to deployment settings.
Q82 Redis restarted and immediately the database CPU hit 100% and the site went down.
Advanced
Likely causes โ Cache stampede: all cache misses at once sent the full read load to the database, which was sized only for the cache-miss rate.
Diagnose โ Correlate cache hit ratio, DB QPS and DB CPU around the restart.
Fix โ Shed load at the edge, then warm the cache gradually. Add request coalescing (single-flight) so concurrent misses for the same key trigger one DB query, use stale-while-revalidate, and add jitter to TTLs.
Prevent โ Treat the cache as a hard dependency in capacity planning, or size the DB for cold-cache load; run a cache-flush chaos experiment.
Q83 Logs fill with CallNotPermittedException: CircuitBreaker 'inventory' is OPEN and does not permit further calls long after inventory recovered.
Intermediate
CallNotPermittedException: CircuitBreaker 'inventory' is OPEN and does not permit further calls long after inventory recovered.Likely causes โ The breaker cannot close: half-open trial calls keep failing (they time out because the timeout is too short for a cold dependency), permittedNumberOfCallsInHalfOpenState is tiny, or waitDurationInOpenState is very long.
Diagnose โ Check breaker state metrics (resilience4j_circuitbreaker_state) and the result of half-open calls; call inventory manually from the pod.
Fix โ Tune waitDurationInOpenState (for example 30s), allow several half-open calls, and make sure the call timeout is realistic for a recovering dependency.
Prevent โ Export breaker state as metrics, alert on breakers open longer than N minutes, and test recovery in chaos experiments.
Q84 Your NGINX rate limit returns 503 to throttled clients, and the SLO counts them as errors.
Beginner
Likely causes โ limit_req returns 503 by default, so intentional throttling looks like server failure in the SLI and to clients (who may retry aggressively).
Diagnose โ
grep -n "limit_req" /etc/nginx/nginx.confCorrelate 503 spikes with limiting requests entries in the NGINX error log.
Fix โ Set limit_req_status 429; (ingress-nginx: limit-req-status-code: "429" in the ConfigMap). Decide explicitly whether 429s for fair-use throttling count against the SLO; overload-driven 429s usually should.
Prevent โ Document status codes for throttling and shedding, and include them in the SLI definition.
Q85 The product page fails with BulkheadFullException: Bulkhead 'recommendations' is full and does not permit further calls.
Intermediate
BulkheadFullException: Bulkhead 'recommendations' is full and does not permit further calls.Likely causes โ The bulkhead is working as designed (recommendations is slow and its concurrency slots are full), but the caller does not have a fallback, so the exception bubbles up and fails the whole page.
Diagnose โ Check recommendations latency and bulkhead metrics (resilience4j_bulkhead_available_concurrent_calls).
Fix โ Add a fallback (empty or cached recommendations) so the page renders without that section; fix the slowness in the recommendations service.
Prevent โ For every soft dependency, define and test the fallback, not just the isolation.
Q86 gRPC clients see rpc error: code = DeadlineExceeded desc = context deadline exceeded even though the server logs show requests finishing in 200 ms.
Advanced
rpc error: code = DeadlineExceeded desc = context deadline exceeded even though the server logs show requests finishing in 200 ms.Likely causes โ The deadline is consumed before the request reaches this server: an upstream caller set a short overall deadline and earlier hops used most of it, or queueing (client-side connection limits, server max concurrent streams) delays the start. Server logs measure only processing time.
Diagnose โ Use distributed traces to see where time is spent across hops; check the grpc-timeout header received by the server and client-side queueing metrics.
Fix โ Rebalance deadlines along the chain, parallelize calls, remove queueing (raise MaxConcurrentStreams, add connections), and fail fast when remaining deadline is too small.
Prevent โ Define latency budgets per hop from the top-level SLO, and propagate deadlines everywhere.
Q87 A node drain for maintenance hangs with Cannot evict pod as it would violate the pod's disruption budget.
Beginner
Cannot evict pod as it would violate the pod's disruption budget.Likely causes โ A PodDisruptionBudget allows zero disruptions right now: minAvailable equals replica count, a single-replica deployment has minAvailable: 1, or some replicas are already unhealthy.
Diagnose โ
kubectl get pdb -A
kubectl describe pdb -n shop checkoutLook at ALLOWED DISRUPTIONS.
Fix โ Scale up so the PDB permits one disruption, fix unhealthy pods, or adjust the PDB (maxUnavailable: 1). Do not force-delete pods unless you accept the impact.
Prevent โ At least 2 replicas for anything with a PDB, and use maxUnavailable rather than minAvailable equal to replicas.
Q88 The HPA does not scale during a load test: failed to get cpu utilization: unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: the server could not find the requested resource (get pods.metrics.k8s.io).
Beginner
failed to get cpu utilization: unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: the server could not find the requested resource (get pods.metrics.k8s.io).Likely causes โ metrics-server is not installed or not healthy (on kind it often fails TLS to kubelets).
Diagnose โ
kubectl get apiservice v1beta1.metrics.k8s.io
kubectl -n kube-system logs deploy/metrics-server | tail
kubectl top pods -n shopFix โ Install metrics-server; on kind add --kubelet-insecure-tls to its args (lab only). Also make sure pods have CPU requests, or the HPA cannot compute utilization.
Prevent โ Include metrics-server in the cluster baseline and alert if the APIService is unavailable.
Q89 Under load, pods start failing readiness with Readiness probe failed: Get "http://10.244.1.7:8080/healthz": context deadline exceeded (Client.Timeout exceeded while awaiting headers), and the remaining pods collapse.
Advanced
Readiness probe failed: Get "http://10.244.1.7:8080/healthz": context deadline exceeded (Client.Timeout exceeded while awaiting headers), and the remaining pods collapse.Likely causes โ The probe endpoint competes with real traffic for the same threads, or checks downstream dependencies. Under load it times out (default timeoutSeconds: 1), pods are removed from endpoints, the remaining pods get more traffic and fail too: a cascading failure.
Diagnose โ
kubectl describe pod -n shop -l app=checkout | grep -B2 -A2 "Readiness probe failed"
kubectl get endpointslices -n shop -l kubernetes.io/service-name=checkout -wFix โ Make the readiness endpoint cheap and local (no dependency calls), raise timeoutSeconds and failureThreshold, and serve probes on a separate lightweight listener if possible. Add load shedding so overloaded pods reject excess work instead of becoming unready.
Prevent โ Load test with probe behaviour in mind, and never use dependency checks in liveness probes.
Q90 p99 latency spikes every few seconds although CPU usage averages only 40% of the limit.
Intermediate
Likely causes โ CFS throttling: the container bursts above its CPU limit within a 100 ms period and is paused for the rest of the period. Averages hide it, especially for multi-threaded runtimes (JVM, Go with high GOMAXPROCS).
Diagnose โ
rate(container_cpu_cfs_throttled_periods_total{namespace="shop",container="checkout"}[5m])
/ rate(container_cpu_cfs_periods_total{namespace="shop",container="checkout"}[5m])Fix โ Raise or remove CPU limits (keep requests), set GOMAXPROCS to match the limit (automaxprocs) or JVM -XX:ActiveProcessorCount, and re-test.
Prevent โ Alert on throttling ratio above 25% for latency-sensitive services.
Backups, DR & Runbook Automation
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q91 velero backup describe shop-nightly shows Phase: PartiallyFailed.
Intermediate
velero backup describe shop-nightly shows Phase: PartiallyFailed.Likely causes โ Some items failed: volume snapshots failed (missing snapshot class, cloud permissions), file-level backup of a volume failed, or a resource could not be read.
Diagnose โ
velero backup describe shop-nightly --details
velero backup logs shop-nightly | grep -iE "error|fail"
kubectl get volumesnapshotclassFix โ Fix the specific failures: add a VolumeSnapshotClass labeled for Velero, grant the plugin's IAM permissions, or enable file-system backup for volumes that cannot be snapshotted.
Prevent โ Alert on Velero metrics (velero_backup_partial_failure_total, velero_backup_last_successful_timestamp) and run scheduled restore tests.
Q92 After restoring a namespace into the DR cluster with Velero, PVCs stay Pending.
Advanced
Pending.Likely causes โ The StorageClass referenced by the PVCs does not exist in the DR cluster (different name or CSI driver), or snapshots cannot be restored across regions without copying them first.
Diagnose โ
kubectl get pvc -n shop
kubectl describe pvc -n shop data-postgres-0 | grep -A5 Events
kubectl get storageclassFix โ Use Velero's storage class mapping (a ConfigMap for the change-storage-class restore item action) to map old to new classes, and copy snapshots to the DR region, or use file-system backups stored in object storage replicated across regions.
Prevent โ Keep StorageClass names consistent across clusters and include cross-region restore in DR drills.
Q93 etcdctl snapshot save fails with Error: context deadline exceeded.
Intermediate
etcdctl snapshot save fails with Error: context deadline exceeded.Likely causes โ etcdctl cannot reach or authenticate to etcd: missing TLS flags, wrong endpoint, or etcd is unhealthy.
Diagnose โ
ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379 \
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
--cert=/etc/kubernetes/pki/etcd/server.crt \
--key=/etc/kubernetes/pki/etcd/server.key endpoint healthFix โ Pass the CA, cert and key flags and the right endpoint to snapshot save, then verify with etcdutl snapshot status <file> -w table.
Prevent โ Wrap etcd backups in a tested script or CronJob with alerting on failure and age.
Q94 A restore test fails with pg_restore: error: could not execute query: ERROR: role "app_rw" does not exist.
Beginner
pg_restore: error: could not execute query: ERROR: role "app_rw" does not exist.Likely causes โ pg_dump captures objects and ownership but not cluster-wide roles. The target server lacks the roles referenced by OWNER TO and GRANT statements.
Diagnose โ Check roles on the target with \du in psql.
Fix โ Restore roles first (pg_dumpall --roles-only from the source, or create them via IaC), or restore with --no-owner --no-privileges and reapply grants.
Prevent โ Include roles in the backup set and run automated restore tests into an empty instance, which catch exactly this.
Q95 You restored an RDS instance to a point in time, but the application cannot connect.
Intermediate
Likely causes โ A point-in-time restore creates a new instance with a new endpoint, and it may get the default security group, parameter group or subnet group rather than the original ones.
Diagnose โ
aws rds describe-db-instances --db-instance-identifier orders-pitr \
--query 'DBInstances[0].{endpoint:Endpoint.Address,sgs:VpcSecurityGroups,pg:DBParameterGroups}'Fix โ Attach the correct security groups and parameter group, then point the application to the new endpoint (update a Route 53 CNAME or the secret holding the host), or rename instances to swap endpoints.
Prevent โ Script PITR in the runbook with all parameters, and use a DNS name the application resolves instead of raw endpoints.
Q96 The nightly backup job reports success, but the backup files in S3 are 0 bytes.
Beginner
Likely causes โ The script pipes pg_dump | gzip | aws s3 cp -, and without pipefail only the last command's exit code counts; pg_dump failed (auth, connection) but the upload succeeded with empty input.
Diagnose โ Check job logs for pg_dump errors and list object sizes:
aws s3 ls s3://backups/orders/ --human-readable | tailFix โ
set -euo pipefail
pg_dump -Fc "$DATABASE_URL" | aws s3 cp - "s3://backups/orders/$(date +%F).dump"Prevent โ Alert on backup size anomalies and age, and verify each backup with a restore or at least pg_restore --list.
Q97 The backup CronJob silently stopped running. Events show Cannot determine if job needs to be started: too many missed start time (> 100). Set or decrease .spec.startingDeadlineSeconds or check clock skew.
Intermediate
Cannot determine if job needs to be started: too many missed start time (> 100). Set or decrease .spec.startingDeadlineSeconds or check clock skew.Likely causes โ The CronJob was suspended or the controller could not schedule it for a long time; after more than 100 missed schedules the controller stops trying without a startingDeadlineSeconds.
Diagnose โ
kubectl get cronjob -n ops db-backup -o yaml | yq '.spec.suspend, .spec.startingDeadlineSeconds, .status.lastScheduleTime'
kubectl get events -n ops --field-selector involvedObject.name=db-backupFix โ Set startingDeadlineSeconds (for example 3600), unsuspend, and trigger a manual run: kubectl create job --from=cronjob/db-backup db-backup-manual -n ops.
Prevent โ Alert on backup age, not on job status:
time() - kube_cronjob_status_last_successful_time{cronjob="db-backup"} > 26 * 3600 Q98 An auto-remediation job restarted the checkout deployment 412 times this week, and nobody noticed.
Advanced
Likely causes โ Automation turned a recurring failure (memory leak, deadlock) into silent toil. Each restart hid the symptom, and nobody alerted on how often the remediation ran.
Diagnose โ Count remediation runs from automation logs or metrics, and correlate with versions and memory growth.
Fix โ Open an incident or high-priority ticket to fix the underlying bug; add a rate limit to the automation (for example at most 3 restarts per hour, then page a human).
Prevent โ Every auto-remediation emits a metric, alerts when it runs more than expected, and creates a ticket for each run.
Q99 A Route 53 failover to the DR region took 25 minutes against an RTO of 5 minutes.
Advanced
Likely causes โ Health checks were slow to mark the primary unhealthy (long interval, high failure threshold), DNS TTLs were high, and clients cached DNS beyond the TTL (JVM networkaddress.cache.ttl, connection pools holding old connections).
Diagnose โ
aws route53 get-health-check-status --health-check-id <id>
dig +noall +answer shop.example.comReview client DNS caching settings and connection reuse.
Fix โ Use 10-second health checks with a low failure threshold, TTL of 60s or less on failover records, configure clients to respect TTLs and recycle connections, or use a global load balancer or AWS Global Accelerator instead of DNS alone.
Prevent โ Measure failover time in every DR drill and include client behaviour in the test.
Q100 The runbook linked from a page returns 404, and the on-call engineer improvised for 30 minutes.
Beginner
Likely causes โ The wiki moved, the runbook was renamed, or it was never written; alert annotations hard-code URLs that nobody validates.
Diagnose โ
curl -s localhost:9090/api/v1/rules | jq -r '.data.groups[].rules[] | select(.type=="alerting") | .annotations.runbook_url' \
| sort -u | while read u; do printf '%s %s\n' "$(curl -s -o /dev/null -w '%{http_code}' "$u")" "$u"; doneFix โ Restore or write the runbook, update the annotation.
Prevent โ Keep runbooks in Git next to the alert rules, require runbook_url in CI linting, and run the link checker above on a schedule.