Docs / Guides
Alerts from monitoring tools
yasp's own checks see your services from outside. Your monitoring tools see inside them: error rates, queue depth, saturation. An alert monitor lets those tools drive the status page. While an alert fires, the monitor is down, and the components it's attached to (and any automatic incident) follow, exactly as with a failing check.
# Set one up
- In the dashboard: Monitors → Add monitor → Alerts from your monitoring. Name it after what the alerts are about, e.g. "Payments alerts", and choose the component it shows as.
- Open the monitor and copy its alert URL (
https://status.example.com/hooks/alerts/al_…). Anyone with the URL can post alerts. If it leaks, click New URL. - Point your tool at it, as described below.
Route only the alerts that should affect this component to its URL. One tool can feed several alert monitors through several receivers or contact points.
| What arrives | The monitor is |
|---|---|
| Any alert firing | down |
Only warnings firing (severity: warning, minor, low, info, Datadog Warn, New Relic MEDIUM/LOW) | degraded |
| Everything resolved | up |
Alerts are matched by the tool's id (fingerprint, alarm, issue), so a resolution clears the alert it belongs to. If a tool never sends a resolution, the monitor's page lists what's firing and has Mark resolved.
# Prometheus Alertmanager
receivers:
- name: yasp-payments
webhook_configs:
- url: https://status.example.com/hooks/alerts/al_…
send_resolved: true
route:
routes:
- matchers: [service="payments"]
receiver: yasp-payments
continue: true# Grafana
Alerting → Contact points → New contact point, integration Webhook, URL the alert URL. Then send the right alerts to it with a notification policy. Grafana's payload has the same shape as Alertmanager's.
# Datadog
Integrations → Webhooks → New, URL the alert URL, payload:
{"id": "$ALERT_ID", "title": "$EVENT_TITLE", "transition": "$ALERT_TRANSITION", "priority": "$ALERT_PRIORITY"}
Mention @webhook-<name> in the monitors that should reach yasp.
# New Relic
Alerts → Destinations → Webhook with the alert URL, and in the workflow's notification use the payload:
{"issueId": {{json issueId}}, "title": {{json annotations.title.[0]}}, "state": {{json state}}, "priority": {{json priority}}}# Amazon CloudWatch
Create an SNS topic with an HTTPS subscription to the alert URL. yasp confirms the
subscription itself; it only fetches confirmation links on Amazon SNS hosts. Add the topic
to the alarm's ALARM and OK actions. INSUFFICIENT_DATA is ignored. EventBridge
"CloudWatch Alarm State Change" events sent to the URL work too.
# Anything else
POST JSON:
curl -fsS -X POST https://status.example.com/hooks/alerts/al_… \
-H 'Content-Type: application/json' \
-d '{"status": "firing", "id": "db-primary", "title": "Primary database unreachable", "severity": "critical"}'
Send the same id with "status": "resolved" when it's over. status also accepts
down/up, alert/ok, triggered/recovered, and "severity": "warning" only
degrades.
# Limits
- Up to 120 deliveries a minute per monitor, and 500 firing alerts per monitor.
- Bodies up to 1 MB.
- yasp records a result whenever the firing set changes, and at least hourly while the tool keeps sending. It never marks an alert monitor unknown for being quiet: silence means nothing changed.