Skip to main content

Notifications

Notifications can be sent based on different type of events occuring including:

  • Health check failing (check.failed)
  • Aggregated health of a topology failing (component.unhealthy)
  • A scraped config item health (config.unhealthy)
http-check.yaml
apiVersion: mission-control.flanksource.com/v1
kind: Notification
metadata:
name: http-check
namespace: default
spec:
events:
- check.passed
filter: check.type == 'http'
to:
email: alerts@acme.com
FieldDescriptionSchemeRequiredTemplatable
events[]Eventtrue
toNotification recipientRecipienttrue
titleChannel dependant e.g. subject for emailGo Template true
templateChannel dependant e.g. email body for emailGo Template true
filterFilter out unwanted notificationsCEL

Recipient

FieldDescriptionSchema
personUUID or email of a person
teamEvery member of the team with an email will receive a notificationUUID or name of team
emailSend an email to an external useremail
connectionConnection to external serviceconnection
urlCustom notification URLChannel
propertiesOnly applicable if url is specifiedmap[string]string

Only one recipient can be specified

Templating

Notification title and bodies can be templated using Go Templates

template-title.yaml
apiVersion: mission-control.flanksource.com/v1
kind: Notification
spec:
title: Check {{.check.name}} is {{.check.health}}

Filtering

Notifications can be filtered using CEL expressions. The filters have access to same variables that can be used in the templates.

filter-http.yaml
---
# Only send a notification for HTTP checks
apiVersion: mission-control.flanksource.com/v1
kind: Notification
metadata:
name: http-alerts
spec:
events:
- check.failed
filter: check.type == 'http'
to:
connection: connection://slack/flanksource
title: Check {{.check.name}} is {{.check.health}}