Your first Grafana alert, from setup to recovery
Prepare your on-call team, connect Grafana, and create a practice alert that fires and recovers on its own. No existing monitoring data is needed.
Follow these steps in order for your first connection. Already have the response team, Grafana routing rule, enabled integration, endpoint and secret ready? Start at the contact point. Already have a working connection? Jump to your real service alerts.
Before you start
- A Comtinel workspace and an admin account. New here? Complete Getting started first.
- A running Grafana environment with permission to manage data sources, alert rules and contact points. Use self-hosted Grafana or Grafana Cloud. If you have neither, Grafana's starting guide explains the options, including a free Cloud account.
- One available test responder who can receive the selected phone, SMS or email notifications. Tell them this is a practice alert.
- Confirm external webhook activation for your workspace with Comtinel support. Grafana must be able to reach the HTTPS endpoint shown in Comtinel.
The practice configuration was exercised with Grafana OSS 13.2.2. Menu names vary: Alerting may be under Alerts & IRM. Cloud uses the same standard webhook format; test your own environment before relying on it.
Understand the notification path
Grafana rule → Webhook contact point → Comtinel routing rule → on-call responder. Grafana decides when the condition is firing or normal. Comtinel decides who responds and how to notify them.
Use Grafana integration when a Grafana-managed rule sends the notification, even if it queries Prometheus. When Prometheus Alertmanager sends it, use Prometheus integration. Viewing a Prometheus rule in Grafana does not change its delivery path.
1. Prepare Comtinel
Use a small test team first. You can enter the example names below as written.
- 1
Prepare the responder's contact methods
Check Plan → Users: the responder must be active and approved. Have them open the user menu → My profile → Notification channels, add their phone number if needed, enable SMS enabled, Voice call enabled and/or Email notifications enabled, then Save changes. See Notifications & responding.
- 2
Create the team and add members
Open Plan → Teams. Under Create team, enter Team name
grafana-test-teamand click Create. Open the team, select the responder under Members, and Save changes. New teams start without members. See Teams. - 3
Create a schedule covering the test time
Open Plan → Schedules → Create schedule. Enter Schedule name
grafana-test-schedule, choose the test team, rotation, timezone, handoff time and a start date that includes the test time. Select the responder under Participants, review the preview and click Create schedule. Confirm someone is on call now. See On-call schedules for each field. - 4
Create and configure the escalation policy
Open Route → Escalation policies. Enter Policy name
grafana-test-policy, select the test team as Initial owning team and click Create. Open the new policy to configure its first step.Under Targets, change the existing target type from Team to Schedule and choose
grafana-test-schedule. Under Notify channels, select the SMS, Voice call and/or Email channels to test. Click Save changes.
Create the routing rule
Open Route → Routing rules. In the Create rule section, fill these fields, then click Create rule:
grafana-test-routingGrafanaComtinelGrafanaTestAlertLeave blankLabel name: instance | Operator: = | Value: comtinel-testgrafana-test-teamgrafana-test-policyNames and labels must match exactly, including capitalization. Check the routing simulator with source Grafana and these values. Review existing rules, workflows and watchers so the test reaches only the intended responders. See Routing & escalation.
Enable the integration and copy its credential
- 1
Save the connection settings
Open System → Grafana integration. Check Integration enabled. For a new workspace, leave all optional Severity filter values unchecked, then Save settings. This accepts our example without a severity label.
- 2
Copy the endpoint and secret
Copy Webhook endpoint URL. For a new connection, click Generate secret and copy the value while it is shown. Keep it securely available for the next step; it is shown once. Use this Grafana secret, not a Jira/Prometheus secret or Grafana API token.
severity value to the rule and custom test below, and use that value for any panel test. If a secret is already configured, use your securely stored value. If lost, rotate it and update the connected Grafana contact point; allow up to 60 seconds for the change, then retest.2. Create the Grafana contact point
In Grafana, open Alerting → Contact points (possibly under Alerts & IRM). If prompted, select the Grafana Alertmanager. Click Add contact point or New contact point.
comtinel-testWebhookPaste the complete Webhook endpoint URL from ComtinelPOSTBearerOnly your Comtinel Grafana secret, without a Bearer prefix0Off / uncheckedExpand Optional Webhook settings to find additional fields if needed. Leave Basic Authentication empty. Keep the default JSON payload and Custom Payload unset. The standard webhook uses application/json; no extra content-type header is needed.
The URL resembles https://comtinel.com/webhooks/grafana/YOUR_WORKSPACE_ID. Use the exact workspace URL, including https://. Keep the secret in the credentials field, not in the URL. Click Save contact point.
Reference: Grafana webhook settings.
3. Send one connection test
- 1
Open a custom test
Open
comtinel-testfor editing and click Test. Choose Custom. The predefined test may useTestAlert, which does not match our routing rule. - 2
Set labels and summary
In Labels, replace any existing
alertnamevalue withComtinelGrafanaTestAlert. Add label nameinstancewith valuecomtinel-test. Do not create a second alertname entry. Omit severity for the default example, or add an allowedseverityvalue if your workspace filters it.In Annotations, set
summarytoGrafana connection test. Click Send test notification once. - 3
Verify delivery and close this test
Grafana should report success. In Comtinel Incidents, open
Grafana connection test. Check source Grafana, team and policy, and confirm the selected notifications arrived on the responder's device. Click Accept incident, then Mark resolved to close this synthetic test.
Choose which rules notify Comtinel
For practice, select comtinel-test directly in the rule's notification settings. Grafana also supports notification policies that match labels and select contact points for several rules. The production section explains that option. You do not need to change the default notification policy for this walkthrough.
4. Create a real practice alert
This signal is 1 for four minutes, then 0 for two minutes, repeating. We alert when its latest value exceeds 0.5, so you can test recovery without editing a rule or affecting a service.
- 1
Add TestData
In Grafana open Connections → Add new connection, search for TestData, then Add new data source. Some versions start at Connections → Data sources → Add new data source. Name it
comtinel-testdata, leave it separate from your default data source, and click Save & test. Confirm it is working. No external URL or credentials are needed. - 2
Create the rule
Open Alerting → Alert rules → New alert rule. Choose Grafana-managed if asked. Name it exactly
ComtinelGrafanaTestAlert. Under Define query and alert condition, selectcomtinel-testdatafor query A. Switch to advanced query/expression mode if the editor initially shows a simplified condition.
Query A: Predictable Pulse
Choose Predictable Pulse in the Scenario selector. Set these values and leave other TestData settings at their defaults:
From: now-10m | To: now (10 minutes to now)10 seconds24 / 121 / 01Expressions B and C: latest value and threshold
- 1
B: Reduce
Add an expression of type Reduce, or edit the existing one. Set Input A, Function Last, Mode Strict. Keep its reference as B. This reads the latest sample instead of averaging the previous ten minutes.
- 2
C: Threshold
Add or edit a Threshold expression with Input B, condition Is above, value 0.5. Choose Set as alert condition on C if needed. Preview: B and C can be 1 or 0 depending on the pulse phase. Reuse default B/C expressions where present and remove unused extras.
Folder, labels and evaluation
Create or select folder Comtinel practice. In Labels, enter each name and value separately and confirm the custom value in the editor:
comtinel-testmanaged-ruleGrafana supplies alertname from the rule name. Do not add it again. Omit severity for the default example, or add an allowed value if your saved Comtinel filter requires it.
Create new: comtinel-practice10s0s / None0s / NoneIf 10 seconds is not allowed, use your environment's permitted interval, ideally one minute or less for this practice signal, and allow for that delay. Keep No data and Error handling at their defaults for this example.
Contact point and delivery timings
Under Configure notifications, select direct contact-point delivery and choose comtinel-test. Enable Override general timings if shown and enter:
10s30s1mKeep the default grouping for this single-instance test. These short timings are for practice only. A long group interval can skip over this signal's two-minute Normal phase, so set the test timings before saving the rule.
If direct-rule timing overrides are unavailable, create a dedicated child notification policy matching test_kind=managed-rule and instance=comtinel-test. Select comtinel-test, override its timings with the three values above, and configure this rule to use notification policies. Keep the global default policy unchanged.
Grafana practice alertPractice firing, ACK and automatic recovery. Pause this rule after the test.Review the name, labels and contact point, then click Save rule and exit. Open Instances or History on the saved rule to watch its state.
References: TestData alert testing and Grafana-managed rules.
5. Check two cycles and clean up
- 1
Firing: confirm the incident and notification
Wait for Grafana to show Firing (or Alerting for an instance). After the delivery delay, open
Grafana practice alertin Comtinel. Check source Grafana, test team, policy, labels and rule link. Confirm the selected notifications arrived on the responder's device. - 2
Accept and observe repeats
Click Accept incident, or acknowledge through the phone prompt. During this firing period, repeated Grafana notifications should retain one incident without restarting calls after ACK. If the first period was almost over when you started, observe repeats in the next full period.
- 3
Normal: verify automatic closure
When the signal drops to 0, Grafana should show Normal. Wait for its resolved notification and confirm the same Comtinel incident becomes Resolved without Mark resolved. The signal stays normal for two minutes before the next firing period.
- 4
Refire: verify a new incident
Keep the rule name and labels unchanged. The next firing period should create a new incident and notifications. Accept this one too, then wait for its automatic recovery.
- 5
Pause after the second recovery
After the second Comtinel incident automatically resolves, open the Grafana rule → More → Pause evaluation. Confirm Paused. Keep the paused rule for reference or remove it later. Close remaining synthetic tests and remove any test-only policies you added. Do not disable ingestion while waiting for recovery.
The test passes when both cycles reach the intended responder, ACK stops escalation, repeats stay in the same incident and recovery closes it. Record the Grafana version or Cloud stack, date and incident references. Verify each independent environment separately.
6. Connect your real service alerts
- 1
Choose a service rule
In Grafana Alert rules, open a Grafana-managed service rule and click Edit, or create one. Use the service's real data source and agreed threshold instead of TestData. Choose suitable evaluation, pending and recovery settings, a clear summary and description, and optionally a
runbook_urlannotation. - 2
Create the matching Comtinel route
In Routing rules, use source Grafana and the actual alert name and labels, such as
service=checkoutandenv=production. Select the owning team and policy and check the simulator. Our example route only matchesComtinelGrafanaTestAlert; it does not automatically catch other service alerts. - 3
Attach the contact point
Select the Comtinel contact point in the service rule's notification settings and save. Rename
comtinel-testto an ongoing name or create a dedicated service contact point with the same workspace connection settings. Replace the short practice timing overrides with your team's intended timings. - 4
Verify a controlled service alert
Use a safe test condition agreed with the service owner. Confirm routing and delivery, acknowledge, restore the condition and check automatic recovery. Keep the TestData practice rule paused.
Alternative: a narrow Grafana notification policy
For centrally managed delivery, open Alerting → Notification policies. Add a child policy under the intended parent, match labels such as comtinel = true and env = production, select the Comtinel contact point and save. Add those labels to the intended rules and select notification-policy delivery instead of direct contact-point selection. Verify the matching route and review sibling/continuation settings to avoid duplicate deliveries.
The Grafana policy selects the destination; Comtinel routing selects the responders. Keep the default Grafana destination and unrelated routes intact.
DatasourceNoData and DatasourceError can be independent alerts; decide explicitly who receives them. The narrow practice alert-name route does not match their different names; an unrestricted catch-all may page them. Grafana watchers require a matching source and severity. Keep notification groups below 200 alerts and 1 MiB using narrower grouping. Max Alerts truncates excess alerts instead of splitting them into later deliveries.Troubleshooting
Do I need Prometheus for this walkthrough?
No. Grafana's built-in TestData source generates the practice signal. You need a working Grafana environment and a Comtinel workspace. Use your own monitoring data source for real service alerts.
My Grafana rule queries Prometheus. Which integration should I use?
Use Grafana integration when a Grafana-managed rule sends through a Grafana contact point. Use Prometheus integration when Prometheus Alertmanager sends the webhook. Choose one delivery path per alert to avoid separate incidents.
Do I need a Grafana API token in Comtinel?
No. Grafana sends notifications using the Grafana webhook secret from your Comtinel workspace. Comtinel does not log into Grafana or create its rules.
Does Accept stop the Grafana rule?
No. Accept acknowledges ownership and stops Comtinel escalation. Grafana keeps evaluating. Its resolved notification closes the incident. Pause the practice rule after recovery to stop future test cycles.
Why is the contact point Test incident still open?
The Test button sends a synthetic notification without a later recovery. Accept it, then use Mark resolved in Comtinel. Check automatic recovery separately with the real practice rule.
Can several Grafana instances share one workspace?
Connect one logical Grafana instance and organization per workspace. Use separate workspaces for independent Grafana senders. Jira and Prometheus can coexist with Grafana using their own secrets and routing rules.