apiVersion: 1 # Grafana expands $NAME from its environment in provisioning files, so the # Discord webhook comes from grafana.secrets.env and never appears in Git. # Templates below use .Labels instead of $labels for the same reason. contactPoints: - orgId: 1 name: team-alerts receivers: - uid: team-alerts-discord type: discord settings: url: $DISCORD_WEBHOOK_URL use_discord_username: false disableResolveMessage: false # Every alert goes to team-alerts; one notification per rule and instance. policies: - orgId: 1 receiver: team-alerts group_by: [grafana_folder, alertname, instance] group_wait: 30s group_interval: 1m repeat_interval: 4h groups: - orgId: 1 name: https-availability folder: Seat-Back Trivia SRE interval: 30s rules: - uid: https-unavailable title: HTTPS service unavailable condition: C data: - refId: A relativeTimeRange: {from: 300, to: 0} datasourceUid: prometheus model: refId: A expr: probe_success{job="https"} instant: true range: false - refId: C datasourceUid: __expr__ model: refId: C type: threshold expression: A conditions: - evaluator: {type: lt, params: [1]} # A missing probe series or a failed query is a monitoring failure, # not health: both fire the alert. noDataState: Alerting execErrState: Alerting for: 1m labels: severity: critical owner: CP annotations: summary: "{{ .Labels.instance }} has failed its HTTPS probe for at least 1 minute." description: "probe_success is 0, or the probe series is missing. Check the service container, Caddy, DNS, and the TLS certificate." runbook_url: https://git.pollefeys.dev/SeatBackTrivia/devops-manual/src/branch/master/devopsMonitoring.tex - orgId: 1 name: host-capacity folder: Seat-Back Trivia SRE interval: 1m rules: - uid: root-disk-low title: Root filesystem below 15% free condition: C data: - refId: A relativeTimeRange: {from: 600, to: 0} datasourceUid: prometheus model: refId: A expr: node_filesystem_avail_bytes{job="node",mountpoint="/",fstype="ext4"} / node_filesystem_size_bytes{job="node",mountpoint="/",fstype="ext4"} instant: true range: false - refId: C datasourceUid: __expr__ model: refId: C type: threshold expression: A conditions: # Free-space threshold as a fraction. The capacity test raises # it temporarily; the final value is 0.15. - evaluator: {type: lt, params: [0.15]} noDataState: Alerting execErrState: Alerting for: 5m labels: severity: warning owner: NA annotations: summary: "Root filesystem on ssw-590 has had less than 15% free space for 5 minutes." description: "Check docker system df and du -sh /var/log; remove build cache and unused images, never named volumes." runbook_url: https://git.pollefeys.dev/SeatBackTrivia/devops-manual/src/branch/master/devopsMonitoring.tex