seat-back-trivia/pipeline/head This commit looks good
Four pinned containers on a private network with memory caps for the 512 MB droplet; provisioned data source, six-panel dashboard, HTTPS-availability and root-disk alert rules, and the team-alerts Discord contact point. The Discord webhook comes from the untracked grafana.secrets.env. Bring deploy/Caddyfile in line with the droplet (ci route) and add metrics.pollefeys.dev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
605 lines
15 KiB
JSON
605 lines
15 KiB
JSON
{
|
|
"uid": "seatback-sre",
|
|
"title": "Seat-Back Trivia SRE",
|
|
"tags": [
|
|
"sre",
|
|
"assignment-7"
|
|
],
|
|
"timezone": "utc",
|
|
"editable": false,
|
|
"graphTooltip": 1,
|
|
"refresh": "30s",
|
|
"time": {
|
|
"from": "now-6h",
|
|
"to": "now"
|
|
},
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"description": "ssw-590 droplet health and Gitea/Jenkins HTTPS availability. Source: deploy/monitoring in SeatBackTrivia/seat-back-trivia.",
|
|
"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,
|
|
"type": "timeseries",
|
|
"title": "Droplet CPU utilization",
|
|
"description": "Whole-droplet CPU busy %, averaged across all CPUs: 100 minus the idle rate over 2 minutes (four 30 s samples). node_cpu_seconds_total is a counter, so it is rated, never graphed raw. Includes every process on the host, not only Jenkins.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 0,
|
|
"w": 8,
|
|
"h": 8
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"lineWidth": 2,
|
|
"fillOpacity": 10,
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"lineInterpolation": "linear",
|
|
"thresholdsStyle": {
|
|
"mode": "line+area"
|
|
}
|
|
},
|
|
"unit": "percent",
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "orange",
|
|
"value": 80
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 95
|
|
}
|
|
]
|
|
},
|
|
"min": 0,
|
|
"max": 100
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"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,
|
|
"instant": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "timeseries",
|
|
"title": "Available host memory",
|
|
"description": "MemAvailable in bytes (IEC units): the kernel's estimate of memory that can be given to applications without swapping, not merely unused RAM. Whole droplet; swap is not included.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 8,
|
|
"y": 0,
|
|
"w": 8,
|
|
"h": 8
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"lineWidth": 2,
|
|
"fillOpacity": 10,
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"lineInterpolation": "linear",
|
|
"thresholdsStyle": {
|
|
"mode": "line+area"
|
|
}
|
|
},
|
|
"unit": "bytes",
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "red",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "orange",
|
|
"value": 67108864
|
|
},
|
|
{
|
|
"color": "green",
|
|
"value": 134217728
|
|
}
|
|
]
|
|
},
|
|
"min": 0
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "node_memory_MemAvailable_bytes{job=\"node\"}",
|
|
"legendFormat": "Available",
|
|
"range": true,
|
|
"instant": false
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "node_memory_MemTotal_bytes{job=\"node\"}",
|
|
"legendFormat": "Total RAM",
|
|
"range": true,
|
|
"instant": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"type": "timeseries",
|
|
"title": "Root filesystem free space",
|
|
"description": "Available bytes divided by size bytes for the host root filesystem (mountpoint /, ext4, /dev/vda1 seen through the /host mount), as a percent. The 15% line is the capacity alert threshold.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 16,
|
|
"y": 0,
|
|
"w": 8,
|
|
"h": 8
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"lineWidth": 2,
|
|
"fillOpacity": 10,
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"lineInterpolation": "linear",
|
|
"thresholdsStyle": {
|
|
"mode": "line+area"
|
|
}
|
|
},
|
|
"unit": "percent",
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "red",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "orange",
|
|
"value": 15
|
|
},
|
|
{
|
|
"color": "green",
|
|
"value": 25
|
|
}
|
|
]
|
|
},
|
|
"min": 0,
|
|
"max": 100
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "100 * node_filesystem_avail_bytes{job=\"node\",mountpoint=\"/\",fstype=\"ext4\"} / node_filesystem_size_bytes{job=\"node\",mountpoint=\"/\",fstype=\"ext4\"}",
|
|
"legendFormat": "/ free %",
|
|
"range": true,
|
|
"instant": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 4,
|
|
"type": "timeseries",
|
|
"title": "Gitea HTTPS availability",
|
|
"description": "probe_success for https://git.pollefeys.dev/user/login: 1 when DNS, TLS, and an HTTP 200 login page all succeed within 10 s through Caddy, 0 otherwise. A gap means no probe result was collected (unknown, not up).",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 8,
|
|
"w": 8,
|
|
"h": 7
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"lineWidth": 2,
|
|
"fillOpacity": 10,
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"lineInterpolation": "stepAfter",
|
|
"thresholdsStyle": {
|
|
"mode": "off"
|
|
}
|
|
},
|
|
"unit": "none",
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"min": 0,
|
|
"max": 1,
|
|
"mappings": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"0": {
|
|
"text": "DOWN",
|
|
"color": "red"
|
|
},
|
|
"1": {
|
|
"text": "UP",
|
|
"color": "green"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "probe_success{job=\"https\",instance=\"https://git.pollefeys.dev/user/login\"}",
|
|
"legendFormat": "Gitea",
|
|
"range": true,
|
|
"instant": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 5,
|
|
"type": "timeseries",
|
|
"title": "Jenkins HTTPS availability",
|
|
"description": "probe_success for https://ci.pollefeys.dev/login: 1 when DNS, TLS, and an HTTP 200 login page all succeed within 10 s through Caddy, 0 otherwise. A gap means no probe result was collected (unknown, not up).",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 8,
|
|
"y": 8,
|
|
"w": 8,
|
|
"h": 7
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"lineWidth": 2,
|
|
"fillOpacity": 10,
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"lineInterpolation": "stepAfter",
|
|
"thresholdsStyle": {
|
|
"mode": "off"
|
|
}
|
|
},
|
|
"unit": "none",
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"min": 0,
|
|
"max": 1,
|
|
"mappings": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"0": {
|
|
"text": "DOWN",
|
|
"color": "red"
|
|
},
|
|
"1": {
|
|
"text": "UP",
|
|
"color": "green"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "probe_success{job=\"https\",instance=\"https://ci.pollefeys.dev/login\"}",
|
|
"legendFormat": "Jenkins",
|
|
"range": true,
|
|
"instant": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 6,
|
|
"type": "timeseries",
|
|
"title": "HTTPS probe duration",
|
|
"description": "probe_duration_seconds for each login URL: total time of the probe, including DNS, TCP, TLS, and the HTTP response, as measured from the droplet itself.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 16,
|
|
"y": 8,
|
|
"w": 8,
|
|
"h": 7
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"lineWidth": 2,
|
|
"fillOpacity": 10,
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"lineInterpolation": "linear",
|
|
"thresholdsStyle": {
|
|
"mode": "line+area"
|
|
}
|
|
},
|
|
"unit": "s",
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "orange",
|
|
"value": 2
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 10
|
|
}
|
|
]
|
|
},
|
|
"min": 0
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "probe_duration_seconds{job=\"https\"}",
|
|
"legendFormat": "{{instance}}",
|
|
"range": true,
|
|
"instant": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": 7,
|
|
"type": "stat",
|
|
"title": "Scrape health (up)",
|
|
"description": "Prometheus's own record of whether each scrape target answered: 1 = scraped, 0 = scrape failed. For the https job this says the probe ran, not that the site is up.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 15,
|
|
"w": 24,
|
|
"h": 4
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"0": {
|
|
"text": "DOWN",
|
|
"color": "red"
|
|
},
|
|
"1": {
|
|
"text": "UP",
|
|
"color": "green"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"unit": "none",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "red",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "green",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"textMode": "value_and_name",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"justifyMode": "auto",
|
|
"orientation": "auto"
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "up",
|
|
"legendFormat": "{{job}} {{instance}}",
|
|
"range": false,
|
|
"instant": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |