Skip to main content

Subscription

Siren lets you subscribe to a notification when they are triggered. You can define custom matching conditions and use receivers to describe which medium you want to use for getting the notifications when a notification is triggered. A notification could be triggered on-demand via API or by the incoming alerts via webhook.

Example Subscription:

{
"id": "385",
"urn": "siren-dev-prod-critical",
"namespace": "10",
"receivers": [
{
"id": "2"
},
{
"id": "1",
"configuration": {
"channel_name": "siren-dev-critical"
}
}
],
"match": {
"environment": "production",
"severity": "CRITICAL"
},
"created_at": "2021-12-10T10:38:22.364353Z",
"updated_at": "2021-12-10T10:38:22.364353Z"
}

The above means whenever any alert which has labels matching the labels "environment": "production", "severity": "CRITICAL", send this alert to two medium defined by receivers with id: 2 and 1. Assuming the receivers id 2 to be of Pagerduty type, a PD call will be invoked and assuming the receiver with id 1 to be slack type, a message will be sent to the channel #siren-dev-critical.

API Interface

Create a subscription

$ siren subscription create --file subscription.yaml

Update a subscription

$ siren subscription edit --id 10 --file subscription.yaml

Get all subscriptions

$ siren subscription list

Get a subscriptions

$ siren subscription view 10

Delete subscriptions

$ siren subscription delete 10