Skip to content
PrismaLens is alpha and changes often. These docs describe the latest release; read the release notes before upgrading.

Alertmanager webhook

You can always write an incident yourself. To have incidents open on their own, point Prometheus Alertmanager at PrismaLens.

  • An alert reaches a service through its service label, which must equal the service’s name exactly.
  • By default, a critical or high alert on a service starts an investigation when it arrives. Each service can change that, from always to never. An alert with no matching service starts no investigation.

The first pl up writes a token to your workspace:

~/.prismalens/PRISMALENS_WEBHOOK_SECRET_FILE

Every delivery must carry it.

receivers:
- name: prismalens
webhook_configs:
- url: http://127.0.0.1:6473/api/webhooks/prometheus
send_resolved: true
http_config:
authorization:
type: Bearer
credentials_file: /home/you/.prismalens/PRISMALENS_WEBHOOK_SECRET_FILE

Then route the alerts you care about to the prismalens receiver. Use your own port if you started PrismaLens with --port.

Terminal window
TOKEN=$(cat ~/.prismalens/PRISMALENS_WEBHOOK_SECRET_FILE)
curl -s -X POST http://127.0.0.1:6473/api/webhooks/prometheus \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"version":"4","status":"firing","alerts":[{"status":"firing","labels":{"alertname":"HighErrorRate","severity":"critical","service":"payments"},"annotations":{"summary":"5xx above 5% for 10 minutes"},"startsAt":"2026-09-13T10:00:00Z","fingerprint":"abc123"}]}'

With a service named payments that has code, that call opens an incident and starts an investigation.

PrismaLens listens on 127.0.0.1, so only this machine can reach it. To accept alerts from your network, start it with pl up --host 0.0.0.0. Over plain HTTP the traffic crosses the network in clear, so do this only on a network you trust.

Docs text is licensed CC-BY-4.0. PrismaLens is open source under Apache-2.0.