Files
devops-it-manual/monitoring/grafana/provisioning/alerting/rules.yml
T
2026-10-30 20:58:41 +00:00

120 lines
3.6 KiB
YAML

apiVersion: 1
groups:
- orgId: 1
name: Chapter 5 SRE Alerts
folder: SRE Monitoring
interval: 30s
rules:
- uid: sre-https-unavailable
title: HTTPS Service Unavailable
condition: C
for: 1m
noDataState: NoData
execErrState: Error
annotations:
runbook_url: https://git.sespinal590.dev/group10-startup/devops-it-manual/src/branch/chapter5-sre-monitoring/monitoring/ALERTING-RUNBOOK.md
summary: "HTTPS probe failure for {{ $labels.instance }}"
description: "The HTTPS probe has failed continuously for at least one minute."
labels:
owner: sespinal
severity: critical
chapter: "5"
data:
- refId: A
relativeTimeRange:
from: 300
to: 0
datasourceUid: prometheus
model:
datasource:
type: prometheus
uid: prometheus
editorMode: code
expr: 'probe_success{job="https"} or on(instance,job) (0 * up{job="https"})'
instant: true
intervalMs: 30000
maxDataPoints: 43200
refId: A
- refId: B
relativeTimeRange:
from: 0
to: 0
datasourceUid: __expr__
model:
type: reduce
expression: A
reducer: last
refId: B
conditions: []
- refId: C
relativeTimeRange:
from: 0
to: 0
datasourceUid: __expr__
model:
type: threshold
expression: B
refId: C
conditions:
- evaluator:
type: lt
params:
- 1
- uid: sre-root-disk-low
title: Host Root Disk Space Low
condition: C
for: 5m
noDataState: NoData
execErrState: Error
annotations:
runbook_url: https://git.sespinal590.dev/group10-startup/devops-it-manual/src/branch/chapter5-sre-monitoring/monitoring/ALERTING-RUNBOOK.md
summary: "Host root disk availability below 15%"
description: "Available root filesystem space has remained below 15% for five minutes."
labels:
owner: sespinal
severity: warning
chapter: "5"
data:
- refId: A
relativeTimeRange:
from: 300
to: 0
datasourceUid: prometheus
model:
datasource:
type: prometheus
uid: prometheus
editorMode: code
expr: '100 * node_filesystem_avail_bytes{job="node-exporter",mountpoint="/",fstype!~"tmpfs|overlay"} / node_filesystem_size_bytes{job="node-exporter",mountpoint="/",fstype!~"tmpfs|overlay"}'
instant: true
intervalMs: 30000
maxDataPoints: 43200
refId: A
- refId: B
relativeTimeRange:
from: 0
to: 0
datasourceUid: __expr__
model:
type: reduce
expression: A
reducer: last
refId: B
conditions: []
- refId: C
relativeTimeRange:
from: 0
to: 0
datasourceUid: __expr__
model:
type: threshold
expression: B
refId: C
conditions:
- evaluator:
type: lt
params:
- 15