Skip to content

Alert sources: your own tools’ alerts

Send the alerts of Prometheus Alertmanager, Grafana, Zabbix or your own scripts to Heimdall: each opens an incident of a team and reaches its people like a monitor’s.

An alert source is an address your own monitoring tools send their alerts to: Prometheus Alertmanager, Grafana, Zabbix, or anything that can make an HTTP request — a script, a cron job, a deploy pipeline. Each alert opens an incident of the source’s team, and from there it is handled like a monitor’s: the same escalation policy and on-call rotation, the same SMS, calls, e-mail, Telegram and channels, acknowledged, snoozed and resolved the same way.

Alert sources are in the menu, after Monitors. Everybody in the organisation sees them; an admin adds, changes and deletes them.

Alert sources: the plan’s sources and this month’s alerts; five sources — Prometheus Alertmanager, Grafana, Zabbix, a deploy script and a paused Nagios bridge — each with its format, team, the start of its address, whether it takes alerts, its open incidents and its last request; the deploy script’s last body could not be read, and says why.
Alert sources: what each one sends to, when it was last heard from, and what went wrong.

Before the first source

What your tools send may hold personal data — an e-mail address in a label, an IP address, a host named after a person — which Heimdall processes for you. The Alert Sources terms (the Alert Sources Addendum, /legal/alert-sources) say what is kept, for how long and where. The account’s owner accepts them once, signed in, on the Alert sources page, before the account’s first source; an admin who gets there first is asked to fetch the owner. A new version of the terms is accepted again before the next new source; the sources already there keep working.

Alert sources before the account’s first source: the Alert Sources terms, a link to read them, a box to accept their version, and the button that accepts them.
Before the first source: the owner accepts the Alert Sources terms, once.

Add a source

  1. Open Alert sources and choose New source.
  2. Name it, and choose what sends to it: Heimdall JSON (your own scripts), Alertmanager, Grafana or Zabbix. A source’s format stays: for another tool, make another source.
  3. Choose its team: the team whose incidents it opens. Every source has one — make a team first under On-call → Teams.
  4. The severity of an alert that names none, and, if you like, the most serious it may be (below).
  5. Its escalation policy, with Team and Business. Without one of its own, the source follows its team’s policy, else the organisation’s default.
  6. Create source. Its address is shown now, once, with the steps for that tool.
The New source dialog: the name Alertmanager staging, what sends to it Alertmanager, the team Backend, the severity of an alert that names none critical, no ceiling, the team’s policy, and a box to pause it.
A new source: its name, its format, its team and how serious its alerts may be.
The new source’s address, shown once under a warning to keep it like a password, with a button to copy it, and Alertmanager’s receiver for alertmanager.yml with that address.
The address, shown once, with the steps for the source’s tool.

The address is a secret: anybody who has it can open incidents in your organisation — and put words of their own into the SMS and calls of your on-call people. Keep it like a password. How to connect, in the source’s menu, shows the steps again, without the address. If it got out, or you lost it, choose New address in the same menu: the old one stops at once, and your tool needs the new one.

From your own scripts: Heimdall JSON

A source of the format Heimdall JSON takes one alert a request, as a JSON object, POSTed to its address:

An alert
curl -X POST 'https://heimdall.warewave.tech/in/hin_…' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Disk almost full on db-1",
    "dedup_key": "disk-db-1",
    "severity": "major",
    "details": { "host": "db-1", "used": "91%" },
    "links": [{ "text": "Runbook", "url": "https://wiki.example.com/runbooks/disk" }]
  }'
Answer — 202
{"incidents":[{"result":"opened","incident":"INC-0143"}]}
The same alert, resolved
curl -X POST 'https://heimdall.warewave.tech/in/hin_…' \
  -H 'Content-Type: application/json' \
  -d '{"action": "resolve", "dedup_key": "disk-db-1"}'
FieldWhat it is
titleWhat happened, up to 255 characters: the incident’s title, and all an SMS or a call says of it. Required for a trigger.
dedup_keyWhat makes two alerts the same one, up to 255 characters. Left out, every trigger is a new incident, and the answer says the key Heimdall gave it — so that a later resolve can name it.
actiontrigger (the default), resolve or acknowledge. A resolve or an acknowledge names the dedup_key of the alert it ends.
severitycritical, major or minor. Left out, or a word Heimdall does not know: the source’s default.
detailsKey → text (numbers and true/false are kept as text): at most 50 keys and 16 KB in all. Shown on the incident and sent to Slack, Microsoft Teams and webhooks — never in an SMS, a call, an e-mail or a Telegram message.
linksAt most five, each {"text", "url"} with an https address: a runbook, a dashboard.
  • The answer is 202 with what the alert did — opened, updated (its incident is open already), folded, resolved, acknowledged, or none (a resolve of a key with nothing open) — and the incident’s number. Nothing of what you sent is said back.
  • A body that does not read is a 400 with a sentence saying why — the title is missing, a link is not https. The source shows the same sentence in the app (“Last body could not be read”), so you need not look for it in your tool’s log.
  • The address carries its token (…/in/hin_…). A tool that would rather send it as a header POSTs to /in with Authorization: Bearer hin_…: the same.
  • A body is at most 512 KB. A source takes 120 requests a minute and an account 600; beyond that the answer is 429 with Retry-After. A 503 means: send it again.

Prometheus Alertmanager

Add a receiver with a webhook to alertmanager.yml, and route the alerts to it:

alertmanager.yml
receivers:
  - name: heimdall
    webhook_configs:
      - url: 'https://heimdall.warewave.tech/in/hin_…'
        send_resolved: true
        max_alerts: 1000

route:
  receiver: heimdall
  • Keep send_resolved: a resolved alert resolves its incident. Keep max_alerts: Heimdall takes the first 1000 alerts of a notification.
  • The address is a secret. Alertmanager 0.25 and newer read it from a file instead: url_file with the path of a file that holds only the address.
  • Each alert of a notification is an incident of its own, told apart by its fingerprint. Its title is alertname with the summary annotation; its severity the severity label — critical or page is critical, error or high major, warning or info minor (and the other names people use: p1, sev2 …), anything else the source’s default. Labels and annotations are its details; runbook_url and generatorURL its links when they are https — an http one is kept as a detail.

Grafana

  1. In Grafana: Alerting → Contact points → Add contact point.
  2. Integration Webhook, URL the source’s address, HTTP method POST. In the optional settings, Max Alerts 1000. Leave the others as they are: a custom payload is not read.
  3. Use the contact point in a notification policy.
  4. Test sends an alert named TestAlert: it opens an incident in Heimdall, which you resolve yourself.

Grafana’s alerts read as Alertmanager’s: the rule’s name with the summary is the title, the severity label the severity, the value the rule saw and its labels and annotations the details, the dashboard, the panel and the rule the links.

Zabbix

Zabbix sends its alerts through a media type — a small script — and Heimdall has one for Zabbix 6.0 and newer. Download it from the source’s steps (or How to connect, in its menu), then:

  1. Import the media type: Alerts → Media types → Import (Zabbix 6.0: Administration → Media types).
  2. Make a user group that may read the host groups whose problems should come to Heimdall: Zabbix sends nothing about a host its user may not see.
  3. Make a user heimdall in that group, with the media Heimdall and the source’s address as Send to.
  4. In a trigger action (Alerts → Actions; Zabbix 6.0: Configuration → Actions), send a message to the user heimdall through Heimdall in the operations, the recovery operations and the update operations.

A problem opens an incident, its recovery resolves it, an acknowledgement in Zabbix acknowledges it, and a more serious severity raises it. Disaster and High are critical, Average major, Warning and Information minor, Not classified the source’s default. For a link from the incident back to the problem, set the global macro {$ZABBIX.URL} to Zabbix’s own https address.

How alerts become incidents

  • Alerts with the same key are one incident. While it is open, a repeat sends nothing: it is counted, and the incident keeps the newest title, details and links — and the most serious severity it was sent. A more serious one raises the incident, and the steps that held SMS or calls back for the lesser severity send them now.
  • A resolve with that key resolves the incident, and the escalation stops as when a monitor comes back up; everybody alerted hears it. An acknowledge acknowledges it, and the timeline names the source.
  • Resolving an incident in Heimdall does not tell your tool. If it keeps firing — Alertmanager sends a firing alert again every few hours — the next alert opens a new incident: acknowledge it instead, or snooze it.
  • Nothing ends by itself: an incident that hears nothing more stays open until a resolve comes or somebody resolves it.
  • A source has at most 100 incidents open. The alerts with new keys beyond them are gathered into one incident, “more than 100 alerts open”, which alerts once and lists them on its timeline — a tool sending a thousand alerts in a minute does not ring a phone a thousand times. A person resolves that one.
  • A source’s incident has its team, its severity and the source’s name everywhere it is shown — the incidents list filters by source — and its details as a table and its links on its page. It has no uptime: uptime is a monitor’s.
An incident from the deploy script: its title, major severity, the source and its team; three alerts counted; its details — release, commit, stage, region — and two links, Runbook and Pipeline; and the timeline: opened by an alert from the deploy script, the SMS skipped because the number’s consent does not cover alerts from the organisation’s own tools, the e-mail sent, the same alert again.
An incident from a source: what the tool sent, how many times, and who was alerted.

Severity and who is woken

Severity decides who is woken, as for a monitor: under the built-in rule only critical incidents send SMS and calls, and major and minor ones go by e-mail, Telegram and the channels; a policy step can say otherwise (Alerts, on-call and escalation). An alert that names no severity takes the source’s default.

The most serious it may be lowers every alert of the source to it — its default too: for a noisy tool, or for one whose address may have got out. Set to minor or major, the source rings no phone under the built-in rule while you give it a new address. The incident’s timeline says when an alert was lowered; an incident already open keeps its severity.

SMS and calls

A source’s incident is told by SMS and call like a monitor’s, from the same fair-use allowance. The SMS carries the title, the source and the incident’s number; the call says the title and the source. The details never go by SMS, call, e-mail or Telegram — they are for the incident’s page and your Slack, Microsoft Teams and webhook channels.

SMS
ALERT: Disk almost full on db-1 (Acme)
From Deploy script
Since 14:02 - INC-0143

They go only to a number confirmed with the consent that names alerts from your organisation’s own tools. A number confirmed with an earlier consent is not rung for a source’s incident: that person gets it by e-mail and Telegram, and the incident’s timeline says why. Its holder accepts the newer consent in their own profile (Profile → Notifications), where the phone card offers it; from then on a source’s incident rings that number too.

The phone card of Profile → Notifications: a confirmed number, and under it “A newer consent for this number” — what the version in force adds, that until it is accepted a source’s alerts come by e-mail and the other channels, and the button that accepts it.
A number confirmed under the earlier consent: the phone card offers the one in force.

Pause, maintenance, delete

  • A paused source answers its tool 202 and opens nothing, so the tool does not retry for ever; the app counts what it ignored. It still takes a resolve or an acknowledge, so that its incidents do not stay open.
  • A maintenance window can name sources, and a team’s window covers the team’s sources: inside it their incidents open and are recorded but alert nobody, and those still open when it ends start alerting (Planned maintenance).
  • Deleting a source stops its address at once and closes its open incidents; they keep its name.

Plans and fair use

Every plan has alert sources. How many sources, and how many alerts a month, are on the pricing page, counted across the account’s organisations like every limit; the Alert sources page and the plan indicator at the foot of the sidebar show where the account stands.

  • What counts toward the month is what makes Heimdall act: an alert that opens an incident — again too, after its key’s earlier incident was resolved — and a resolve that resolves one. A repeat of a key already open, an acknowledgement, a body that does not read and what a paused source receives do not; the alerts gathered into a “more than 100” incident count as one.
  • The month’s alerts work like SMS: the app says when the account nears the plan’s number (80%) and when it passes it (100%); past 300% a new incident still opens and goes out by e-mail, Telegram and the channels, but sends no SMS or call until the month ends. An alert is never dropped for billing.
  • On a plan with fewer sources than the account has, the newest beyond the plan take nothing in — as if paused — until there is room; nothing is deleted.

What is kept, and for how long

Of an alert Heimdall keeps what the table above reads — the title, the key, the severity, the details (50 keys, 16 KB) and the links (five) — never the request itself, and a body that does not read leaves only the reason, quoting nothing of it. The details and links of a resolved incident are emptied after the history period of the plan — the longer of the plans the account had when the incident opened and when it was resolved; the incident itself, with its title, stays like any other. We and our providers keep it in Türkiye; where it is delivered — your mailbox, Slack, Microsoft Teams, Telegram, your webhook — is your choice. The Alert Sources terms say it in full.

In the API

Sources are in the REST API with the rest of on-call (/alert-sources): list, create, change, pause and delete them, and give one a new address — with an admin API token (Team and Business). The terms are accepted by the owner in the app, never with a token. See API: on-call.