Alert sources
Send alerts from Alertmanager, Grafana, Datadog or your own code to Kosken, and see how an alert finds its machine.
On this page
After you read this guide, you can connect a monitoring tool to Kosken, so that its alerts become signals and open incidents on the right machine.
Create a source
You need write access.
- Open Signals in the sidebar, then the tab Alert sources.
- Click Add source.
- In Type, choose the format of the tool:
alertmanager,grafana,datadogorgeneric. - Type a Name, for example
Grafana production. - In Authentication, choose
bearerorhmac.bearersends the secret in a header.hmacsigns each request with the secret. Alertmanager, Grafana and Datadog usebearer. Usehmacfor your own code. - Choose the Default severity: the severity of an alert that does not give one.
- Click Save.
The next page shows the Hook address, for example https://acme.workspace.kosken.ai/hooks/<source-id>, and the secret. The secret is shown one time. Click Copy and keep it, then click Done. Kosken answers each good request with 202 Accepted.
Alertmanager
Add a receiver with a webhook in the Alertmanager configuration, and send the alerts to it with a route:
receivers:
- name: kosken
webhook_configs:
- url: https://acme.workspace.kosken.ai/hooks/<source-id>
send_resolved: true
http_config:
authorization:
type: Bearer
credentials: <secret>
Kosken reads the list alerts of each request. It takes the label severity, the annotation summary (or description, message, or the label alertname) and the fingerprint of each alert. An alert with the status resolved resolves its signal.
Grafana
In Grafana Alerting, add a contact point of the type Webhook. Set the URL to the Hook address. Set the authorization header to the scheme Bearer and the secret as the credentials. Use the contact point in a notification policy. Kosken reads the Grafana webhook in the same way as Alertmanager.
Datadog
In the Webhooks integration of Datadog, add a webhook. Set the URL to the Hook address. Add the custom header {"Authorization": "Bearer <secret>"}. Use this payload:
{
"alert_id": "$ALERT_ID",
"alert_title": "$ALERT_TITLE",
"alert_transition": "$ALERT_TRANSITION",
"alert_type": "$ALERT_TYPE",
"alert_priority": "$ALERT_PRIORITY",
"hostname": "$HOSTNAME",
"tags": "$TAGS",
"date": "$DATE"
}
Then add the webhook to the message of a monitor. The field alert_id is required. Kosken reads the tags as labels, for example env:production. A transition that contains Recovered, or the type success, resolves the signal.
A generic webhook
For any other tool, choose the type generic. Send one alert as a JSON object, or many as a list in alerts:
{
"fingerprint": "disk-web-01",
"state": "firing",
"severity": "warning",
"summary": "Disk of web-01 is 91% full",
"host": "web-01",
"labels": {"service": "shop"},
"started_at": "2026-11-22T10:15:00Z"
}
The field fingerprint is required. It names the problem: send the same value again to update the signal. state is firing or resolved. With bearer, send the header Authorization: Bearer <secret>.
Sign requests with HMAC
With hmac, each request has the header X-Kosken-Signature: t=<unix time>,v1=<signature>. The signature is the HMAC-SHA256 of the time, a dot and the body, with the secret as the key, in hex. The time must be within 5 minutes of the time of Kosken, and Kosken refuses a signature that it saw before. An example with openssl and curl:
body='{"fingerprint":"disk-web-01","state":"firing","summary":"Disk of web-01 is 91% full","host":"web-01"}'
t=$(date +%s)
sig=$(printf '%s.%s' "$t" "$body" | openssl dgst -sha256 -hmac '<secret>' -hex | sed 's/^.* //')
curl -X POST 'https://acme.workspace.kosken.ai/hooks/<source-id>' \
-H 'Content-Type: application/json' \
-H "X-Kosken-Signature: t=$t,v1=$sig" \
--data "$body"
How an alert finds its machine
Kosken tries these steps in order. A step that matches exactly one machine gives the machine. A step that matches two or more machines stops the search, and the alert gets no machine.
- The label
kosken_serverholds the id of the machine. The id is the last part of the address of the machine page. - The host name of the alert matches the name of the machine, its host name, or its host name up to the first dot. Kosken takes the host name from the labels
hostname,host,nodeorinstance, from the fieldhostof a generic alert, or fromhostnameof Datadog. - The label
instance, with no port, matches the name or the host name of the machine. - An IP address in the host name or in
instancematches an address of the machine. - The label
role,roles,environment,envorkosken_labelmatches the environment or a role of the machine. - A link rule of the workspace. See Link an alert to a machine.
An alert with no machine stays in Recent signals and opens no incident. For the rules that open an incident, see Signals.
Severity
| Word that the tool sends | Severity in Kosken |
|---|---|
critical, crit, page, high, fatal, emergency, error, disaster, P1, P2 | Critical |
warning, warn, medium, average, P3 | Warning |
info, information, low, none, notice, P4, P5 | Info |
| Any other word, or none | The Default severity of the source |
Edit, rotate, resume and delete
- Edit changes the name and the Default severity, and sets Allowed addresses: one address or network per line, for example
203.0.113.0/24. Empty allows all. The type and the authentication cannot change. - Rotate secret makes a new secret and shows it one time. The old secret works for 24 more hours, so you have time to change the tool.
- Resume shows on a suspended source. Click it after you fix the tool.
- Delete removes the source. Its address stops working.
The badge No recent data shows when a source got no valid request in 90 days.
Limits and errors
- One source takes 120 requests per minute. More requests get
429. After 10 minutes over the rate, Kosken suspends the source, and requests get403until you click Resume. - The body is JSON, at most 256 KiB, with at most 200 alerts. A body that is not JSON gets
400, and a larger body gets413. - A wrong secret, an old signature, or an address that is not allowed gets
401. - Use the hook address that the app shows. The address of another workspace does not work.
Something here does not match the app? Tell us