Add monitoring replacement baseline

This commit is contained in:
2026-05-17 11:22:38 +02:00
parent 0c308ff352
commit c95fa601f0
10 changed files with 490 additions and 5 deletions
@@ -0,0 +1,145 @@
{
"uid": "homelab-availability",
"title": "Homelab / Availability",
"tags": ["homelab", "blackbox", "uptime"],
"timezone": "browser",
"schemaVersion": 39,
"version": 1,
"refresh": "30s",
"time": {
"from": "now-6h",
"to": "now"
},
"templating": {
"list": [
{
"name": "target",
"label": "Target",
"type": "query",
"datasource": "Prometheus",
"query": "label_values(probe_success{job=\"blackbox-http\"}, instance)",
"refresh": 1,
"includeAll": true,
"multi": true,
"allValue": ".+",
"current": {
"selected": true,
"text": "All",
"value": "$__all"
}
}
]
},
"panels": [
{
"id": 1,
"type": "stat",
"title": "Endpoints up",
"datasource": "Prometheus",
"gridPos": {"h": 5, "w": 6, "x": 0, "y": 0},
"targets": [
{
"refId": "A",
"expr": "sum(probe_success{job=\"blackbox-http\", instance=~\"${target:regex}\"})"
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{"color": "red", "value": null},
{"color": "green", "value": 1}
]
}
},
"overrides": []
},
"options": {"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}}
},
{
"id": 2,
"type": "stat",
"title": "Endpoints down",
"datasource": "Prometheus",
"gridPos": {"h": 5, "w": 6, "x": 6, "y": 0},
"targets": [
{
"refId": "A",
"expr": "count(probe_success{job=\"blackbox-http\", instance=~\"${target:regex}\"}) - sum(probe_success{job=\"blackbox-http\", instance=~\"${target:regex}\"})"
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{"color": "green", "value": null},
{"color": "red", "value": 1}
]
}
},
"overrides": []
},
"options": {"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}}
},
{
"id": 3,
"type": "timeseries",
"title": "Probe duration",
"datasource": "Prometheus",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
"targets": [
{
"refId": "A",
"expr": "probe_duration_seconds{job=\"blackbox-http\", instance=~\"${target:regex}\"}",
"legendFormat": "{{instance}}"
}
],
"fieldConfig": {"defaults": {"unit": "s"}, "overrides": []},
"options": {"legend": {"displayMode": "list", "placement": "bottom"}}
},
{
"id": 4,
"type": "timeseries",
"title": "Availability",
"datasource": "Prometheus",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 5},
"targets": [
{
"refId": "A",
"expr": "probe_success{job=\"blackbox-http\", instance=~\"${target:regex}\"}",
"legendFormat": "{{instance}}"
}
],
"fieldConfig": {"defaults": {"unit": "bool"}, "overrides": []},
"options": {"legend": {"displayMode": "list", "placement": "bottom"}}
},
{
"id": 5,
"type": "table",
"title": "HTTP status",
"datasource": "Prometheus",
"gridPos": {"h": 9, "w": 24, "x": 0, "y": 13},
"targets": [
{
"refId": "A",
"expr": "probe_http_status_code{job=\"blackbox-http\", instance=~\"${target:regex}\"}",
"format": "table",
"instant": true
}
],
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {"Time": true, "__name__": true, "job": true},
"renameByName": {"Value": "status_code", "instance": "target"}
}
}
]
}
]
}
@@ -0,0 +1,109 @@
{
"uid": "homelab-containers-logs",
"title": "Homelab / Containers + Logs",
"tags": ["homelab", "cadvisor", "loki", "dozzle-replacement"],
"timezone": "browser",
"schemaVersion": 39,
"version": 1,
"refresh": "30s",
"time": {
"from": "now-1h",
"to": "now"
},
"templating": {
"list": [
{
"name": "service",
"label": "Service",
"type": "query",
"datasource": "Loki",
"query": "label_values(compose_service)",
"refresh": 1,
"includeAll": true,
"multi": true,
"allValue": ".+",
"current": {
"selected": true,
"text": "All",
"value": "$__all"
}
},
{
"name": "search",
"label": "Regex Match",
"type": "textbox",
"query": ".+",
"current": {
"selected": true,
"text": ".+",
"value": ".+"
}
}
]
},
"panels": [
{
"id": 1,
"type": "timeseries",
"title": "Container CPU",
"datasource": "Prometheus",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
"targets": [
{
"refId": "A",
"expr": "sum by (name) (rate(container_cpu_usage_seconds_total{name!=\"\"}[5m]))",
"legendFormat": "{{name}}"
}
],
"fieldConfig": {"defaults": {"unit": "cores"}, "overrides": []}
},
{
"id": 2,
"type": "timeseries",
"title": "Container memory",
"datasource": "Prometheus",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
"targets": [
{
"refId": "A",
"expr": "sum by (name) (container_memory_working_set_bytes{name!=\"\"})",
"legendFormat": "{{name}}"
}
],
"fieldConfig": {"defaults": {"unit": "bytes"}, "overrides": []}
},
{
"id": 3,
"type": "timeseries",
"title": "Log error rate",
"datasource": "Loki",
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 8},
"targets": [
{
"refId": "A",
"expr": "sum by (compose_service) (count_over_time({compose_service=~\"${service:regex}\", container=~\".+\"} |~ \"(?i)error|exception|panic|fatal|traceback|oom|killed\" [$__interval]))",
"legendFormat": "{{compose_service}}"
}
]
},
{
"id": 4,
"type": "logs",
"title": "Live logs",
"datasource": "Loki",
"gridPos": {"h": 14, "w": 24, "x": 0, "y": 16},
"targets": [
{
"refId": "A",
"expr": "{compose_service=~\"${service:regex}\", container=~\".+\"} |~ \"$search\""
}
],
"options": {
"showLabels": false,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": false
}
}
]
}
@@ -0,0 +1,102 @@
{
"uid": "homelab-host-overview",
"title": "Homelab / Host Overview",
"tags": ["homelab", "node-exporter", "glances-replacement"],
"timezone": "browser",
"schemaVersion": 39,
"version": 1,
"refresh": "30s",
"time": {
"from": "now-6h",
"to": "now"
},
"panels": [
{
"id": 1,
"type": "timeseries",
"title": "CPU usage",
"datasource": "Prometheus",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
"targets": [
{
"refId": "A",
"expr": "100 - (avg(rate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)",
"legendFormat": "CPU"
}
],
"fieldConfig": {"defaults": {"unit": "percent", "min": 0, "max": 100}, "overrides": []}
},
{
"id": 2,
"type": "timeseries",
"title": "Memory usage",
"datasource": "Prometheus",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
"targets": [
{
"refId": "A",
"expr": "100 * (1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes))",
"legendFormat": "Memory"
}
],
"fieldConfig": {"defaults": {"unit": "percent", "min": 0, "max": 100}, "overrides": []}
},
{
"id": 3,
"type": "timeseries",
"title": "Filesystem usage",
"datasource": "Prometheus",
"gridPos": {"h": 9, "w": 12, "x": 0, "y": 8},
"targets": [
{
"refId": "A",
"expr": "100 * (1 - node_filesystem_avail_bytes{fstype!~\"tmpfs|overlay\"} / node_filesystem_size_bytes{fstype!~\"tmpfs|overlay\"})",
"legendFormat": "{{mountpoint}}"
}
],
"fieldConfig": {"defaults": {"unit": "percent", "min": 0, "max": 100}, "overrides": []},
"options": {"legend": {"displayMode": "list", "placement": "bottom"}}
},
{
"id": 4,
"type": "timeseries",
"title": "Network throughput",
"datasource": "Prometheus",
"gridPos": {"h": 9, "w": 12, "x": 12, "y": 8},
"targets": [
{
"refId": "A",
"expr": "rate(node_network_receive_bytes_total{device!~\"lo|veth.*|br-.*|docker.*\"}[5m])",
"legendFormat": "{{device}} RX"
},
{
"refId": "B",
"expr": "rate(node_network_transmit_bytes_total{device!~\"lo|veth.*|br-.*|docker.*\"}[5m])",
"legendFormat": "{{device}} TX"
}
],
"fieldConfig": {"defaults": {"unit": "Bps"}, "overrides": []},
"options": {"legend": {"displayMode": "list", "placement": "bottom"}}
},
{
"id": 5,
"type": "timeseries",
"title": "Disk IO",
"datasource": "Prometheus",
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 17},
"targets": [
{
"refId": "A",
"expr": "rate(node_disk_read_bytes_total[5m])",
"legendFormat": "{{device}} read"
},
{
"refId": "B",
"expr": "rate(node_disk_written_bytes_total[5m])",
"legendFormat": "{{device}} write"
}
],
"fieldConfig": {"defaults": {"unit": "Bps"}, "overrides": []}
}
]
}