Turn Prometheus alerts into an on-call response
Connect Alertmanager to your workspace, choose which alerts reach people, and verify firing, acknowledgement and resolution before enabling production traffic.
This integration creates Comtinel incidents directly from monitoring alerts. You do not need to create a Jira issue first. Keep your existing Jira connection if your team also receives support tickets: both sources can share one workspace and use different response teams.
For rules evaluated by Grafana and sent through its contact points, follow Grafana integration, including when the rule queries a Prometheus datasource.
Which system does what?
If you know Jira Automation, the equivalent of its trigger and condition is a Prometheus alert rule. Its “Send web request” action is the Alertmanager receiver; its closed-status update is Alertmanager's resolved notification. Grafana can display these metrics, but a dashboard is not the sender. This chapter uses Prometheus rules and Alertmanager, not Grafana-managed contact points. See the Alertmanager overview.
Before you begin
- A Comtinel workspace admin can configure integrations, teams and routing. Ask your monitoring owner to handle Prometheus and Alertmanager changes.
- For a new workspace, ask Comtinel support to confirm Prometheus webhook activation and the required network permissions before testing.
- Alertmanager must reach the HTTPS webhook URL. Prometheus must reach Alertmanager. Metric targets stay in your own environment.
- Choose a test window and willing responders with verified contact methods. These tests can send real emails, SMS messages and calls.
For a VM or container deployment, edit the configuration files mounted into the running services. File paths below are examples, not installation instructions. For Kubernetes, identify the owning Operator or Helm release first; its resources, selectors and mounted secrets control which configuration actually reaches the pods.
Prepare the response path in Comtinel
- 1
Choose the people who will receive the test
Create or select a test team, include the responders, and create an on-call schedule covering the test time. Attach an escalation policy with the intended targets and channels.
- 2
Create a Prometheus routing rule
In Routing rules, choose source Prometheus, alert name
ComtinelTestAlertand severitycritical. Add the exact label matcherinstance=comtinel-testand select the test team and policy. This matches both the panel test and the temporary rule below. A workspace containing only Jira rules will leave Prometheus incidents unrouted, without escalation. - 3
Copy the integration URL and generate its secret
Open Prometheus integration in your workspace navigation. Copy the displayed URL and click Generate secret. Save the secret securely when shown; it cannot be retrieved later.
Example endpoint — use the URL shown in your workspacehttps://comtinel.com/webhooks/prometheus/YOUR_WORKSPACE_ID - 4
Save enabled status and the severity allowlist
Enable the integration and keep
criticalselected for the test. The default allowlist iscriticalandwarning. Save your settings before sending anything. These values match the alert'sseveritylabel; they are separate from routing filters.
The Prometheus secret is different from the Jira secret. A Jira token will not authenticate this endpoint. For FYI recipients, add a separate Prometheus severity watcher rule on the team; existing Jira watcher rules remain Jira-only.
Connect your Prometheus instance to Alertmanager
The following is a complete minimal Prometheus configuration for a new instance. Replace the host placeholders with addresses reachable from Prometheus. On an existing instance, merge the rule file, Alertmanager target and any missing scrape job into its existing lists; keep your current jobs and settings. Use your deployment's TLS and authentication settings for protected monitoring endpoints.
# /etc/prometheus/prometheus.yml — minimal example for a new instance
global:
scrape_interval: 30s
evaluation_interval: 30s
rule_files:
- /etc/prometheus/rules/comtinel*.yml
alerting:
alertmanagers:
- static_configs:
- targets: ['YOUR_ALERTMANAGER_HOST:9093']
scrape_configs:
- job_name: node-exporter
static_configs:
- targets: ['YOUR_NODE_EXPORTER_HOST:9100']The production example below reads CPU counters exposed by node_exporter. First confirm its target is healthy and node_cpu_seconds_total returns data in Prometheus. The expression measures average non-idle CPU per instance over five minutes; it does not require a pre-existing recording rule. Adapt its threshold and duration to your service. Node Exporter setup and Prometheus configuration describe the underlying setup.
# /etc/prometheus/rules/comtinel.yml
groups:
- name: comtinel-hosts
rules:
- alert: HighCPUUsage
expr: 100 * (1 - avg by (instance) (rate(node_cpu_seconds_total{job="node-exporter",mode="idle"}[5m]))) > 90
for: 5m
labels:
severity: critical
service: linux-hosts
env: production
comtinel: "false" # Change to "true" after the controlled test passes.
annotations:
summary: "CPU above 90% on {{ $labels.instance }}"
description: "Average CPU utilisation has remained above 90% for 5 minutes."
runbook_url: "https://YOUR_RUNBOOK_HOST/high-cpu"In Comtinel, add a production rule with source Prometheus, alert name HighCPUUsage, and label matchers service = linux-hosts and env = production. Send it to your production team and policy. annotations.summary supplies the incident title; the runbook link should point to your own instructions. Keep changing measurements in annotations rather than identity labels. Leave comtinel: "false" until the controlled test below passes; then change it to "true" to enroll this production alert.
Send only selected alerts to Comtinel
Store only the secret value in /etc/alertmanager/secrets/comtinel-token, readable by the Alertmanager process. In a container, mount that file into the container; a host-only path is not enough. Do not prefix the file's contents with Bearer.
# New, dedicated Alertmanager only; do not replace an existing config.
route:
receiver: unselected-alerts
group_by: ['alertname', 'instance']
group_wait: 0s # a longer wait delays the first page by exactly that long
group_interval: 1m
repeat_interval: 4h
routes:
- receiver: comtinel
matchers:
- 'comtinel="true"'
receivers:
# This dedicated example sends no notifications for unselected alerts.
- name: unselected-alerts
- name: comtinel
webhook_configs:
- url: https://comtinel.com/webhooks/prometheus/YOUR_WORKSPACE_ID
send_resolved: true
max_alerts: 200
timeout: 25s
http_config:
authorization:
type: Bearer
credentials_file: /etc/alertmanager/secrets/comtinel-tokencomtinelreceiver and a narrow child route to its current tree. Keep all existing receivers and routes. Review rule order and verify that established destinations still receive their alerts.The comtinel="true" matcher makes enrollment explicit. Use continue: true only when later sibling routes should also receive a matching alert; it does not automatically send it to the parent's default receiver. Keep send_resolved: true. The 200-alert cap truncates larger groups rather than splitting them: use more specific grouping and investigate truncation before production. Check the official Alertmanager configuration reference for your installed version.
Validate, then reload your monitoring configuration
promtool check rules /etc/prometheus/rules/comtinel*.yml
promtool check config /etc/prometheus/prometheus.yml
amtool check-config /etc/alertmanager/alertmanager.ymlCorrect validation errors before reloading. Use your deployment's normal reload mechanism, or the management endpoints below. Prometheus requires --web.enable-lifecyclefor HTTP reload; both services also support SIGHUP. Keep management access on your trusted network. Inspect reload logs and the loaded configuration afterwards. Prometheus reload and Alertmanager reload are documented separately.
# Use your authenticated management URLs on your trusted network.
# Prometheus requires --web.enable-lifecycle for this endpoint.
curl --fail --request POST 'http://YOUR_PROMETHEUS_HOST:9090/-/reload'
curl --fail --request POST 'http://YOUR_ALERTMANAGER_HOST:9093/-/reload'With Prometheus Operator, use PrometheusRule for the alert groups and the selected AlertmanagerConfig or configuration Secret for delivery. Confirm namespace/label selectors include your resources, and the receiver can read its Secret. Helm values and CRD fields depend on your chart and Operator version; do not paste native alertmanager.yml under an assumed Helm key. Follow the Operator alerting guideand your chart's configuration reference.
Prove the complete lifecycle with a controlled alert
A temporary rule avoids creating a real CPU problem. Save the group below in its own comtinel-test.yml file, covered by the comtinel*.yml rule-file pattern above. Validate and reload. Keep the label set unchanged throughout this test.
To observe a repeat without waiting four hours, temporarily use repeat_interval: 2m and group_interval: 1m on a dedicated test Alertmanager or a test-only child route matching all three labels: alertname="ComtinelTestAlert", instance="comtinel-test" and comtinel="true". Place the test route before broader matching sibling routes and send it to the Comtinel receiver. Keep production intervals unchanged, validate the configuration and reload before firing the test.
# /etc/prometheus/rules/comtinel-test.yml — separate temporary file
groups:
- name: comtinel-connectivity-test
rules:
- alert: ComtinelTestAlert
expr: vector(1)
for: 1m
labels:
severity: critical
instance: comtinel-test
job: comtinel-test
service: comtinel-test
env: test
comtinel: "true"
annotations:
summary: "Planned Comtinel end-to-end test"
description: "Temporary alert owned by the integration test team."- 1
Watch pending become firing in Prometheus
Find
ComtinelTestAlerton the Alerts page. The example waits one minute before firing. Allow for the evaluation interval and Alertmanager's grouping delay; this is not an immediate button response. - 2
Check Alertmanager and the Comtinel incident
Confirm Alertmanager has the alert with
comtinel="true". In Comtinel Incidents, inspect the source, alert name, labels, selected team and policy. Confirm the expected responder actually receives the notification. - 3
Accept the incident
Have the responder accept it and verify the status becomes accepted. Further escalation stops; the alert in Prometheus should still be firing because its condition has not changed.
- 4
Observe one Alertmanager repeat
Keep the condition firing until Alertmanager sends another notification after the temporary repeat interval. Verify the repeat in its delivery logs, then check Comtinel still shows the same accepted incident with no additional escalation cycle. Do not count an unchanged browser view alone as proof that another webhook arrived.
- 5
Clear the condition without changing its identity
Change only the test expression to
vector(0) == 1, validate and reload. Do not usevector(0)alone: it still produces a vector element and would keep the alert active. Wait for evaluation and the next Alertmanager notification, then confirm the same Comtinel incident is resolved. - 6
Check a new firing, then clean up
If you need to verify recurrence, restore
vector(1)after resolution. Confirm a new incident appears for the new firing episode. Clear it again, confirm resolution, then remove the temporary rule and the test-only Comtinel routing rule. Remove the temporary Alertmanager route or restore its production repeat interval, then validate and reload.
With these intervals, expect minutes for the round trip rather than a fixed few-second deadline. Silence, inhibition and pending time can delay or suppress delivery. The alerting-rule referenceexplains expression results and pending/firing behavior.
Understand what each test proves
startsAt such as the format YYYY-MM-DDTHH:mm:ssZ. A successful queue response is still not proof of responder delivery.# Save the example Alertmanager JSON from your integration page
# as alertmanager-test.json, with a fresh startsAt and fingerprint.
curl --include --request POST \
'https://comtinel.com/webhooks/prometheus/YOUR_WORKSPACE_ID' \
--header 'Authorization: Bearer YOUR_SECRET' \
--header 'Content-Type: application/json' \
--data-binary @alertmanager-test.jsonTo resolve a curl-created incident, send the same alert with status: "resolved"while preserving its fingerprint and startsAt. The panel's Resolve testbutton only addresses its own synthetic test. Remove the diagnostic payload after use.
Repeats, resolution and secret rotation
An Alertmanager group can contain multiple independent problems; each accepted alert can create its own incident. Repeated notifications with the same fingerprint and startsAt do not create another incident. A resolved alert that fires again has a new start time and can page again. Acknowledgement does not change the metric or silence Alertmanager. Use upstream silences for planned maintenance, and clear the underlying condition to complete the source lifecycle.
Coordinate secret rotation with your monitoring owner: rotate in Comtinel, update the mounted secret file and reload Alertmanager, then check delivery. Configuration is cached briefly, so old and new credentials may behave differently across requests for up to about 60 seconds. Do not assume the old token stops everywhere at the exact click time. Keep secrets out of repositories, screenshots and support attachments.
If the alert does not arrive or resolve
severity_not_allowed means the firing severity was filtered. Duplicates refer to an already delivered episode. Neither response means a new incident or notification was created. The panel helper reports a filtered test as 422 no_events.send_resolved: true, the receiver's delivery logs, and that the resolved payload retains the original identity. Check silences, inhibition and any keep-firing setting upstream. Wait for the group interval.truncatedAlerts. The 200-alert cap omits excess alerts; it does not queue a second batch. Narrow grouping. Grouping by all labels using group_by: ['...'] sends distinct alerts separately but increases request volume.Prometheus integration FAQ
Do I need Jira or Grafana for this integration?
No. Prometheus evaluates your alert rules, Alertmanager forwards selected alerts, and Comtinel handles ownership and paging. Jira can remain connected independently. Grafana dashboards are optional; Grafana-managed alert rules and contact points are a separate integration path.
Can Jira and Prometheus notify different teams in one workspace?
Yes. Create separate routing rules with the correct source, team and escalation policy. For example, Jira support issues can reach Support while Prometheus infrastructure alerts reach Platform. A Jira rule never matches a Prometheus alert.
Does acknowledgement make the Prometheus alert healthy?
No. Accepting the Comtinel incident records ownership and stops further escalation. The underlying alert remains firing until its Prometheus expression clears. Alertmanager then sends the resolved notification that closes the incident.
Why did a repeat notification not create another incident?
The same fingerprint and firing start time identify one alert episode. Repeats are deduplicated. A later firing after resolution has a new start time and can create a new incident. Changing labels can change the alert identity, so keep them stable during a lifecycle test.