Skip to main content

Alert


https://grafana.com/docs/grafana/latest/alerting/

Alert rules

alerting:
rules.yaml:
apiVersion: 1
groups:
- orgId: 1
name: <groupName>
folder: <folderName>
# data를 확인하는 interval
interval: 60s
rules:
- uid: <uid>
title: <title>
labels:
<key>: <value>
# 알림을 보내기 위해 조건이 유지되어야 하는 시간
for: 120s
condition: <data.refId>
data:
- refId: <refId>
# ...
noDataState: NoData # NoData(default), Alerting, OK

Contact points

alerting:
contactpoints.yaml:
apiVersion: 1
contactPoints:
- orgId: 1
name: <name>
receivers:
- uid: <uid>
type: slack
settings:
recipient: <channelID|channelName>
token: xoxb-<token>
- uid: <uid>
type: email
settings:
addresses: <email>[;<email>]

Template

Notification policies

alerting:
notificationpolicy.yaml:
apiVersion: 1
policies:
- orgId: 1
matchers:
- <key> = <value>
receiver: <contactPointName>