Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Alerting

Alertmanager is the notification hub of the DIGIT observability stack. It receives firing alerts from Prometheus, applies grouping and deduplication rules, suppresses noise, and routes notifications to the right channels. It is deployed as part of the kube-prometheus-stack via Helmfile.

Accessing Alert Manager

Alertmanager does not have a public ingress by default. Use port-forwarding to access the web UI:

kubectl port-forward svc/kube-prometheus-stack-alertmanager -n monitoring 9093:9093
# Open http://localhost:9093 in a browser

The Alertmanager web UI shows all currently firing alerts, their labels, severity, and routing destination. You can also create silences directly in the UI for planned maintenance windows.

Configuring Alert Rules & Channels

Alertmanager configuration is stored as a Kubernetes secret. Add the alertmanager config to your <env>-secrets.yaml (encrypted with SOPS) before deploying. A typical configuration routes all alerts to a Slack channel:

# In <env>-secrets.yaml (encrypt with SOPS before committing)
alertmanager:
  config:
    global:
      resolve_timeout: 5m
    route:
      group_by: ['alertname', 'namespace']
      group_wait: 30s           # Wait before sending first alert in a group
      group_interval: 5m        # Wait before re-notifying after new alert in group
      repeat_interval: 12h      # Re-notify if alert is still firing after this interval
      receiver: 'slack-critical'
      routes:
        - match:
            severity: warning
          receiver: 'slack-warnings'
    receivers:
      - name: 'slack-critical'
        slack_configs:
          - api_url: '<your-slack-webhook-url>'
            channel: '#digit-alerts-critical'
            send_resolved: true
      - name: 'slack-warnings'
        slack_configs:
          - api_url: '<your-slack-webhook-url>'
            channel: '#digit-alerts-warnings'
            send_resolved: true

Supported Notification Channels

CHANNEL
CONFIGURATION KEY & USE CASE

Slack

slack_configs with api_url (webhook URL) and channel. Most common for DevOps teams. Supports message templating with alert labels and annotations.

Email

email_configs with to, from, smarthost, auth_username, auth_password. Use for stakeholder notifications and escalation to management.

PagerDuty

pagerduty_configs with service_key. Use for critical P1 alerts requiring on-call paging with escalation policies.

Webhook

webhook_configs with url. Send alert payloads to any HTTP endpoint — integrate with ticketing systems (Jira), custom dashboards, or runbook automations.

OpsGenie

opsgenie_configs with api_key and api_url. Alternative to PagerDuty for on-call management.

Key Alert Rules To Configure

The kube-prometheus-stack ships with default Kubernetes alerting rules. The following are the most critical rules to verify are enabled and tuned for DIGIT production environments:

ALERT NAME
SEVERITY
FIRES WHEN
ACTION

KubePodCrashLooping

Critical

A pod restarts more than 5 times in 1 hour

Check logs: kubectl logs <pod> -n egov --previous

KubeNodeNotReady

Critical

A node has not been Ready for > 15 minutes

Inspect node: kubectl describe node <node-name>

KubePVCFull

Critical

PVC is > 85% full

Expand PVC or clean up ES indices with ES-Curator

KubeMemoryOvercommit

Warning

Pod memory requests exceed node capacity

Review resource limits in Helm values and reschedule pods

KubeDeploymentReplicasFail

Warning

Deployment has fewer Ready replicas than desired

Check pod events: kubectl get events -n egov

TargetDown

Critical

A Prometheus scrape target is unreachable

Verify service endpoints and serviceMonitor config

EndpointDown (Blackbox)

Critical

An HTTP probe fails (citizen/employee portal)

Check Nginx Ingress, pod health, and DNS resolution

SSLCertExpiry

Warning

SSL certificate expires in < 30 days

Trigger Cert-Manager renewal or upload new certificate

KafkaConsumerLag

Warning

Kafka consumer group lag > configured threshold

Scale Persister replicas or check Kafka broker health

ElasticClusterHealth

Critical

Elasticsearch cluster status is Red

Check unassigned shards: GET /_cluster/health?pretty

RedisMemoryHigh

Warning

Redis memory usage > 80%

Review TTL policies, increase memory limit, or scale Redis

PostgresConnections

Warning

Active connections > 80% of max_connections

Check for connection leaks, tune max_connections in postgres config

Silences & Inhibition Rules

MECHANISM
WHEN TO USE

Silence

Mute alerts during a planned maintenance window. Create via the Alertmanager web UI at http://localhost:9093 or via the API. Set an expiry time so silences do not persist indefinitely.

Inhibition rule

Suppress lower-severity alerts when a higher-severity alert is already firing. Example: suppress pod-level warnings when the entire node is reporting as NotReady. Configure in the alertmanager.config in secrets.yaml.

Repeat interval

Set repeat_interval to prevent notification storms for persistent issues. Default recommendation: 12h for critical, 24h for warnings.

ALERT FATIGUE: Keep the number of active alert rules focused on actionable conditions. Alerts that fire and resolve without human action erode team responsiveness. Review and tune thresholds after the first month of production operation.

Last updated

Was this helpful?