How grafana-cold-storage/oncall works
Grafana OnCall is an incident-response and on-call management application, integrated with Grafana. Its principal workflow collects alerts from monitoring systems, groups and escalates incidents according to on-call policies, then notifies responders through configured channels. Schedules, APIs, Grafana integration, and metrics are distinct supporting capabilities. The README documents the product workflow; sampled source shows route handling, model responsibilities, and selected integrations, but most runtime wiring was not sampled, so inferred workflow links are dashed and uncited.
Main entry points: routes.py Public API · messaging.py Notification backends · alert_group.py Alert grouping · OutgoingWebhookForm.tsx Grafana plugin
Components 24
Alert intake
- Alert integrations
engine/apps/integrations/views.py - Alert channels
engine/apps/alerts/models/alert_receive_channel.py - Incoming alerts
engine/apps/alerts/models/alert.py - Alert grouping
engine/apps/alerts/models/alert_group.py - Channel filters
engine/apps/alerts/models/channel_filter.py
Incident response
- Escalation policies
engine/apps/alerts/models/escalation_policy.py - Escalation tasks
engine/apps/alerts/tasks/escalate_alert_group.py - Incident history
engine/apps/alerts/models/alert_group_log_record.py
On-call and notifications
- On-call schedules
engine/apps/schedules/models/on_call_schedule.py - Notification backends
engine/apps/base/messaging.py - Slack integration
engine/apps/slack/alert_group_slack_service.py - Telegram updates
engine/apps/telegram/updates/update_manager.py - Phone notifications
engine/apps/phone_notifications/phone_backend.py
Grafana and APIs
- Public API
engine/apps/public_api/views/routes.py - Route serializers
engine/apps/public_api/serializers/routes.py - API permissions
engine/apps/api/permissions.py - Token authentication
engine/apps/auth_token/auth.py - Grafana plugin
grafana-plugin/src/containers/OutgoingWebhookForm/OutgoingWebhookForm.tsx - Grafana sync
engine/apps/grafana_plugin/sync_data.py
Observability
- Metrics exporter
engine/apps/metrics_exporter/metrics_cache_manager.py - Metric cache helpers
engine/apps/metrics_exporter/helpers.py - Application database
engine/common/database.py
Other components
- Monitoring systems
- Grafana
Connections 21
- Monitoring systems → Alert integrations: sends alerts
- Alert integrations → Alert channels: targets channels
- Alert channels → Incoming alerts: receives alerts
- Incoming alerts → Alert grouping: groups alerts
- Alert grouping → Escalation policies: escalates incidents
- Escalation policies → Escalation tasks: drives escalation
- Alert grouping → Incident history: records history
- On-call schedules → Escalation tasks: provides rotations
- Notification backends → Slack integration: supports notifications
- Notification backends → Telegram updates: supports notifications
- Notification backends → Phone notifications: supports notifications
- Grafana → Grafana plugin: hosts plugin
README.md - Grafana plugin → Grafana sync: requests sync
- Grafana plugin → Public API: calls engine API
README.md - Public API → Token authentication: authenticates with
engine/apps/public_api/views/routes.py - Public API → API permissions: checks permissions
engine/apps/public_api/views/routes.py - Public API → Route serializers: uses serializers
engine/apps/public_api/views/routes.py - Public API → Channel filters: queries filters
engine/apps/public_api/views/routes.py - Route serializers → Channel filters: validates and updates
engine/apps/public_api/serializers/routes.py - Metric cache helpers → Metrics exporter: updates metric cache
engine/apps/metrics_exporter/metrics_cache_manager.py - Grafana → Metrics exporter: scrapes metrics