Skip to main content

Custom Python, Golang, etc integration

Profundis uses Server Sent Events (SSE) to notify you when one of your alert tasks matches. This makes it extremely easy to integrate it into your own workflow and trigger actions as soon as you receive an alert.

warning

You can have a maximum of 1 client connected and listening to events. Be aware that the Profundis alerting Docker image connects using SSE and then cannot be used in parallel of custom scripts/tools.

info

To receive notifications from your alerts, you need an API token.

When developping a custom integration to the Profundis notification system, your code should handle the SSE reconnections (cf the heartbeat messages).

You can try to receive events using a simple curl command in a terminal.

API_KEY="xxx"
curl -N \
-H "Accept: text/event-stream" \
"https://api.profundis.io/api/v2/sse/common/alerting?api_key=$API_KEY"

You will then receive heartbeat messages as below and the hosts which match your alert tasks.

id: 1749147000
data: {"type":"heartbeat"}

id: 1749147028
data: {"type":"heartbeat"}