Add Assignment 7 monitoring, tested alerts, and incident evidence
This commit is contained in:
parent
131d605c5e
commit
6605394d7a
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user