Contact points define where alert notifications are sent. They represent integrations with external systems like email, Slack, PagerDuty, and many others.
A contact point can contain multiple integrations (receivers) that share the same name:
Contact Point
Notifier Types
interface EmbeddedContactPoint {
uid : string ; // Unique identifier
name : string ; // Contact point name (shared across integrations)
type : NotifierType ; // Integration type
settings : object ; // Type-specific configuration
disableResolveMessage : boolean ;
provenance ?: string ; // 'file' | 'api' | undefined
}
Integration Configuration
Email
{
"uid" : "email-1" ,
"name" : "ops-team" ,
"type" : "email" ,
"settings" : {
"addresses" : "[email protected] ,[email protected] " ,
"singleEmail" : false
},
"disableResolveMessage" : false
}
Comma-separated list of email addresses
Send a single email with all alerts (true) or separate emails (false)
Slack
{
"uid" : "slack-1" ,
"name" : "engineering" ,
"type" : "slack" ,
"settings" : {
"url" : "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXX" ,
"recipient" : "#alerts" ,
"username" : "Grafana" ,
"icon_emoji" : ":bell:" ,
"icon_url" : "" ,
"mentionChannel" : "here" ,
"mentionUsers" : "" ,
"mentionGroups" : "" ,
"title" : "{{ .CommonLabels.alertname }}" ,
"text" : "{{ range .Alerts }}{{ .Annotations.description }}{{ end }}"
},
"disableResolveMessage" : false
}
Slack webhook URL (incoming webhook)
Channel name (e.g., #alerts) or user (e.g., @username)
Mention channel: here, channel, or empty
Comma-separated user IDs to mention
{
"uid" : "pd-1" ,
"name" : "oncall" ,
"type" : "pagerduty" ,
"settings" : {
"integrationKey" : "${PAGERDUTY_KEY}" ,
"severity" : "critical" ,
"class" : "grafana-alert" ,
"component" : "monitoring" ,
"group" : "infrastructure" ,
"summary" : "{{ .CommonLabels.alertname }}"
},
"secureFields" : {
"integrationKey" : true
},
"disableResolveMessage" : false
}
PagerDuty integration key (stored securely)
Severity level: critical, error, warning, info
Webhook
{
"uid" : "webhook-1" ,
"name" : "custom-system" ,
"type" : "webhook" ,
"settings" : {
"url" : "https://example.com/webhook" ,
"httpMethod" : "POST" ,
"username" : "" ,
"password" : "" ,
"authorization_scheme" : "Bearer" ,
"authorization_credentials" : "${API_TOKEN}" ,
"maxAlerts" : 0 ,
"title" : "{{ .CommonLabels.alertname }}" ,
"message" : "{{ .CommonAnnotations.summary }}"
},
"disableResolveMessage" : false
}
settings.authorization_scheme
Authorization scheme: Bearer, Basic, or custom
Microsoft Teams
{
"uid" : "teams-1" ,
"name" : "devops" ,
"type" : "teams" ,
"settings" : {
"url" : "https://outlook.office.com/webhook/..." ,
"title" : "{{ .CommonLabels.alertname }}" ,
"message" : "{{ range .Alerts }}{{ .Annotations.description }}{{ end }}" ,
"sectiontitle" : "Alert Details"
},
"disableResolveMessage" : false
}
Discord
{
"uid" : "discord-1" ,
"name" : "monitoring" ,
"type" : "discord" ,
"settings" : {
"url" : "https://discord.com/api/webhooks/..." ,
"avatar_url" : "" ,
"use_discord_username" : false ,
"message" : "{{ .CommonAnnotations.summary }}" ,
"title" : "{{ .CommonLabels.alertname }}"
},
"disableResolveMessage" : false
}
Secure Fields
Sensitive data (API keys, passwords) are stored securely:
{
"uid" : "slack-1" ,
"name" : "team" ,
"type" : "slack" ,
"settings" : {
"url" : "${SLACK_WEBHOOK_URL}" , // Reference to secure storage
"recipient" : "#alerts"
},
"secureFields" : {
"url" : true // Indicates this field is encrypted
}
}
Secure fields:
Are encrypted at rest
Cannot be read via API (only written)
Use ${VAR_NAME} syntax in provisioning
Show as true in secureFields when set
Notification Options
Disable Resolve Messages
{
"disableResolveMessage" : true
}
When true, only firing alerts are sent. Resolution notifications are suppressed.
Notification Templates
Use Go templates to customize notification content:
Common Variables
Alert Variables
Template Examples
// Available in all templates
{{ . Status }} // firing or resolved
{{ . CommonLabels }} // Labels common to all alerts
{{ . CommonAnnotations }} // Annotations common to all alerts
{{ . GroupLabels }} // Labels used for grouping
{{ . ExternalURL }} // Link to Grafana
{{ . Alerts }} // List of all alerts
{{ . Alerts . Firing }} // List of firing alerts
{{ . Alerts . Resolved }} // List of resolved alerts
With Status
Notifier Status
interface ContactPointWithMetadata {
name : string ;
integrations : Integration [];
// Metadata
numberOfPolicies : number ; // How many policies use this
receiverStatus ?: { // Delivery status
active : boolean ;
errorCount : number ;
notifiers : NotifierStatus [];
};
}
Provisioning File
Provisioning Model
# conf/provisioning/alerting/contactpoints.yaml
apiVersion : 1
contactPoints :
- orgId : 1
name : ops-team
receivers :
- uid : email-ops
type : email
settings :
addresses : [email protected]
disableResolveMessage : false
- uid : slack-ops
type : slack
settings :
url : ${SLACK_WEBHOOK}
recipient : '#ops'
title : '{{ .CommonLabels.alertname }}'
disableResolveMessage : false
Backend Components
Contact Point Definition
Receiver Configuration
// Location: pkg/services/ngalert/api/tooling/definitions
type EmbeddedContactPoint struct {
UID string
Name string
Type string
DisableResolveMessage bool
Settings * simplejson . Json
Provenance string
}
Validation
Contact points are validated before being saved:
Type Validation
Integration type must be supported
Settings Validation
Required settings for the integration type must be provided
Name Validation
Name must be unique within the organization
Template Validation
Notification templates must be valid Go templates
URL Validation
Webhook URLs and other URLs must be valid
Grafana provides a test feature to verify configuration:
POST / api / alertmanager / grafana / config / api / v1 / receivers / test
Body :
{
"name" : "test-receiver" ,
"grafana_managed_receiver_configs" : [
{
"uid" : "test-1" ,
"name" : "test-receiver" ,
"type" : "slack" ,
"settings" : {
"url" : "https://hooks.slack.com/services/..." ,
"recipient" : "#test"
}
}
],
"alert" : {
"labels" : { "alertname" : "TestAlert" },
"annotations" : { "description" : "This is a test" }
}
}
Best Practices
Name contact points after the team or purpose (e.g., backend-team, critical-alerts, ops-pagerduty).
Group related integrations
Use multiple integrations in one contact point for notifications that should go to multiple places together.
Customize notification content
Use templates to make notifications informative and actionable. Include:
Alert name and severity
Relevant metric values
Runbook links
Dashboard links
Always test contact points before using them in production notification policies.
Use secure fields for API keys, tokens, and passwords. Never commit secrets to version control.
Handle resolve messages appropriately
Only disable resolve messages if the integration doesn’t support them or they’re not useful.
Troubleshooting
Notifications not being sent
Check notification policy routes to this contact point
Verify integration credentials are correct
Check contact point status for errors
Review alertmanager logs
Validate Go template syntax
Check that referenced labels/annotations exist
Test with the contact point test feature
Integration-specific issues
Slack: Verify webhook URL and channel name
Email: Check SMTP configuration in grafana.ini
PagerDuty: Confirm integration key is correct
Webhook: Check endpoint is accessible and accepts POST
Notification Policies Route alerts to contact points
Alert Rules Create rules that generate alerts
Notification Templates Customize notification content
Overview Understand the alerting architecture