Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › alerting

Thirty-Four Pods Each Failed a Little and Our Alert Judged Them One at a Time: Fixing Per-Pod Alerting

By Freedom251 Team · · 6 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When many pods each show a small failure and your alert fires once per pod, the problem is usually that the alert is answering the wrong question. A pod-level signal is useful for diagnosis. It is rarely the right thing to wake a person for. The fix is one of three controls, or a combination: change the alert expression so it describes the service, change how Alertmanager groups notifications, or add inhibition for pages that become redundant during a broader incident. The “thirty-four” here is an illustrative number from the title, not a measured statistic.

Start with the question the page should answer

Before touching configuration, decide what a human is being asked to act on. Are 34 small failures evidence of user-visible degradation, or 34 redundant views of one cause, such as a bad deploy, a slow dependency or a node problem?

As an Amazon Associate I earn from qualifying purchases.

Prometheus’s alerting practices recommend alerting on symptoms associated with end-user pain, keeping the number of alerts low, allowing slack for small blips, and avoiding pages where no action is needed. They also suggest linking alerts to consoles that help locate the faulty component (Prometheus: Alerting practices). The documentation puts it this way: “Aim to have as few alerts as possible, by alerting on symptoms that are associated with end-user pain rather than trying to catch every possible way that pain could be caused.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

No source gives a universal pod count or error percentage that should trigger a page. Any threshold has to come from your own service objective, workload and measurement window.

Why one alert per pod happens

A Prometheus alert rule evaluates an expression, and each resulting series with its label set becomes an alert instance. If the expression keeps the pod label, you get an instance per pod. Add a for duration and each instance must stay active for that period before it fires (Prometheus: Alerting rules). So 34 pods each crossing a small threshold produce 34 independent alerts, even though each one is individually minor.

Two layers are involved, and they are separate jobs. Prometheus evaluates rules. Alertmanager handles grouping, routing, silencing and inhibition of the notifications (Prometheus: Alerting overview).

Three controls, compared

Control What changes What the page represents Detail retained Main risk
Aggregate the expression The alert condition itself A workload- or service-level condition Only what you keep in labels or link to dashboards A severe failure in a minority of pods can be averaged away
Group notifications in Alertmanager The shape of the notification Still individual pod conditions, delivered together The member alerts remain visible in the grouped notification Each pod condition still has to be worth firing; a broad incident can look like a routine batch
Inhibit Suppression between alerts The broader alert wins; narrower ones are muted Suppressed alerts are not notified while the inhibiting alert fires Hides detail if the broader alert is mis-scoped; it does not replace choosing a good symptom

Alertmanager can combine similar alerts into one compact notification, for example grouping by cluster and alert name, while still showing which instances are affected. It also supports inhibition of notifications while a broader alert is firing (Alertmanager documentation).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Option 1: Alert on the aggregate

If the page should mean “the service is degraded,” express that directly. Aggregate the per-pod signal to the workload or service, for example summing errors and requests across pods before dividing, so the result is one series per service rather than one per pod. Grafana’s high-cardinality guidance takes the same line for the relevant case: alert on an aggregate rather than on each member, while the affected members can remain visible (Grafana: High-cardinality alerts). Check the current plugin documentation for its exact implementation before relying on it.

A sketch of the shape, with hypothetical metric names and thresholds you must replace with your own:

- alert: CheckoutErrorRatioHigh
  expr: |
    sum by (namespace, service) (rate(http_requests_total{code=~"5.."}[5m]))
    /
    sum by (namespace, service) (rate(http_requests_total[5m]))
    > 0.02
  for: 10m
  labels:
    severity: page
  annotations:
    summary: "Error ratio above 2% for {{ $labels.service }}"
    runbook_url: "https://example.com/runbooks/checkout-errors"

Summing before dividing weights pods by traffic, which is usually what users experience. The for clause filters short-lived conditions, but the right duration depends on the workload and on how costly waiting is. Newer Prometheus versions also offer keep_firing_for, which holds an alert firing for a set time after the condition stops matching and can reduce flapping. Confirm syntax against your installed version.

Guarding against hidden minority failures

Aggregation can mask a bad pod or a single unhealthy zone. The sources establish the mechanisms but no safe universal threshold, so treat this as a design choice. Common mitigations are a lower-severity, ticket-level alert for per-pod or per-zone conditions, or a separate aggregate such as “fewer than N ready replicas” that reflects your capacity needs.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Option 2: Keep per-pod alerts, group the notifications

If pod-level alerts are still valuable but should not each notify separately, group them in the Alertmanager route. Grouping labels decide which alerts share a notification. A route like this puts all pods with the same alert name in the same cluster and namespace into one message:

route:
  receiver: team-oncall
  group_by: ['cluster', 'namespace', 'alertname']
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 4h

The key point is what you leave out of group_by: omit pod and instance, or every pod gets its own group again. Group timing then determines when the first notification goes out and how new members join an existing group; the values above are placeholders to tune, not recommendations. Include the pod list in the notification template so responders see affected members, plus a dashboard link and runbook annotation.

Grouping is not deduplication of meaning. Thirty-four alerts still exist; they are simply delivered together. If each one is individually below the level worth acting on, grouping makes a quieter page but not a more accurate one.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Option 3: Inhibit redundant pages

Inhibition mutes target alerts while a source alert is firing, matched on shared labels. Use it when a confirmed broad condition makes narrower pages redundant, such as a node-down or whole-service-down alert silencing per-pod symptoms in the same namespace. Use equal labels carefully so only truly related alerts are suppressed. Inhibition depends on a good broader alert existing; it is not a substitute for one. In a highly available Alertmanager setup, each Prometheus should send alerts to all Alertmanager instances rather than load-balancing them (Prometheus: High availability).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choosing which to apply

  1. Ask whether a human would take a different action for 34 failing pods than for one. If not, the pod-level condition is diagnostic, not page-worthy.
  2. If the real concern is service impact, move the page to an aggregate expression and demote the per-pod alerts to tickets or dashboards.
  3. If per-pod alerts must remain, remove pod from group_by and put the member list in the notification template.
  4. If a broad alert already exists, add inhibition for the narrower ones sharing its labels.
  5. Check the result against a past incident: would the new setup have paged, once, at a useful time, with enough information to find the pods?

Check what your metrics actually expose

Metric availability varies by cluster. Kubernetes notes that access to a component’s /metrics endpoint may require RBAC authorization, and exposed metrics depend on configuration and version (Kubernetes: Metrics for system components). Verify the labels and series you rely on in your own Prometheus before writing the aggregate.

The Bottom Line

Make the page describe the service, not the pod. Aggregate the condition when the question is user impact, group notifications when per-pod detail still matters, and inhibit only when a broader alert already covers the incident. Keep pod labels, links and runbooks in the notification so nothing needed for diagnosis is lost.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

alertingAlertmanagerKubernetesobservabilityPrometheusSRE

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.