vpn-dns-gateway/pipeline/pr-main This commit looks good
An independent review of the SRE chapter against the instructor's rubric found gaps; each was fixed and, where operational, tested on the droplet. Monitoring: - New Grafana rule "Monitoring target down" (up < 1 for 1 m, no data -> Alerting). Tested by stopping Blackbox Exporter 17:34:44-17:37:52 UTC: it fired and resolved, and "HTTPS service down" fired on NoData when every probe series disappeared. - Blackbox Exporter runs as nobody (65534) instead of the image's root. - README: runbook for the new rule; contact-point test prompts for the password; secrets section reflects the replaced admin password. Manual (v5.0): - Alert table with all three rules and their summaries; runbooks in the PDF; accurate no-data description; collection-test figure. - Diagram shows networks per container and the existing volumes. - Targets table, CPU counters vs /proc/stat, probe module excerpt, container identities and mounts, backup command, exposure commands, replaced Grafana admin credential, PR #22 and review gate. - Bibliography enabled with SRE Workbook and tool documentation. - Corrected baseline memory figures, Jenkins start-up length, dashboard version wording, and start-up order; links point to main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
125 lines
4.6 KiB
YAML
125 lines
4.6 KiB
YAML
# Grafana-managed alerts. Grafana expands $VAR in the contact point, which keeps the
|
|
# webhook URL out of Git; templates use .Labels instead of $labels to avoid "$".
|
|
apiVersion: 1
|
|
|
|
contactPoints:
|
|
- orgId: 1
|
|
name: team-alerts
|
|
receivers:
|
|
- uid: team-alerts-discord
|
|
type: discord
|
|
settings:
|
|
url: $DISCORD_WEBHOOK_URL # from the untracked .env.secret
|
|
disableResolveMessage: false # resolved notifications on
|
|
|
|
groups:
|
|
- orgId: 1
|
|
name: sre
|
|
folder: SRE
|
|
interval: 30s # matches the scrape interval
|
|
rules:
|
|
- uid: https-service-down
|
|
title: HTTPS service down
|
|
condition: C
|
|
data:
|
|
- refId: A
|
|
relativeTimeRange: {from: 300, to: 0}
|
|
datasourceUid: prometheus
|
|
model:
|
|
refId: A
|
|
expr: probe_success{job="https"}
|
|
instant: true
|
|
- refId: C
|
|
datasourceUid: __expr__
|
|
model:
|
|
refId: C
|
|
type: threshold
|
|
expression: A
|
|
conditions:
|
|
- evaluator: {type: lt, params: [1]}
|
|
for: 1m
|
|
# A missing series or a failed query is a monitoring failure, not health.
|
|
noDataState: Alerting
|
|
execErrState: Error
|
|
labels: {severity: critical, owner: billy}
|
|
annotations:
|
|
summary: "{{ .Labels.instance }} HTTPS probe is failing"
|
|
description: "probe_success has been 0 for at least 1 minute. Owner: Billy (backup: Vincent)."
|
|
runbook_url: https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/src/branch/main/monitoring/README.md#runbook-https-service-down
|
|
notification_settings:
|
|
receiver: team-alerts
|
|
group_by: [alertname, instance]
|
|
group_wait: 10s
|
|
group_interval: 1m
|
|
repeat_interval: 4h
|
|
|
|
- uid: root-disk-low
|
|
title: Root disk space low
|
|
condition: C
|
|
data:
|
|
- refId: A
|
|
relativeTimeRange: {from: 300, to: 0}
|
|
datasourceUid: prometheus
|
|
model:
|
|
refId: A
|
|
expr: 100 * node_filesystem_avail_bytes{job="node",mountpoint="/",fstype="ext4"} / node_filesystem_size_bytes{job="node",mountpoint="/",fstype="ext4"}
|
|
instant: true
|
|
- refId: C
|
|
datasourceUid: __expr__
|
|
model:
|
|
refId: C
|
|
type: threshold
|
|
expression: A
|
|
conditions:
|
|
- evaluator: {type: lt, params: [15]}
|
|
for: 5m
|
|
noDataState: Alerting
|
|
execErrState: Error
|
|
labels: {severity: warning, owner: billy}
|
|
annotations:
|
|
summary: "Root filesystem on The-Ocean below 15% free"
|
|
description: "Available space on / has stayed under 15% for 5 minutes. Owner: Billy (backup: Vincent)."
|
|
runbook_url: https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/src/branch/main/monitoring/README.md#runbook-root-disk-space-low
|
|
notification_settings:
|
|
receiver: team-alerts
|
|
group_by: [alertname]
|
|
group_wait: 10s
|
|
group_interval: 1m
|
|
repeat_interval: 4h
|
|
|
|
# Collection health: one series per scrape target, so a stopped exporter or a
|
|
# probe series that disappears is reported instead of silently resolving.
|
|
- uid: monitoring-target-down
|
|
title: Monitoring target down
|
|
condition: C
|
|
data:
|
|
- refId: A
|
|
relativeTimeRange: {from: 300, to: 0}
|
|
datasourceUid: prometheus
|
|
model:
|
|
refId: A
|
|
expr: up
|
|
instant: true
|
|
- refId: C
|
|
datasourceUid: __expr__
|
|
model:
|
|
refId: C
|
|
type: threshold
|
|
expression: A
|
|
conditions:
|
|
- evaluator: {type: lt, params: [1]}
|
|
for: 1m
|
|
noDataState: Alerting # no up series at all: Prometheus has lost every target
|
|
execErrState: Error # Prometheus itself unreachable
|
|
labels: {severity: critical, owner: billy}
|
|
annotations:
|
|
summary: "{{ .Labels.job }} target {{ .Labels.instance }} is not being collected"
|
|
description: "Prometheus could not scrape this target for 1 minute; panels and alerts that depend on it are blind. Owner: Billy (backup: Vincent)."
|
|
runbook_url: https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/src/branch/main/monitoring/README.md#runbook-monitoring-target-down
|
|
notification_settings:
|
|
receiver: team-alerts
|
|
group_by: [alertname]
|
|
group_wait: 10s
|
|
group_interval: 1m
|
|
repeat_interval: 4h
|