Contact Points
Contact points contain the configuration for sending alert notifications. You can assign a contact point either in the alert rule or notification policy options. For a complete explanation on notification policies, refer to the upstream Grafana documentation.
Note
The Grafana operator currently only supports a single receiver per contact point definition. As a workaround you can create multiple contact points with the samespec.name
value.
Follow issue #1529 for further updates on this topic.The following snippet shows an example contact point which notifies a specific email address. It also highlights how secrets and config maps can utilized to externalize some of the configuration. This is especially useful for contact points which contain sensitive information.
apiVersion: v1
kind: Secret
metadata:
name: contact-mails
stringData:
alert-mails: "foo@example.com"
---
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaContactPoint
metadata:
name: grafanacontactpoint-sample
spec:
name: grafanacontactpoint-sample
type: "email"
instanceSelector:
matchLabels:
instance: my-grafana-stack
settings:
subject: 'Grafana Alert'
valuesFrom:
- targetPath: addresses
valueFrom:
secretKeyRef:
name: contact-mails
key: alert-mails