Alerting: Add file provisioning for contact points (#51924)

This commit is contained in:
Jean-Philippe Quéméner
2022-08-01 18:17:42 +02:00
committed by GitHub
parent e791a4e576
commit d9cace4dca
31 changed files with 611 additions and 184 deletions
@@ -0,0 +1,56 @@
apiVersion: 1
groups:
- name: my_group
folder: my_folder
interval: 10s
rules:
- title: my_first_rule
uid: my_first_rule
condition: A
for: 1m
annotations:
runbook: https://grafana.com
labels:
team: infra
severity: warning
data:
- refId: A
queryType: ''
relativeTimeRange:
from: 600
to: 0
datasourceUID: PD8C576611E62080A
model:
hide: false
intervalMs: 1000
maxDataPoints: 43200
refId: A
- refId: B
queryType: ''
relativeTimeRange:
from: 0
to: 0
datasourceUID: "-100"
model:
conditions:
- evaluator:
params:
- 3
type: gt
operator:
type: and
query:
params:
- A
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: "-100"
hide: false
intervalMs: 1000
maxDataPoints: 43200
refId: B
type: classic_conditions
@@ -0,0 +1,87 @@
{
"apiVersion": 1,
"groups": [
{
"name": "my_json_group",
"folder": "my_json_folder",
"interval": "10s",
"rules": [
{
"title": "my_json_rule",
"uid": "my_json_rule",
"condition": "A",
"for": "1m",
"annotations": {
"runbook": "http://google.com/"
},
"labels": {
"team": "infra",
"severity": "warning"
},
"data": [
{
"refId": "A",
"queryType": "",
"relativeTimeRange": {
"from": 600,
"to": 0
},
"datasourceUID": "PD8C576611E62080A",
"model": {
"hide": false,
"intervalMs": 1000,
"maxDataPoints": 43200,
"refId": "A"
}
},
{
"refId": "B",
"queryType": "",
"relativeTimeRange": {
"from": 0,
"to": 0
},
"datasourceUID": "-100",
"model": {
"conditions": [
{
"evaluator": {
"params": [
3
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"A"
]
},
"reducer": {
"params": [
],
"type": "last"
},
"type": "query"
}
],
"datasource": {
"type": "__expr__",
"uid": "-100"
},
"hide": false,
"intervalMs": 1000,
"maxDataPoints": 43200,
"refId": "B",
"type": "classic_conditions"
}
}
]
}
]
}
]
}
@@ -0,0 +1,56 @@
apiVersion: 1
groups:
- name: my_group
folder: my_folder
interval: 10s
rules:
- title: my_first_rule
uid: my_first_rule
condition: A
for: 1m
annotations:
runbook: https://grafana.com
labels:
team: infra
severity: warning
data:
- refId: A
queryType: ''
relativeTimeRange:
from: 600
to: 0
datasourceUID: PD8C576611E62080A
model:
hide: false
intervalMs: 1000
maxDataPoints: 43200
refId: A
- refId: B
queryType: ''
relativeTimeRange:
from: 0
to: 0
datasourceUID: "-100"
model:
conditions:
- evaluator:
params:
- 3
type: gt
operator:
type: and
query:
params:
- A
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: "-100"
hide: false
intervalMs: 1000
maxDataPoints: 43200
refId: B
type: classic_conditions
@@ -0,0 +1,56 @@
apiVersion: 1
groups:
- name: my_other_group
folder: my_other_folder
interval: 10s
rules:
- title: my_other_rule
uid: my_other_rule
condition: A
for: 1m
annotations:
runbook: https://grafana.com
labels:
team: infra
severity: warning
data:
- refId: A
queryType: ''
relativeTimeRange:
from: 600
to: 0
datasourceUID: PD8C576611E62080A
model:
hide: false
intervalMs: 1000
maxDataPoints: 43200
refId: A
- refId: B
queryType: ''
relativeTimeRange:
from: 0
to: 0
datasourceUID: "-100"
model:
conditions:
- evaluator:
params:
- 3
type: gt
operator:
type: and
query:
params:
- A
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: "-100"
hide: false
intervalMs: 1000
maxDataPoints: 43200
refId: B
type: classic_conditions