Compare commits

..
Author SHA1 Message Date
Codex (authorized Assignment 5 implementation) 6605394d7a Add Assignment 7 monitoring, tested alerts, and incident evidence
myfileagent-python-ci/pipeline/head This commit looks good
myfileagent-python-ci/pipeline/pr-main This commit looks good
2026-10-28 17:51:31 +00:00
glovely 131d605c5e Merge pull request 'Assignment 6: enforce Python CI before merging' (#11) from assignment6/python-ci into main
Assignment 5 manual PDF / manual (push) Successful in 1m11s
myfileagent-python-ci/pipeline/head This commit looks good
Reviewed-on: #11
Reviewed-by: nkogut <nkogut@stevens.edu>
2026-10-09 19:14:44 +00:00
43 changed files with 3483 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
*.secret
.env
notification-setup/
+5
View File
@@ -0,0 +1,5 @@
# Grafana route installed on October 24, 2026. Merge with existing routes.
metrics.myfileagent.tech {
reverse_proxy grafana:3000
}
+31
View File
@@ -0,0 +1,31 @@
# Assignment 7 monitoring
Deployed on the existing Droplet and validated October 24-28, 2026. Source is submitted for peer review; see incidents/2026-10-24-jenkins-outage.md. Report integration and compilation are deferred by the team.
## Architecture and access
Caddy serves authenticated Grafana at https://metrics.myfileagent.tech over the existing private proxy bridge. Grafana uses private http://prometheus:9090. Prometheus scrapes itself, Node Exporter, Blackbox Exporter and the actual Gitea/Jenkins HTTPS login probes every 30 seconds. TLS verification stays enabled. No monitoring host ports, privileged containers or Docker socket mounts are used. Only Grafana joins the existing proxy bridge.
Node Exporter reads host root/proc/sys through a read-only root mount and uses the host PID namespace for whole-host CPU, memory and filesystem measurements. This is sensitive host visibility; it does not measure per-container attribution or whole-host network interfaces.
## Versions and resource settings
Compose fixes Prometheus v3.15.1, Grafana 13.2.4, Node Exporter v1.12.1 and Blackbox Exporter v0.29.1. Pulled image digests are in evidence/monitoring-image-digests-2026-10-24.json. Existing Gitea/Jenkins versions are preserved.
Prometheus has a 160 MiB memory/swap cap and 120 MiB Go memory target; exporters each have 32 MiB caps. Grafana memory/swap limits were removed at the team's request after bounded startup failed. CPU quotas remain. This is measured lab operation on a shared host, not guaranteed sizing. Avoid overlapping Jenkins/manual builds; monitor actual availability and resource pressure.
Prometheus retention is seven days and 512 MB of TSDB blocks. WAL/head/compaction require additional space; this is not a hard total-volume limit.
## Deployment and secrets
Run from this monitoring directory on the Droplet. Review `docker compose config --quiet` before changes. The external proxy network must exist as myfileagent-gitea_gitea-private. The compose override reflects the existing Droplet paths and supplemental group 1000; adapt only after verifying host identities.
Secrets stay outside Git under /home/codex/myfileagent-gitea/secrets with restricted permissions. The admin-password file is only the initial setup value; do not use it to reset a changed password. Private Discord routing provisioning is mounted separately over the committed empty placeholder. Recreate the approved contact point/policy privately for a new deployment; never commit the webhook URL. Obsolete SMTP setup files are excluded from this change. Gmail SMTP was not the working delivery route.
Preserve the live Caddyfile; the example fragment is not a replacement for all existing routes. Validate/reload Caddy only for an approved proxy change.
## Dashboards, alerts and validation
The six-panel team dashboard and two-panel runbook dashboard are file-provisioned. Dashboard JSON copies under grafana/dashboards and grafana/provisioning/dashboards/json must remain identical. UI annotations live in Grafana state and are not reconstructed by dashboard JSON.
Service alert: separate expected URL instances, one-minute pending, every 30 seconds. Capacity: root /dev/vda1 ext4, available space below 15% for five minutes. Missing expected probe series, no-data and evaluation errors surface as alerting. Discord delivery uses group wait 10 seconds, group interval one minute and repeat four hours, with resolved delivery enabled. No notification secret is present in this tree.
The threshold-only capacity test and Jenkins-only outage both delivered firing and resolved messages. Final capacity threshold is 15%. See runbooks, slo and incidents. Evidence JSON and selected team screenshots are under evidence/.
Python CI regression checks run through the established Jenkins multibranch job; Compose/promtool/Blackbox validation is recorded separately. These existing Python checks alone do not validate all monitoring semantics.
## Persistence, backup and recovery
Prometheus and Grafana use separate named volumes. October 28 separate restarts preserved historical readings, resource-backed dashboards, data source, two alert rules and 18 annotations. A missed Jenkins probe sample was recorded; monitoring gaps are unknown, not service success. See evidence/monitoring-restart-persistence.json. This is restart persistence, not tested backup/restore.
Before future upgrades, use a consistent stopped Grafana SQLite/volume backup and an approved consistent Prometheus snapshot/backup procedure, preserving ownership and private routing secrets separately. Restore into isolation and verify before replacing live volumes; this monitoring backup/restore exercise has not been performed.
Monitoring rollback: `docker compose stop` from this directory only. Resume: `docker compose start`. Do not use down -v, global prune, or stop the existing Gitea/Jenkins project as monitoring rollback. For Jenkins-only recovery use the exact command in runbooks/service-unavailable.md.
## Review status
Feature branch assignment7/monitoring. P1 external-check issue 12 and P2 timestamp/recovery issue 13 are assigned to glovely. Peer approval, merge and final report publication remain separate steps. Same-Droplet monitoring cannot reliably report a total host failure; no external checker has been deployed.
+11
View File
@@ -0,0 +1,11 @@
modules:
http_2xx:
prober: http
timeout: 10s
http:
method: GET
preferred_ip_protocol: ip4
follow_redirects: true
fail_if_not_ssl: true
tls_config:
insecure_skip_verify: false
+8
View File
@@ -0,0 +1,8 @@
services:
grafana:
group_add:
- "1000"
environment:
GF_SMTP_ENABLED: "false"
volumes:
- /home/codex/myfileagent-gitea/secrets/grafana-discord-routing.json:/etc/grafana/provisioning/alerting/team-discord-routing.json:ro
+79
View File
@@ -0,0 +1,79 @@
name: myfileagent-monitoring
services:
prometheus:
image: prom/prometheus:v3.15.1
restart: unless-stopped
mem_limit: 160m
memswap_limit: 160m
cpus: 0.35
pids_limit: 128
environment:
GOMEMLIMIT: 120MiB
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=7d
- --storage.tsdb.retention.size=512MB
- --query.max-concurrency=2
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
networks: [monitoring]
grafana:
image: grafana/grafana:13.2.4
restart: unless-stopped
cpus: 0.35
pids_limit: 128
environment:
GF_SERVER_ROOT_URL: https://metrics.myfileagent.tech
GF_AUTH_ANONYMOUS_ENABLED: "false"
GF_USERS_ALLOW_SIGN_UP: "false"
GF_SECURITY_ADMIN_PASSWORD__FILE: /run/secrets/grafana_admin_password
GF_ANALYTICS_REPORTING_ENABLED: "false"
GF_ANALYTICS_CHECK_FOR_UPDATES: "false"
secrets: [grafana_admin_password]
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning:ro
networks: [monitoring, proxy]
node-exporter:
image: quay.io/prometheus/node-exporter:v1.12.1
restart: unless-stopped
mem_limit: 32m
memswap_limit: 32m
cpus: 0.15
pids_limit: 64
pid: host
command:
- --path.rootfs=/host
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --collector.disable-defaults
- --collector.cpu
- --collector.meminfo
- --collector.filesystem
volumes:
- /:/host:ro,rslave
networks: [monitoring]
blackbox-exporter:
image: quay.io/prometheus/blackbox-exporter:v0.29.1
restart: unless-stopped
mem_limit: 32m
memswap_limit: 32m
cpus: 0.15
pids_limit: 64
command: [--config.file=/config/blackbox.yml]
volumes:
- ./blackbox/blackbox.yml:/config/blackbox.yml:ro
networks: [monitoring]
networks:
monitoring:
proxy:
external: true
name: myfileagent-gitea_gitea-private
volumes:
prometheus_data:
grafana_data:
secrets:
grafana_admin_password:
file: /home/codex/myfileagent-gitea/secrets/grafana-admin-password
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
[
"[2026-10-24T20:34:42.991Z] + python3 -m py_compile pricing.py tests/test_pricing.py",
"[2026-10-24T20:34:44.991Z] + python3 -m unittest discover -s tests -v",
"[2026-10-24T20:34:44.991Z] Ran 2 tests in 0.000s",
"[2026-10-24T20:34:44.992Z] OK",
"[Gitea] Notifying branch build status: SUCCESS This commit looks good",
"Finished: SUCCESS"
]
@@ -0,0 +1,18 @@
{
"created_via": "Existing user-signed-in Gitea session",
"author_shown_in_gitea": "jenkins-ci",
"issues": [
{
"number": 12,
"priority": "P1",
"owner": "glovely",
"url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/issues/12"
},
{
"number": 13,
"priority": "P2",
"owner": "glovely",
"url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/issues/13"
}
]
}
@@ -0,0 +1,186 @@
{
"status": "success",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"__name__": "probe_success",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"values": [
[
1792876991.023,
"1"
],
[
1792877021.023,
"1"
],
[
1792877051.023,
"1"
],
[
1792877081.023,
"1"
],
[
1792877111.023,
"1"
],
[
1792877141.023,
"1"
],
[
1792877171.023,
"1"
],
[
1792877201.023,
"1"
],
[
1792877231.023,
"0"
],
[
1792877261.023,
"0"
],
[
1792877291.023,
"0"
],
[
1792877321.023,
"0"
],
[
1792877351.023,
"0"
],
[
1792877381.023,
"0"
],
[
1792877411.023,
"0"
],
[
1792877441.023,
"0"
],
[
1792877471.023,
"1"
],
[
1792877501.023,
"1"
],
[
1792877531.023,
"1"
],
[
1792877561.023,
"1"
]
]
},
{
"metric": {
"__name__": "probe_success",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"values": [
[
1792877004.889,
"1"
],
[
1792877034.889,
"1"
],
[
1792877064.889,
"1"
],
[
1792877094.889,
"1"
],
[
1792877124.889,
"1"
],
[
1792877154.889,
"1"
],
[
1792877184.889,
"1"
],
[
1792877214.889,
"1"
],
[
1792877244.889,
"1"
],
[
1792877274.889,
"1"
],
[
1792877304.889,
"1"
],
[
1792877334.889,
"1"
],
[
1792877364.889,
"1"
],
[
1792877394.889,
"1"
],
[
1792877424.889,
"1"
],
[
1792877454.889,
"1"
],
[
1792877484.889,
"1"
],
[
1792877514.889,
"1"
],
[
1792877544.889,
"1"
],
[
1792877574.889,
"1"
]
]
}
]
}
}
@@ -0,0 +1,133 @@
{
"start_utc": "2026-10-24T21:23:00+00:00",
"end_utc": "2026-10-24T21:33:00+00:00",
"qualification": "Fixed 10-minute incident window; sampled availability, not 24-hour SLO",
"queries": {
"availability_percent": {
"promql": "100*avg_over_time(probe_success{job=\"https\"}[10m])",
"response": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"60"
]
},
{
"metric": {
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"100"
]
}
]
}
}
},
"samples": {
"promql": "count_over_time(probe_success{job=\"https\"}[10m])",
"response": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"20"
]
},
{
"metric": {
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"20"
]
}
]
}
}
},
"failures": {
"promql": "count_over_time(probe_success{job=\"https\"}[10m])-sum_over_time(probe_success{job=\"https\"}[10m])",
"response": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"8"
]
},
{
"metric": {
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"0"
]
}
]
}
}
},
"end_probe": {
"promql": "probe_success{job=\"https\"}",
"response": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "probe_success",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
},
{
"metric": {
"__name__": "probe_success",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
}
]
}
}
}
}
}
@@ -0,0 +1,12 @@
[
{
"check": "prometheus",
"exit": 0,
"output": "Checking /config/prometheus.yml\n SUCCESS: /config/prometheus.yml is valid prometheus config file syntax\n\n"
},
{
"check": "blackbox",
"exit": 0,
"output": "time=2026-10-24T19:55:58.503Z level=INFO source=main.go:99 msg=\"Starting blackbox_exporter\" version=\"(version=0.29.1, branch=HEAD, revision=ad91668339ca265f460c23fc422a27ba6d788db9)\"\ntime=2026-10-24T19:55:58.504Z level=INFO source=main.go:100 msg=\"(go=go1.27.3, platform=linux/amd64, user=root@ab03ed60a291, date=20261021-18:03:25, tags=unknown)\"\ntime=2026-10-24T19:55:58.506Z level=INFO source=config.go:144 msg=\"Configuration file change detected, reloading the configuration.\"\ntime=2026-10-24T19:55:58.507Z level=INFO source=main.go:108 msg=\"Config file is ok exiting...\"\n"
}
]
@@ -0,0 +1,38 @@
[
{
"image": "prom/prometheus:v3.15.1",
"digests": [
"prom/prometheus@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2"
],
"architecture": "amd64",
"os": "linux",
"id": "sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2"
},
{
"image": "grafana/grafana:13.2.4",
"digests": [
"grafana/grafana@sha256:dbbc38ea21103cefb50396340cd88afec779c7e070b0a7bf5a75b4ce46651d3f"
],
"architecture": "amd64",
"os": "linux",
"id": "sha256:dbbc38ea21103cefb50396340cd88afec779c7e070b0a7bf5a75b4ce46651d3f"
},
{
"image": "quay.io/prometheus/node-exporter:v1.12.1",
"digests": [
"quay.io/prometheus/node-exporter@sha256:1b4e4438faca4dd7e001dd445d161a4a2091b0fededa84093b3a8dfeae1f1be0"
],
"architecture": "amd64",
"os": "linux",
"id": "sha256:1b4e4438faca4dd7e001dd445d161a4a2091b0fededa84093b3a8dfeae1f1be0"
},
{
"image": "quay.io/prometheus/blackbox-exporter:v0.29.1",
"digests": [
"quay.io/prometheus/blackbox-exporter@sha256:ea1c7aa3ef3f307cd03e85f34abb604478ccb90b567fc690da0cd9776da76b13"
],
"architecture": "amd64",
"os": "linux",
"id": "sha256:ea1c7aa3ef3f307cd03e85f34abb604478ccb90b567fc690da0cd9776da76b13"
}
]
@@ -0,0 +1,281 @@
{
"started_utc": "2026-10-28T17:31:31.276382+00:00",
"purpose": "Separate service restart persistence, not backup/restore",
"events": [
{
"service": "prometheus",
"restart_requested_utc": "2026-10-28T17:31:34.517301+00:00",
"restart_exit": 0,
"restart_finished_utc": "2026-10-28T17:31:36.010653+00:00",
"ready_observed_utc": "2026-10-28T17:31:40.102642+00:00"
},
{
"service": "grafana",
"restart_requested_utc": "2026-10-28T17:32:15.105596+00:00",
"restart_exit": 0,
"restart_finished_utc": "2026-10-28T17:32:20.870015+00:00",
"ready_observed_utc": "2026-10-28T17:32:55.109817+00:00"
}
],
"before": {
"utc": "2026-10-28T17:31:31.276421+00:00",
"containers": {
"prometheus": {
"id": "28b35f29a8f87de81ff57432bf01ffd220cff426152d4428800efd9c305005ae",
"mounts": [
[
"myfileagent-monitoring_prometheus_data",
"/prometheus"
]
]
},
"grafana": {
"id": "d71ae8d91703940df0a9128a5e9741c66b8d1798cae50f1306d0064a54e527cc",
"mounts": [
[
"myfileagent-monitoring_grafana_data",
"/var/lib/grafana"
]
]
}
},
"historical_probe": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "probe_success",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
},
{
"metric": {
"__name__": "probe_success",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
}
]
}
},
"database": {
"dashboard": {
"count": 0,
"sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945"
},
"data_source": {
"count": 1,
"sha256": "e951bf9a8c74d5329a16b8da0b49a932564592f49b778735c7e54badcf94dbdf"
},
"alert_rule": {
"count": 2,
"sha256": "bb4b682af4f1b2e37f82d6fc0270cd773b6123dc4ada8352df2bec2bf1f7c5f8"
},
"annotation": {
"count": 18,
"sha256": "c5531a98daa5397b436ddd9692ce7bfcf8a8c5b67a7255e7679fb4b6d75bc0a8"
}
}
},
"after": {
"utc": "2026-10-28T17:33:30.259795+00:00",
"containers": {
"prometheus": {
"id": "28b35f29a8f87de81ff57432bf01ffd220cff426152d4428800efd9c305005ae",
"mounts": [
[
"myfileagent-monitoring_prometheus_data",
"/prometheus"
]
]
},
"grafana": {
"id": "d71ae8d91703940df0a9128a5e9741c66b8d1798cae50f1306d0064a54e527cc",
"mounts": [
[
"myfileagent-monitoring_grafana_data",
"/var/lib/grafana"
]
]
}
},
"historical_probe": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "probe_success",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
},
{
"metric": {
"__name__": "probe_success",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
}
]
}
},
"database": {
"dashboard": {
"count": 0,
"sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945"
},
"data_source": {
"count": 1,
"sha256": "e951bf9a8c74d5329a16b8da0b49a932564592f49b778735c7e54badcf94dbdf"
},
"alert_rule": {
"count": 2,
"sha256": "bb4b682af4f1b2e37f82d6fc0270cd773b6123dc4ada8352df2bec2bf1f7c5f8"
},
"annotation": {
"count": 18,
"sha256": "c5531a98daa5397b436ddd9692ce7bfcf8a8c5b67a7255e7679fb4b6d75bc0a8"
}
}
},
"database_equal": true,
"historical_values_equal": true,
"current_probes": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "probe_success",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1793208813.125,
"1"
]
},
{
"metric": {
"__name__": "probe_success",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1793208813.125,
"1"
]
}
]
}
},
"target_health": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "up",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1793208813.419,
"1"
]
},
{
"metric": {
"__name__": "up",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1793208813.419,
"1"
]
},
{
"metric": {
"__name__": "up",
"instance": "node-exporter:9100",
"job": "node"
},
"value": [
1793208813.419,
"1"
]
},
{
"metric": {
"__name__": "up",
"instance": "blackbox-exporter:9115",
"job": "blackbox"
},
"value": [
1793208813.419,
"1"
]
},
{
"metric": {
"__name__": "up",
"instance": "prometheus:9090",
"job": "prometheus"
},
"value": [
1793208813.419,
"1"
]
}
]
}
},
"finished_utc": "2026-10-28T17:33:33.422124+00:00",
"collection_gaps": [
{
"instance": "https://ci.myfileagent.tech/login",
"samples": 19,
"gaps_over_45_seconds": [
{
"from_epoch": 1793208671.023,
"to_epoch": 1793208731.022,
"seconds": 59.999
}
]
},
{
"instance": "https://myfileagent.tech/user/login",
"samples": 20,
"gaps_over_45_seconds": []
}
],
"restart_readiness_seconds": {
"prometheus": 5.585,
"grafana": 40.004
},
"dashboard_storage_note": "Legacy dashboard table is empty in this Grafana version; see monitoring-restart-state-verification.json for resource-backed dashboards."
}
@@ -0,0 +1,25 @@
{
"grafana_state": {
"dashboards": [
{
"uid": "myfileagent-sre",
"title": "MyFileAgent - SRE Monitoring",
"panels": 6,
"creationTimestamp": "2026-10-24T20:29:24Z"
},
{
"uid": "myfileagent-sre-runbooks",
"title": "MyFileAgent - Alert Runbooks",
"panels": 2,
"creationTimestamp": "2026-10-24T20:56:55Z"
}
],
"annotations": 18
},
"https": {
"https://metrics.myfileagent.tech/api/health": 200,
"https://ci.myfileagent.tech/login": 200,
"https://myfileagent.tech/user/login": 200
},
"checked_utc": "2026-10-28T17:33:28.307692+00:00"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

@@ -0,0 +1,25 @@
{
"saved_utc": "2026-10-24T20:49:53.986453+00:00",
"role": "Primary dashboard screenshot evidence, selected by the team",
"files": [
{
"path": "screenshots/team-dashboard-cpu-memory.png",
"source": "User-supplied original screenshot: codex-clipboard-2808a8e1-d36c-4128-bea2-f55e38d9a858.png",
"bytes": 390149,
"sha256": "5de62ffbc6213d4215acfe681dd7bbe5b0f35fbc71e4411862d69532204f5b07"
},
{
"path": "screenshots/team-dashboard-root-gitea.png",
"source": "User-supplied original screenshot: codex-clipboard-e57208ff-5657-4534-b2df-ff5e4a44f437.png",
"bytes": 352388,
"sha256": "be7768538882732dbf77c07d6757c9aa68ed75633f258759d9184459a8c68176"
},
{
"path": "screenshots/team-dashboard-jenkins-duration.png",
"source": "User-supplied original screenshot: codex-clipboard-0b34de30-5510-47c5-97ea-80ce8b5597d6.png",
"bytes": 412894,
"sha256": "537f54b2d73c8a0c23c984de35d3c70150020ebf64764f9bcd5f4ca915984c45"
}
],
"context": "Screenshots show a rolling Last 15 minutes range and 5-minute refresh, captured at different times (visible taskbar 16:44, 16:48 and 16:49 on October 24, 2026). Do not describe these as identical fixed-window captures. Exact build times and raw measurements remain in ci-build4-dashboard-correlation.json. Originals preserved, including browser chrome and desktop notification in the third screenshot."
}
@@ -0,0 +1,45 @@
{
"id": null,
"uid": "myfileagent-sre-runbooks",
"title": "MyFileAgent - Alert Runbooks",
"tags": [
"SSW590",
"runbooks"
],
"timezone": "America/New_York",
"schemaVersion": 39,
"version": 1,
"editable": false,
"panels": [
{
"id": 1,
"title": "Service unavailable",
"type": "text",
"gridPos": {
"x": 0,
"y": 0,
"w": 24,
"h": 18
},
"options": {
"mode": "markdown",
"content": "# HTTPS service unavailable\nOwner: SSW590 Group 7. Severity: critical. Evaluate every 30s; pending 1 minute.\n\nThe rule produces separate instances for Gitea and Jenkins by URL label.\nMissing expected probe series are explicitly treated as failure; datasource\nno-data and evaluation errors enter Alerting rather than reporting health.\n\n1. Acknowledge the alert and record receipt/acknowledgement time.\n2. Inspect the instance URL and the availability/duration panels. Check collection\nhealth and exporter logs to distinguish probe failure from broken monitoring.\n3. Check DNS, valid TLS, expected response and redirects from the monitoring network.\nNever disable certificate verification to clear an alert.\n4. Inspect the affected container status/logs, Caddy routing, resource pressure,\nand recent changes. Confirm the actual cause before restarting anything.\n5. For the planned Jenkins-only exercise, restore using:\n`cd /home/codex/myfileagent-gitea && docker compose -f compose.yaml -f compose.jenkins.yaml start jenkins`\nVerify the live Compose service remains named jenkins before running it.\nDo not stop the Droplet, Gitea or monitoring; never delete service volumes.\n6. Verify HTTPS probe success, a normal Jenkins pipeline, webhook/status and\nGitea manual build as applicable. Record first success and resolved notification.\n7. Escalate unresolved faults to the other team member; capture impact/timeline\nand corrective actions. A complete Droplet failure can also stop these alerts.\n\nNotification destination and delivery timings are pending SMTP/contact-point\nsetup. Scrape (30s), evaluation (30s), pending (1m) and notification delays add\nlatency; do not expect an immediate message. No outage test has been run.\n"
}
},
{
"id": 2,
"title": "Root capacity",
"type": "text",
"gridPos": {
"x": 0,
"y": 18,
"w": 24,
"h": 18
},
"options": {
"mode": "markdown",
"content": "# Root capacity below 15 percent\nOwner: SSW590 Group 7. Severity: warning. Evaluate every 30s; pending 5 minutes.\n\nSelector: instance node-exporter:9100; mountpoint /; device /dev/vda1; ext4.\nQuery is 100 * available bytes / size bytes for that same filesystem.\nThe 15% threshold leaves operational room for builds, compaction and logs.\nNo-data or evaluation errors enter Alerting and require monitoring diagnosis.\n\n1. Acknowledge and record times. Compare exporter values to `df -B1 /`.\n2. Inspect directory usage, Docker images/volumes and logs read-only first.\nIdentify growth and protect Gitea/Jenkins/Grafana/Prometheus persistent data.\n3. Agree with the team on safe cleanup or retention changes; avoid global\nDocker pruning and do not delete repositories, service volumes or evidence.\n4. Restore adequate headroom, verify the metric and wait for rule resolution.\n5. Record cause, corrective action, delivered notification and recovery time.\n\nSafe planned test: temporarily raise the free-percentage threshold above the\nmeasured current value, wait through the full five-minute pending period and\ncapture real firing/delivery, then restore 15% and verify resolved delivery.\nNever fill the disk. The test has not yet been run. For file-provisioned rules,\nchange the reviewed provisioning threshold and reload/restart Grafana; retain\nfinal 15% configuration. Notification setup is still pending.\n"
}
}
]
}
+425
View File
@@ -0,0 +1,425 @@
{
"id": null,
"uid": "myfileagent-sre",
"title": "MyFileAgent - SRE Monitoring",
"tags": [
"SSW590",
"Assignment 7",
"SRE"
],
"timezone": "America/New_York",
"schemaVersion": 39,
"version": 1,
"refresh": "30s",
"time": {
"from": "now-1h",
"to": "now"
},
"editable": true,
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"panels": [
{
"id": 1,
"title": "Whole-droplet CPU utilization",
"description": "CPU busy percentage averaged across all host CPUs. Whole-host load cannot attribute consumption to Jenkins or a single container.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 0,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 75
},
{
"color": "red",
"value": 90
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 100
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "100 * (1 - avg by (instance) (rate(node_cpu_seconds_total{job=\"node\",instance=\"node-exporter:9100\",mode=\"idle\"}[2m])))",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 2,
"title": "Available host memory",
"description": "Host memory available to applications, including reclaimable memory; not merely free RAM.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 0,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "bytes",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "node_memory_MemAvailable_bytes{job=\"node\",instance=\"node-exporter:9100\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 3,
"title": "Root filesystem available space",
"description": "Available space on the verified host root filesystem: /dev/vda1, ext4, mountpoint /. Excludes other mounts and pseudo filesystems.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 9,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "yellow",
"value": 15
},
{
"color": "green",
"value": 25
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 100
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "100 * node_filesystem_avail_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"} / node_filesystem_size_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 4,
"title": "Gitea HTTPS availability",
"description": "1 means the HTTPS login-page probe succeeded with TLS validation; 0 means failure. Does not establish authenticated Git operation.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 9,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "stepAfter",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 1,
"decimals": 0
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_success{job=\"https\",instance=\"https://myfileagent.tech/user/login\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 5,
"title": "Jenkins HTTPS availability",
"description": "1 means the HTTPS login-page probe succeeded; a successful response does not establish a successful pipeline.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 18,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "stepAfter",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 1,
"decimals": 0
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_success{job=\"https\",instance=\"https://ci.myfileagent.tech/login\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 6,
"title": "HTTPS probe duration",
"description": "End-to-end probe duration for both login URLs from this Droplet. Does not establish reachability from every user network.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 18,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_duration_seconds{job=\"https\",instance=~\"https://(myfileagent.tech/user/login|ci.myfileagent.tech/login)\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
}
]
}
@@ -0,0 +1 @@
{"apiVersion":1}
@@ -0,0 +1,180 @@
{
"apiVersion": 1,
"groups": [
{
"orgId": 1,
"name": "team-sre",
"folder": "SSW590",
"interval": "30s",
"rules": [
{
"uid": "sre-service-unavailable",
"title": "HTTPS service unavailable",
"condition": "B",
"data": [
{
"refId": "A",
"datasourceUid": "prometheus",
"relativeTimeRange": {
"from": 600,
"to": 0
},
"model": {
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "min by (instance) (probe_success{job=\"https\"} or on(instance) label_replace(vector(0), \"instance\", \"https://myfileagent.tech/user/login\", \"\", \"\") or on(instance) label_replace(vector(0), \"instance\", \"https://ci.myfileagent.tech/login\", \"\", \"\"))",
"instant": true,
"range": false,
"refId": "A",
"intervalMs": 1000,
"maxDataPoints": 43200
}
},
{
"refId": "B",
"datasourceUid": "__expr__",
"relativeTimeRange": {
"from": 0,
"to": 0
},
"model": {
"refId": "B",
"type": "threshold",
"expression": "A",
"datasource": {
"type": "__expr__",
"uid": "__expr__"
},
"conditions": [
{
"evaluator": {
"params": [
1
],
"type": "lt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"B"
]
},
"reducer": {
"params": [],
"type": "last"
},
"type": "query"
}
]
}
}
],
"noDataState": "Alerting",
"execErrState": "Alerting",
"for": "1m",
"isPaused": false,
"labels": {
"owner": "SSW590-Group7",
"team": "group7",
"severity": "critical",
"scope": "assignment7"
},
"annotations": {
"summary": "HTTPS probe failed or the expected service probe series is missing for at least one minute.",
"description": "Follow the linked runbook. Alerts route to the team Discord contact point; inspect probe/collection health and record acknowledgement and recovery times.",
"runbook_url": "https://metrics.myfileagent.tech/d/myfileagent-sre-runbooks?viewPanel=panel-1"
},
"dashboardUid": "myfileagent-sre"
},
{
"uid": "sre-root-capacity",
"title": "Host root available space below 15 percent",
"condition": "B",
"data": [
{
"refId": "A",
"datasourceUid": "prometheus",
"relativeTimeRange": {
"from": 600,
"to": 0
},
"model": {
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "100 * node_filesystem_avail_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"} / node_filesystem_size_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"}",
"instant": true,
"range": false,
"refId": "A",
"intervalMs": 1000,
"maxDataPoints": 43200
}
},
{
"refId": "B",
"datasourceUid": "__expr__",
"relativeTimeRange": {
"from": 0,
"to": 0
},
"model": {
"refId": "B",
"type": "threshold",
"expression": "A",
"datasource": {
"type": "__expr__",
"uid": "__expr__"
},
"conditions": [
{
"evaluator": {
"params": [
15
],
"type": "lt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"B"
]
},
"reducer": {
"params": [],
"type": "last"
},
"type": "query"
}
]
}
}
],
"noDataState": "Alerting",
"execErrState": "Alerting",
"for": "5m",
"isPaused": false,
"labels": {
"owner": "SSW590-Group7",
"team": "group7",
"severity": "warning",
"scope": "assignment7"
},
"annotations": {
"summary": "Available space on the verified host root filesystem is below 15 percent for five minutes.",
"description": "Follow the linked runbook. Alerts route to the team Discord contact point; inspect probe/collection health and record acknowledgement and recovery times.",
"runbook_url": "https://metrics.myfileagent.tech/d/myfileagent-sre-runbooks?viewPanel=panel-2"
},
"dashboardUid": "myfileagent-sre",
"panelId": 3
}
]
}
]
}
@@ -0,0 +1,45 @@
{
"id": null,
"uid": "myfileagent-sre-runbooks",
"title": "MyFileAgent - Alert Runbooks",
"tags": [
"SSW590",
"runbooks"
],
"timezone": "America/New_York",
"schemaVersion": 39,
"version": 1,
"editable": false,
"panels": [
{
"id": 1,
"title": "Service unavailable",
"type": "text",
"gridPos": {
"x": 0,
"y": 0,
"w": 24,
"h": 18
},
"options": {
"mode": "markdown",
"content": "# HTTPS service unavailable\nOwner: SSW590 Group 7. Severity: critical. Evaluate every 30s; pending 1 minute.\n\nThe rule produces separate instances for Gitea and Jenkins by URL label.\nMissing expected probe series are explicitly treated as failure; datasource\nno-data and evaluation errors enter Alerting rather than reporting health.\n\n1. Acknowledge the alert and record receipt/acknowledgement time.\n2. Inspect the instance URL and the availability/duration panels. Check collection\nhealth and exporter logs to distinguish probe failure from broken monitoring.\n3. Check DNS, valid TLS, expected response and redirects from the monitoring network.\nNever disable certificate verification to clear an alert.\n4. Inspect the affected container status/logs, Caddy routing, resource pressure,\nand recent changes. Confirm the actual cause before restarting anything.\n5. For the planned Jenkins-only exercise, restore using:\n`cd /home/codex/myfileagent-gitea && docker compose -f compose.yaml -f compose.jenkins.yaml start jenkins`\nVerify the live Compose service remains named jenkins before running it.\nDo not stop the Droplet, Gitea or monitoring; never delete service volumes.\n6. Verify HTTPS probe success, a normal Jenkins pipeline, webhook/status and\nGitea manual build as applicable. Record first success and resolved notification.\n7. Escalate unresolved faults to the other team member; capture impact/timeline\nand corrective actions. A complete Droplet failure can also stop these alerts.\n\nNotification destination and delivery timings are pending SMTP/contact-point\nsetup. Scrape (30s), evaluation (30s), pending (1m) and notification delays add\nlatency; do not expect an immediate message. No outage test has been run.\n"
}
},
{
"id": 2,
"title": "Root capacity",
"type": "text",
"gridPos": {
"x": 0,
"y": 18,
"w": 24,
"h": 18
},
"options": {
"mode": "markdown",
"content": "# Root capacity below 15 percent\nOwner: SSW590 Group 7. Severity: warning. Evaluate every 30s; pending 5 minutes.\n\nSelector: instance node-exporter:9100; mountpoint /; device /dev/vda1; ext4.\nQuery is 100 * available bytes / size bytes for that same filesystem.\nThe 15% threshold leaves operational room for builds, compaction and logs.\nNo-data or evaluation errors enter Alerting and require monitoring diagnosis.\n\n1. Acknowledge and record times. Compare exporter values to `df -B1 /`.\n2. Inspect directory usage, Docker images/volumes and logs read-only first.\nIdentify growth and protect Gitea/Jenkins/Grafana/Prometheus persistent data.\n3. Agree with the team on safe cleanup or retention changes; avoid global\nDocker pruning and do not delete repositories, service volumes or evidence.\n4. Restore adequate headroom, verify the metric and wait for rule resolution.\n5. Record cause, corrective action, delivered notification and recovery time.\n\nSafe planned test: temporarily raise the free-percentage threshold above the\nmeasured current value, wait through the full five-minute pending period and\ncapture real firing/delivery, then restore 15% and verify resolved delivery.\nNever fill the disk. The test has not yet been run. For file-provisioned rules,\nchange the reviewed provisioning threshold and reload/restart Grafana; retain\nfinal 15% configuration. Notification setup is still pending.\n"
}
}
]
}
@@ -0,0 +1,425 @@
{
"id": null,
"uid": "myfileagent-sre",
"title": "MyFileAgent - SRE Monitoring",
"tags": [
"SSW590",
"Assignment 7",
"SRE"
],
"timezone": "America/New_York",
"schemaVersion": 39,
"version": 1,
"refresh": "30s",
"time": {
"from": "now-1h",
"to": "now"
},
"editable": true,
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"panels": [
{
"id": 1,
"title": "Whole-droplet CPU utilization",
"description": "CPU busy percentage averaged across all host CPUs. Whole-host load cannot attribute consumption to Jenkins or a single container.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 0,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 75
},
{
"color": "red",
"value": 90
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 100
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "100 * (1 - avg by (instance) (rate(node_cpu_seconds_total{job=\"node\",instance=\"node-exporter:9100\",mode=\"idle\"}[2m])))",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 2,
"title": "Available host memory",
"description": "Host memory available to applications, including reclaimable memory; not merely free RAM.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 0,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "bytes",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "node_memory_MemAvailable_bytes{job=\"node\",instance=\"node-exporter:9100\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 3,
"title": "Root filesystem available space",
"description": "Available space on the verified host root filesystem: /dev/vda1, ext4, mountpoint /. Excludes other mounts and pseudo filesystems.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 9,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "yellow",
"value": 15
},
{
"color": "green",
"value": 25
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 100
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "100 * node_filesystem_avail_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"} / node_filesystem_size_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 4,
"title": "Gitea HTTPS availability",
"description": "1 means the HTTPS login-page probe succeeded with TLS validation; 0 means failure. Does not establish authenticated Git operation.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 9,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "stepAfter",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 1,
"decimals": 0
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_success{job=\"https\",instance=\"https://myfileagent.tech/user/login\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 5,
"title": "Jenkins HTTPS availability",
"description": "1 means the HTTPS login-page probe succeeded; a successful response does not establish a successful pipeline.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 18,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "stepAfter",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 1,
"decimals": 0
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_success{job=\"https\",instance=\"https://ci.myfileagent.tech/login\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 6,
"title": "HTTPS probe duration",
"description": "End-to-end probe duration for both login URLs from this Droplet. Does not establish reachability from every user network.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 18,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_duration_seconds{job=\"https\",instance=~\"https://(myfileagent.tech/user/login|ci.myfileagent.tech/login)\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
}
]
}
@@ -0,0 +1,11 @@
apiVersion: 1
providers:
- name: team-sre
orgId: 1
folder: SSW590
type: file
disableDeletion: true
allowUiUpdates: false
updateIntervalSeconds: 30
options:
path: /etc/grafana/provisioning/dashboards/json
@@ -0,0 +1,11 @@
apiVersion: 1
datasources:
- name: Prometheus
uid: prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
editable: false
jsonData:
timeInterval: 30s
@@ -0,0 +1,48 @@
# Blameless review: controlled Jenkins outage
Status: evidence-based draft for team verification, prepared October 28, 2026. Operational source remains on the Droplet working branch; not yet committed, pushed or peer approved. This is a review of an approved exercise, not an unplanned production incident.
## Impact and cause
On October 24 only the existing Jenkins service was deliberately stopped to validate HTTPS monitoring, the one-minute unavailable rule, Discord delivery and recovery. Builds were checked idle before injection. The team approved the exercise and the agent executed the known stop/start commands. The cause was intentional fault injection; no individual error or underlying application defect is established. Gitea remained healthy in recorded HTTP checks and all 20 probes of the selected window. No volumes were removed.
## Timeline
All times below are October 24, 2026, America/New_York (EDT, UTC-04:00), except the explicitly dated later checks.
| Event | Time | Evidence/qualification |
|---|---|---|
| Stop requested | 17:26:45.883 | Automation event |
| Jenkins stopped | 17:26:51.997 | Stop command completed |
| First failed probe sample | 17:27:11.023 | Actual Prometheus sample timestamp |
| Failure first observed by polling | 17:27:12.740 | Observer timestamp |
| Rule firing transition | 17:28:20 | Grafana instance UI |
| Firing first observed by polling | 17:28:34.086 | Observer timestamp |
| Discord firing delivery | displayed 17:28 | User screenshot; no exact second |
| Team acknowledgment | confirmed in chat | Exact clock time not supplied |
| Restart requested | 17:29:55.087 | Automatic recovery |
| Start command finished | 17:29:57.750 | Exit 0; not readiness |
| HTTPS ready observed | 17:30:48.613 | HTTP 200 |
| First successful probe after failure | 17:31:11.023 | Actual sample timestamp |
| Rule returned Normal | 17:31:20 | Grafana instance UI |
| Discord resolved delivery | confirmed | Screenshot lacks visible delivery time |
## Detection and restoration
Stop-to-first-failed-sample: 19.026 seconds. Stop-to-rule-firing transition: 88.003 seconds. First failed sample to firing transition: 68.977 seconds. The 30-second scrape, 30-second evaluation interval and one-minute pending period explain quantization; polling first observed firing another 14.086 seconds later. Discord grouping adds configured delivery delay (10-second group wait, one-minute group interval), but exact delivery latency and acknowledgment latency cannot be calculated from the screenshots.
Stopped-to-restart-requested: 183.090 seconds. Restart-requested-to-observed-HTTPS-ready: 53.526 seconds. Stopped-to-observed-HTTPS-ready: 236.617 seconds (about 3 minutes 57 seconds). The injection was approximately three minutes; startup extended service unavailability. Failed-to-successful sampled transition spans 240 seconds; that is a sampled interval, not an exact downtime duration.
## SLI result and limits
Fixed window: October 24 17:23:00-17:33:00 EDT; evaluation epoch 1792877580. At 30-second intervals, both services returned the expected 20 samples. Jenkins had 12 successes and 8 failures: 60% sampled availability. Gitea had 20 successes: 100%. Both ended with probe_success=1. No missing samples were observed in this window. This short exercise does not establish a full-day 99% SLO result, an SLA, or availability from every client network. Missing collection in other windows is unknown, not success.
## Response and recovery verification
The automatic recovery path started only Jenkins and preserved volumes. Discord firing and resolved delivery are confirmed by team screenshots. Normal rule thresholds remain unchanged. Build #5 on October 25 passed syntax validation and two unit tests in 36.837 seconds on revision 131d605c5edb5b5080e4d54861c3c7bf7c360c9c; its log records Gitea SUCCESS notification. This was following-day validation after fresh sign-in, not an immediate recovery build. No manual/PDF build was rerun because the team explicitly deferred compilation. Earlier failed/repaired PR 11 demonstrates pipeline test failure, which differs from service unavailability: https://myfileagent.tech/myfileagent/myfileagent-pipeline/pulls/11 . Build #5: https://ci.myfileagent.tech/job/myfileagent-python-ci/job/main/5/ .
## What worked and measurement gaps
The isolated exercise, prechecked idle queue, explicit recovery command, automatic restart, per-service alert instances and team-controlled Discord routing worked. Polling timestamps and actual sample timestamps are retained separately. Delivery/acknowledgment timing and prompt post-recovery build validation need improvement. Manual build verification remains deferred by team instruction. Incident graph annotations have not yet been added; the fixed-window raw probe samples are preserved and must support any later figure. No claims of completed peer review or publication are made.
October 28 separate Prometheus/Grafana restarts retained historical readings, both resource-backed dashboards, data source, two alert rules and 18 annotations. One approximately 60-second interval between Jenkins probe samples was recorded (one missed scheduled sample). Grafana restart pauses evaluation and notifications. Persistence is not backup/restore proof.
## Shared failure domain and prioritized follow-up
All monitoring shares the Droplet with its monitored services. Total host/network failure can prevent local detection and notification. P1: independent external HTTPS checks. P2: complete incident timestamps and prompt recovery-build validation. Owner for both: Gowri Das Lovely (@glovely); Gitea issues created October 28: [P1 issue 12](https://myfileagent.tech/myfileagent/myfileagent-pipeline/issues/12), [P2 issue 13](https://myfileagent.tech/myfileagent/myfileagent-pipeline/issues/13). Both assigned to glovely; author shown as jenkins-ci from the user-signed-in session. These issues authorize tracking, not a new outage, paid purchase or deployment.
## Evidence
Droplet evidence directory: /home/codex/myfileagent-gitea/evidence/assignment7 . Primary records: jenkins-incident-timeline.json, jenkins-incident-probe-samples.json, jenkins-incident-sli-fixed-window.json, jenkins-recovery-build5.json, monitoring-restart-persistence.json and monitoring-restart-state-verification.json. Team screenshots: jenkins-discord-firing-team.png and jenkins-discord-resolved-team.png under screenshots/. These files have not yet been published as reviewed Git artifacts; final report integration must use verified source links.
+28
View File
@@ -0,0 +1,28 @@
global:
scrape_interval: 30s
scrape_timeout: 15s
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://myfileagent.tech/user/login
- https://ci.myfileagent.tech/login
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
+22
View File
@@ -0,0 +1,22 @@
# Root capacity below 15 percent
Owner: SSW590 Group 7. Severity: warning. Evaluate every 30s; pending 5 minutes.
Selector: instance node-exporter:9100; mountpoint /; device /dev/vda1; ext4.
Query is 100 * available bytes / size bytes for that same filesystem.
The 15% threshold leaves operational room for builds, compaction and logs.
No-data or evaluation errors enter Alerting and require monitoring diagnosis.
1. Acknowledge and record times. Compare exporter values to `df -B1 /`.
2. Inspect directory usage, Docker images/volumes and logs read-only first.
Identify growth and protect Gitea/Jenkins/Grafana/Prometheus persistent data.
3. Agree with the team on safe cleanup or retention changes; avoid global
Docker pruning and do not delete repositories, service volumes or evidence.
4. Restore adequate headroom, verify the metric and wait for rule resolution.
5. Record cause, corrective action, delivered notification and recovery time.
Safe planned test: temporarily raise the free-percentage threshold above the
measured current value, wait through the full five-minute pending period and
capture real firing/delivery, then restore 15% and verify resolved delivery.
Never fill the disk. The October 24 threshold-only test delivered firing and resolved notifications. For file-provisioned rules,
change the reviewed provisioning threshold and reload/restart Grafana; retain
final 15% configuration. Discord team-alerts is active with resolved notifications enabled.
@@ -0,0 +1,25 @@
# HTTPS service unavailable
Owner: SSW590 Group 7. Severity: critical. Evaluate every 30s; pending 1 minute.
The rule produces separate instances for Gitea and Jenkins by URL label.
Missing expected probe series are explicitly treated as failure; datasource
no-data and evaluation errors enter Alerting rather than reporting health.
1. Acknowledge the alert and record receipt/acknowledgement time.
2. Inspect the instance URL and the availability/duration panels. Check collection
health and exporter logs to distinguish probe failure from broken monitoring.
3. Check DNS, valid TLS, expected response and redirects from the monitoring network.
Never disable certificate verification to clear an alert.
4. Inspect the affected container status/logs, Caddy routing, resource pressure,
and recent changes. Confirm the actual cause before restarting anything.
5. For the planned Jenkins-only exercise, restore using:
`cd /home/codex/myfileagent-gitea && docker compose -f compose.yaml -f compose.jenkins.yaml start jenkins`
Verify the live Compose service remains named jenkins before running it.
Do not stop the Droplet, Gitea or monitoring; never delete service volumes.
6. Verify HTTPS probe success, a normal Jenkins pipeline, webhook/status and
Gitea manual build as applicable. Record first success and resolved notification.
7. Escalate unresolved faults to the other team member; capture impact/timeline
and corrective actions. A complete Droplet failure can also stop these alerts.
Discord team-alerts is the active route; resolved notifications are enabled.
Scrape 30s, evaluation 30s, pending 1m, group wait 10s, group interval 1m and repeat 4h contribute delay. The approved October 24 exercise delivered firing and resolved notifications; see ../incidents/2026-10-24-jenkins-outage.md. Do not repeat an outage without team approval.
+62
View File
@@ -0,0 +1,62 @@
# SLI, SLO and error budget - Assignment 7
Status: baseline and controlled-outage short-window measurements completed.
No full-day SLO evaluation is claimed.
This file is an operational working note, not an edit to the team manual/PDF.
## Definitions and scope
SLI: fraction of received scheduled HTTPS login probes that succeed, reported
separately for Gitea and Jenkins, alongside expected/received sample coverage.
SLO: internal lab target of at least 99% successful scheduled probes over a
24-hour window for each service. No customer SLA is established by this lab.
SLA: a customer service agreement that may specify consequences for a miss.
A successful login probe does not establish Git operations or passing builds.
A same-Droplet probe does not prove external user reachability. A total host
outage may stop both collection and notification; missing data is unknown.
## Required hypothetical worked example (not measured results)
At a 30-second interval, 24 hours contains 2,880 scheduled probes per service.
Assume every scheduled observation is present.
- Gitea: 2,880 successes / 2,880 = 100%; meets the 99% target.
- Jenkins: 2,850 successes / 2,880 = 98.958333...%; misses the 99% target.
- The 1% theoretical budget is 28.8 failed samples, equivalent to 14.4 minutes
under uniform sampling. At most 28 whole failures meet this target.
- 30 failed samples exceed 28.8 by 1.2 samples, about 0.6 minutes.
These minute equivalents assume uniform sampling; they are not exact measured
outage durations and must not be presented as actual lab results.
## Measurement queries
See queries.json. The job filter is https and the instance label preserves
the exact Gitea/Jenkins URL. Each series is evaluated separately.
availability_percent: 100 * avg_over_time(probe_success{job="https"}[10m])
received_samples: count_over_time(probe_success{job="https"}[10m])
observed_failed_samples: count_over_time(...) - sum_over_time(...)
collection_health: up{job=~"https|blackbox|prometheus"}
A 10-minute interval has approximately 20 scheduled samples at 30 seconds.
Range boundaries, jitter and restarts can change received counts. avg_over_time
uses only received observations; an absent observation is not success.
The difference in the failure-count query is valid because probe_success is
binary. Count sample failures separately from exporter/collection failures.
Prometheus query evaluation time must be fixed and recorded for reproduction.
## Baseline check
The exact fixed query time, start/end, results and scrape-health observations
are saved in evidence/assignment7/sli-slo-baseline-query-check.json under
/home/codex/myfileagent-gitea. This checks queries against live data only.
It does not satisfy the controlled-outage evidence requirement or establish
that the 24-hour SLO was met. Do not extrapolate a short window into a day.
If missing samples are present, report coverage and the uncertainty explicitly;
a received-sample average alone cannot classify a complete-window SLO result.
## Later approved outage measurement
After alerts and their notification route work, agree on a maintenance window.
Record exact injection/recovery events, then select a short window spanning
before, during and after the controlled Jenkins outage. Use one timezone
(America/New_York) and record query evaluation time in UTC as well.
Evaluate both services at that exact time using the same 10-minute window.
Report successes/failures, received vs approximately expected samples, coverage,
collection health and known gaps. Save raw results and annotate the incident.
Keep the hypothetical example separate from measured findings.
Full-day collection and meeting the SLO are optional in manual version 1.42.
The October 24 incident is documented in ../incidents/2026-10-24-jenkins-outage.md.
Fixed window 17:23-17:33 EDT: both services 20/20 expected observations; Jenkins 12 successes/8 failures (60%), Gitea 20 successes/0 failures (100%). See ../evidence/jenkins-incident-sli-fixed-window.json.
+10
View File
@@ -0,0 +1,10 @@
{
"window_seconds": 600,
"scrape_interval_seconds": 30,
"queries": {
"availability_percent": "100 * avg_over_time(probe_success{job=\"https\"}[10m])",
"received_samples": "count_over_time(probe_success{job=\"https\"}[10m])",
"observed_failed_samples": "count_over_time(probe_success{job=\"https\"}[10m]) - sum_over_time(probe_success{job=\"https\"}[10m])",
"collection_health": "up{job=~\"https|blackbox|prometheus\"}"
}
}