Skip to content

Alerts

Configure alerting rules and notifications.

Creating Alerts

  1. Go to AlertsRules
  2. Click Create Rule
  3. Configure conditions
  4. Set notification channels
  5. Save

Alert Conditions

yaml
# CPU usage above 80% for 5 minutes
- name: High CPU Usage
  condition: cpu_percent > 80
  duration: 5m
  severity: warning

# Service down
- name: Service Down
  condition: service_status == "down"
  duration: 1m
  severity: critical

# Error rate spike
- name: High Error Rate
  condition: error_rate > 5
  duration: 2m
  severity: warning

Notification Channels

Slack

yaml
notifications:
  slack:
    webhook_url: https://hooks.slack.com/services/xxx
    channel: "#ops-alerts"
    mention_on_critical: "@here"

Discord

yaml
notifications:
  discord:
    webhook_url: https://discord.com/api/webhooks/xxx

Email

yaml
notifications:
  email:
    smtp_host: smtp.gmail.com
    smtp_port: 587
    from: alerts@example.com
    to:
      - oncall@example.com

PagerDuty

yaml
notifications:
  pagerduty:
    integration_key: xxx
    severity_mapping:
      critical: critical
      warning: warning

Alert States

StateDescription
pendingCondition met, waiting for duration
firingAlert is active
resolvedCondition no longer met

Silencing

Temporarily silence alerts:

bash
# Via UI: Alerts → Silences → Create
# Via API:
curl -X POST /api/v1/alerts/silence \
  -d '{"matcher": "service=api", "duration": "2h", "reason": "Planned maintenance"}'

Released under the MIT License.