From 4c098708f4273115401e6668c7877e83805a41bb Mon Sep 17 00:00:00 2001 From: Samah Keshiro Date: Wed, 28 Oct 2026 15:02:43 -0400 Subject: [PATCH 1/5] Add monitoring stack config for #18 --- monitoring/.env | 5 ++ monitoring/.gitignore | 2 + monitoring/baseline.sh | 12 ++++ monitoring/blackbox/blackbox.yml | 12 ++++ monitoring/compose.yaml | 67 +++++++++++++++++++ monitoring/grafana.secrets.env.example | 2 + monitoring/grafana/dashboards/.gitkeep | 0 .../provisioning/dashboards/dashboards.yml | 8 +++ .../provisioning/datasources/prometheus.yml | 9 +++ monitoring/prometheus/prometheus.yml | 32 +++++++++ 10 files changed, 149 insertions(+) create mode 100644 monitoring/.env create mode 100644 monitoring/.gitignore create mode 100644 monitoring/baseline.sh create mode 100644 monitoring/blackbox/blackbox.yml create mode 100644 monitoring/compose.yaml create mode 100644 monitoring/grafana.secrets.env.example create mode 100644 monitoring/grafana/dashboards/.gitkeep create mode 100644 monitoring/grafana/provisioning/dashboards/dashboards.yml create mode 100644 monitoring/grafana/provisioning/datasources/prometheus.yml create mode 100644 monitoring/prometheus/prometheus.yml diff --git a/monitoring/.env b/monitoring/.env new file mode 100644 index 0000000..5f40eab --- /dev/null +++ b/monitoring/.env @@ -0,0 +1,5 @@ +# Pinned image versions only. No passwords in this file. +PROMETHEUS_TAG=v3.13.5 +GRAFANA_TAG=13.2.5 +NODE_EXPORTER_TAG=v1.12.1 +BLACKBOX_TAG=v0.29.0 diff --git a/monitoring/.gitignore b/monitoring/.gitignore new file mode 100644 index 0000000..e1769ec --- /dev/null +++ b/monitoring/.gitignore @@ -0,0 +1,2 @@ +# Secrets stay on the Droplet only +grafana.secrets.env diff --git a/monitoring/baseline.sh b/monitoring/baseline.sh new file mode 100644 index 0000000..27bea93 --- /dev/null +++ b/monitoring/baseline.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Step 1 baseline - run on the Droplet BEFORE starting the monitoring stack. +# Output contains no secrets; paste it into the Gitea issue. +echo "== date"; date -Is +echo "== OS"; cat /etc/os-release | head -4; uname -r +echo "== CPU"; nproc; grep -m1 "model name" /proc/cpuinfo; uname -m +echo "== memory (bytes)"; free -b +echo "== root disk"; df -B1 /; df -h / +echo "== docker"; docker version --format '{{.Server.Version}}'; docker compose version +echo "== containers"; docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}' +echo "== container usage"; docker stats --no-stream --format 'table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}' +echo "== load"; uptime diff --git a/monitoring/blackbox/blackbox.yml b/monitoring/blackbox/blackbox.yml new file mode 100644 index 0000000..f86e150 --- /dev/null +++ b/monitoring/blackbox/blackbox.yml @@ -0,0 +1,12 @@ +modules: + http_2xx: + prober: http + timeout: 10s + http: + method: GET + preferred_ip_protocol: ip4 + valid_status_codes: [] # empty = any 2xx is success + follow_redirects: true + fail_if_not_ssl: true + tls_config: + insecure_skip_verify: false diff --git a/monitoring/compose.yaml b/monitoring/compose.yaml new file mode 100644 index 0000000..23879f1 --- /dev/null +++ b/monitoring/compose.yaml @@ -0,0 +1,67 @@ +# SSW 590 - Monitoring stack (Prometheus, Grafana OSS, Node Exporter, Blackbox Exporter) +# Only Grafana joins gitea-net so the existing Caddy container can proxy it. +# No host ports are published; Prometheus and the exporters stay on the private network. +services: + prometheus: + image: prom/prometheus:${PROMETHEUS_TAG:?choose a release} + container_name: prometheus + restart: unless-stopped + command: + - --config.file=/etc/prometheus/prometheus.yml + - --storage.tsdb.path=/prometheus + - --storage.tsdb.retention.time=7d + - --storage.tsdb.retention.size=5GB + volumes: + - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro + - prometheus_data:/prometheus + networks: [monitoring] + + grafana: + image: grafana/grafana:${GRAFANA_TAG:?choose a release} + container_name: grafana + restart: unless-stopped + depends_on: [prometheus] + env_file: [grafana.secrets.env] + environment: + GF_SERVER_ROOT_URL: "https://metrics.ssw590-08.me/" + GF_SERVER_DOMAIN: "metrics.ssw590-08.me" + GF_AUTH_ANONYMOUS_ENABLED: "false" + GF_USERS_ALLOW_SIGN_UP: "false" + GF_DATE_FORMATS_DEFAULT_TIMEZONE: "America/New_York" + volumes: + - grafana_data:/var/lib/grafana + - ./grafana/provisioning:/etc/grafana/provisioning:ro + - ./grafana/dashboards:/var/lib/grafana/dashboards:ro + networks: [monitoring, gitea-net] + + node-exporter: + image: quay.io/prometheus/node-exporter:${NODE_EXPORTER_TAG:?choose a release} + container_name: node-exporter + restart: unless-stopped + pid: host + command: + - --path.rootfs=/host + - --path.procfs=/host/proc + - --path.sysfs=/host/sys + volumes: + - /:/host:ro,rslave + networks: [monitoring] + + blackbox-exporter: + image: quay.io/prometheus/blackbox-exporter:${BLACKBOX_TAG:?choose a release} + container_name: blackbox-exporter + restart: unless-stopped + command: ["--config.file=/config/blackbox.yml"] + volumes: + - ./blackbox/blackbox.yml:/config/blackbox.yml:ro + networks: [monitoring] + +networks: + monitoring: + gitea-net: + external: true + name: gitea-net + +volumes: + prometheus_data: + grafana_data: diff --git a/monitoring/grafana.secrets.env.example b/monitoring/grafana.secrets.env.example new file mode 100644 index 0000000..dfac1c4 --- /dev/null +++ b/monitoring/grafana.secrets.env.example @@ -0,0 +1,2 @@ +# Copy to grafana.secrets.env on the Droplet and fill in. Never commit the real file. +GF_SECURITY_ADMIN_PASSWORD=CHANGE_ME diff --git a/monitoring/grafana/dashboards/.gitkeep b/monitoring/grafana/dashboards/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/monitoring/grafana/provisioning/dashboards/dashboards.yml b/monitoring/grafana/provisioning/dashboards/dashboards.yml new file mode 100644 index 0000000..58b852e --- /dev/null +++ b/monitoring/grafana/provisioning/dashboards/dashboards.yml @@ -0,0 +1,8 @@ +apiVersion: 1 +providers: + - name: ssw590 + folder: SSW 590 + type: file + allowUiUpdates: true + options: + path: /var/lib/grafana/dashboards diff --git a/monitoring/grafana/provisioning/datasources/prometheus.yml b/monitoring/grafana/provisioning/datasources/prometheus.yml new file mode 100644 index 0000000..433ef5c --- /dev/null +++ b/monitoring/grafana/provisioning/datasources/prometheus.yml @@ -0,0 +1,9 @@ +apiVersion: 1 +datasources: + - name: Prometheus + uid: prometheus + type: prometheus + access: proxy + url: http://prometheus:9090 + isDefault: true + editable: false diff --git a/monitoring/prometheus/prometheus.yml b/monitoring/prometheus/prometheus.yml new file mode 100644 index 0000000..9c45941 --- /dev/null +++ b/monitoring/prometheus/prometheus.yml @@ -0,0 +1,32 @@ +global: + scrape_interval: 30s + evaluation_interval: 30s + +scrape_configs: + - job_name: prometheus + static_configs: + - targets: ["prometheus:9090"] + + - job_name: node + static_configs: + - targets: ["node-exporter:9100"] + + - job_name: blackbox + static_configs: + - targets: ["blackbox-exporter:9115"] + + - job_name: https + metrics_path: /probe + params: + module: [http_2xx] + static_configs: + - targets: + - https://git.ssw590-08.me/user/login + - https://ci.ssw590-08.me/login + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: blackbox-exporter:9115 From 6d65f29674e85656200b2f197ec560262f6abe63 Mon Sep 17 00:00:00 2001 From: Samah Keshiro Date: Wed, 28 Oct 2026 17:42:15 -0400 Subject: [PATCH 2/5] Add SRE dashboard definition for #18 --- monitoring/grafana/dashboards/ssw590-sre.json | 547 ++++++++++++++++++ 1 file changed, 547 insertions(+) create mode 100644 monitoring/grafana/dashboards/ssw590-sre.json diff --git a/monitoring/grafana/dashboards/ssw590-sre.json b/monitoring/grafana/dashboards/ssw590-sre.json new file mode 100644 index 0000000..bdfb8ef --- /dev/null +++ b/monitoring/grafana/dashboards/ssw590-sre.json @@ -0,0 +1,547 @@ +{ + "uid": "ssw590-sre", + "title": "SSW 590 \u2013 Gitea & Jenkins Reliability", + "tags": [ + "ssw590", + "sre" + ], + "timezone": "America/New_York", + "time": { + "from": "now-6h", + "to": "now" + }, + "refresh": "30s", + "schemaVersion": 39, + "version": 1, + "editable": true, + "graphTooltip": 1, + "panels": [ + { + "id": 1, + "type": "timeseries", + "title": "1. Droplet CPU utilization (all CPUs)", + "description": "Percent of CPU time not idle, averaged across all CPUs over a 2-minute rate window. Whole-droplet: includes Gitea, Jenkins, Caddy and monitoring; does not attribute CPU to a container.", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "x": 0, + "y": 0, + "w": 12, + "h": 8 + }, + "targets": [ + { + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "100 * (1 - avg(rate(node_cpu_seconds_total{job=\"node\",mode=\"idle\"}[2m])))", + "legendFormat": "CPU busy %", + "range": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "custom": { + "thresholdsStyle": { + "mode": "line" + }, + "lineWidth": 2, + "fillOpacity": 10 + } + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 2, + "type": "timeseries", + "title": "2. Available host memory", + "description": "MemAvailable: the kernel's estimate of memory available to start new applications without swapping (bytes, IEC). Not the same as unused RAM.", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "x": 12, + "y": 0, + "w": 12, + "h": 8 + }, + "targets": [ + { + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "node_memory_MemAvailable_bytes{job=\"node\"}", + "legendFormat": "MemAvailable", + "range": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "bytes", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 209715200 + }, + { + "color": "green", + "value": 419430400 + } + ] + }, + "custom": { + "thresholdsStyle": { + "mode": "line" + }, + "lineWidth": 2, + "fillOpacity": 10 + } + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 3, + "type": "timeseries", + "title": "3. Root filesystem available space (/dev/vda1)", + "description": "Available bytes divided by size bytes for the host root filesystem only (device /dev/vda1, mounted at /). Alert threshold is 15%.", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "x": 0, + "y": 8, + "w": 12, + "h": 8 + }, + "targets": [ + { + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "100 * node_filesystem_avail_bytes{job=\"node\",mountpoint=\"/\",device=\"/dev/vda1\"} / node_filesystem_size_bytes{job=\"node\",mountpoint=\"/\",device=\"/dev/vda1\"}", + "legendFormat": "root available %", + "range": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 15 + }, + { + "color": "green", + "value": 25 + } + ] + }, + "custom": { + "thresholdsStyle": { + "mode": "line" + }, + "lineWidth": 2, + "fillOpacity": 10 + } + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 4, + "type": "timeseries", + "title": "6. HTTPS probe duration", + "description": "Total time for each Blackbox HTTPS probe (DNS + connect + TLS + request, following redirects), one line per service.", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "x": 12, + "y": 8, + "w": 12, + "h": 8 + }, + "targets": [ + { + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "probe_duration_seconds{job=\"https\"}", + "legendFormat": "{{instance}}", + "range": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "custom": { + "thresholdsStyle": { + "mode": "off" + }, + "lineWidth": 2, + "fillOpacity": 10 + } + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 5, + "type": "timeseries", + "title": "4. Gitea HTTPS availability", + "description": "1 = Blackbox Exporter's HTTPS probe of https://git.ssw590-08.me/user/login succeeded (DNS, valid TLS, 2xx after redirects); 0 = failed. Sampled every 30 s.", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "x": 0, + "y": 16, + "w": 12, + "h": 7 + }, + "targets": [ + { + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "probe_success{job=\"https\",instance=\"https://git.ssw590-08.me/user/login\"}", + "legendFormat": "{{instance}}", + "range": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + }, + "custom": { + "thresholdsStyle": { + "mode": "line" + }, + "lineWidth": 2, + "fillOpacity": 10, + "drawStyle": "line", + "lineInterpolation": "stepAfter" + }, + "mappings": [ + { + "type": "value", + "options": { + "0": { + "text": "DOWN", + "color": "red" + }, + "1": { + "text": "UP", + "color": "green" + } + } + } + ], + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 6, + "type": "timeseries", + "title": "5. Jenkins HTTPS availability", + "description": "1 = Blackbox Exporter's HTTPS probe of https://ci.ssw590-08.me/login succeeded (DNS, valid TLS, 2xx after redirects); 0 = failed. Sampled every 30 s.", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "x": 12, + "y": 16, + "w": 12, + "h": 7 + }, + "targets": [ + { + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "probe_success{job=\"https\",instance=\"https://ci.ssw590-08.me/login\"}", + "legendFormat": "{{instance}}", + "range": true + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + }, + "custom": { + "thresholdsStyle": { + "mode": "line" + }, + "lineWidth": 2, + "fillOpacity": 10, + "drawStyle": "line", + "lineInterpolation": "stepAfter" + }, + "mappings": [ + { + "type": "value", + "options": { + "0": { + "text": "DOWN", + "color": "red" + }, + "1": { + "text": "UP", + "color": "green" + } + } + } + ], + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi" + } + } + }, + { + "id": 7, + "type": "stat", + "title": "Scrape health (up)", + "description": "1 = Prometheus scraped the target successfully. A target can be up while its probe_success is 0.", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "x": 0, + "y": 23, + "w": 24, + "h": 5 + }, + "targets": [ + { + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "up", + "legendFormat": "{{job}} {{instance}}", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "mappings": [ + { + "type": "value", + "options": { + "0": { + "text": "DOWN", + "color": "red" + }, + "1": { + "text": "UP", + "color": "green" + } + } + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "none", + "textMode": "value_and_name", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + } + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + } +} \ No newline at end of file From d6ea94f20d1017898737b8f46129b183410c6c6d Mon Sep 17 00:00:00 2001 From: Samah Keshiro Date: Wed, 28 Oct 2026 20:32:10 -0400 Subject: [PATCH 3/5] Add ServiceUnavailable alert export and runbook for #18 --- monitoring/RUNBOOK.md | 65 ++++++++++++++++++++ monitoring/grafana/alerting/alert-rules.yaml | 64 +++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 monitoring/RUNBOOK.md create mode 100644 monitoring/grafana/alerting/alert-rules.yaml diff --git a/monitoring/RUNBOOK.md b/monitoring/RUNBOOK.md new file mode 100644 index 0000000..72ea445 --- /dev/null +++ b/monitoring/RUNBOOK.md @@ -0,0 +1,65 @@ +# SSW 590 Monitoring Runbook + +Dashboard: https://metrics.ssw590-08.me/d/ssw590-sre +Contact point: `team-alerts` (email). Times are America/New_York. + +--- + +## ServiceUnavailable – Gitea or Jenkins HTTPS probe failing + +**Owner:** samahk13 (primary), kholmes (backup) +**Severity:** critical +**Fires when:** `probe_success{job="https"}` is 0 for an instance for at least 1 minute, +or the probe series is missing (no data) / the query errors. + +### 1. Acknowledge +Reply to the alert email (or post in the team chat) with "ack" and your name, and +note the time. This is the acknowledgement time in the incident timeline. + +### 2. Is it the service or the monitoring? +- Open the dashboard. Check the **Scrape health (up)** row. + - `blackbox` or `https` shows DOWN / no data → the **monitoring** is broken, + not necessarily the service. Go to step 5. + - `up` is 1 but panel 4 or 5 shows DOWN → the probed request failed. Continue. +- Open the URL in a browser: + - Gitea: https://git.ssw590-08.me/user/login + - Jenkins: https://ci.ssw590-08.me/login + +### 3. Check the container (SSH to the Droplet as root) +``` +docker ps -a --format 'table {{.Names}}\t{{.Status}}' +docker logs --tail=50 jenkins # or: gitea +docker logs --tail=50 caddy # proxy / TLS problems +``` + +### 4. Restore +- Container stopped/exited: + ``` + docker start jenkins # or: docker start gitea + ``` +- Container running but unhealthy: `docker restart jenkins` +- Certificate/proxy error: check `docker logs caddy`; validate with + `docker exec caddy caddy validate --config /etc/caddy/Caddyfile`. +- **Never** use `docker compose down -v` (deletes data volumes). + +Wait for the next probes (~30–60 s). The alert resolves when `probe_success` is 1 +again; confirm the "Resolved" email arrives. + +### 5. Monitoring itself is failing (no data / error) +``` +cd /root/Scrap-Web/monitoring +docker compose ps +docker compose logs --tail=50 prometheus blackbox-exporter +docker compose start prometheus blackbox-exporter +``` + +### 6. After recovery +- Jenkins: run **Build Now** on `main` and confirm it passes. +- Gitea: confirm the web login and that Jenkins can still post commit statuses. +- Record the timeline in the incident issue. + +--- + +## HostDiskLow – root filesystem below 15 % free + +**Owner:** kholmes — *(partner to complete)* diff --git a/monitoring/grafana/alerting/alert-rules.yaml b/monitoring/grafana/alerting/alert-rules.yaml new file mode 100644 index 0000000..a2cf970 --- /dev/null +++ b/monitoring/grafana/alerting/alert-rules.yaml @@ -0,0 +1,64 @@ +apiVersion: 1 +groups: + - orgId: 1 + name: availability + folder: SSW 590 + interval: 30s + rules: + - uid: fg2n29o6c9a80d + title: ServiceUnavailable + condition: C + data: + - refId: A + relativeTimeRange: + from: 600 + to: 0 + datasourceUid: prometheus + model: + editorMode: code + expr: probe_success{job="https"} + instant: true + intervalMs: 1000 + legendFormat: __auto + maxDataPoints: 43200 + range: false + refId: A + - refId: C + queryType: expression + datasourceUid: __expr__ + model: + conditions: + - evaluator: + params: + - 0 + type: gt + operator: + type: and + query: + params: + - C + reducer: + params: [] + type: last + type: query + datasource: + type: __expr__ + uid: __expr__ + expression: A + intervalMs: 1000 + maxDataPoints: 43200 + refId: C + type: threshold + noDataState: Alerting + execErrState: Alerting + for: 1m + annotations: + runbook_url: https://git.ssw590-08.me/SSW-590-08/Scrap-Web/src/branch/main/monitoring/RUNBOOK.md + summary: https://git.ssw590-08.me/SSW-590-08/Scrap-Web/src/branch/main/monitoring/RUNBOOK.md + labels: + owner: samahk13 + severity: critical + team: ssw590 + isPaused: false + notification_settings: + receiver: team-alerts From 01f842323e8654930144eae1ed34b67b33791e0b Mon Sep 17 00:00:00 2001 From: Samah Keshiro Date: Wed, 28 Oct 2026 20:39:33 -0400 Subject: [PATCH 4/5] Fix ServiceUnavailable threshold for #18 --- monitoring/grafana/alerting/alert-rules.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitoring/grafana/alerting/alert-rules.yaml b/monitoring/grafana/alerting/alert-rules.yaml index a2cf970..2bd7f43 100644 --- a/monitoring/grafana/alerting/alert-rules.yaml +++ b/monitoring/grafana/alerting/alert-rules.yaml @@ -30,8 +30,8 @@ groups: conditions: - evaluator: params: - - 0 - type: gt + - 1 + type: lt operator: type: and query: From 2ab41bdce5f46dc0030c14a7dd3f0818ba3fb8d5 Mon Sep 17 00:00:00 2001 From: Samah Keshiro Date: Thu, 29 Oct 2026 17:24:21 -0400 Subject: [PATCH 5/5] Update ServiceUnavailable alert export and runbook for #18 --- monitoring/grafana/alerting/alert-rules.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitoring/grafana/alerting/alert-rules.yaml b/monitoring/grafana/alerting/alert-rules.yaml index 2bd7f43..b9864d5 100644 --- a/monitoring/grafana/alerting/alert-rules.yaml +++ b/monitoring/grafana/alerting/alert-rules.yaml @@ -54,7 +54,7 @@ groups: for: 1m annotations: runbook_url: https://git.ssw590-08.me/SSW-590-08/Scrap-Web/src/branch/main/monitoring/RUNBOOK.md - summary: https://git.ssw590-08.me/SSW-590-08/Scrap-Web/src/branch/main/monitoring/RUNBOOK.md + summary: '{{ $labels.instance }} HTTPS probe failing for 1m' labels: owner: samahk13 severity: critical