All checks were successful
Run nix flake check / flake-check (push) Successful in 2m3s
- Change default OIDC role from Viewer to Editor for Explore access - Add declarative dashboard provisioning - Add node-exporter dashboard (CPU, memory, disk, load, network, I/O) - Add Loki logs dashboard with host/job filters Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
209 lines
5.6 KiB
JSON
209 lines
5.6 KiB
JSON
{
|
|
"uid": "node-exporter-homelab",
|
|
"title": "Node Exporter - Homelab",
|
|
"tags": ["node-exporter", "prometheus", "homelab"],
|
|
"timezone": "browser",
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"refresh": "30s",
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"name": "instance",
|
|
"type": "query",
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"query": "label_values(node_uname_info, instance)",
|
|
"refresh": 2,
|
|
"includeAll": false,
|
|
"multi": false,
|
|
"current": {}
|
|
}
|
|
]
|
|
},
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"title": "CPU Usage",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [
|
|
{
|
|
"expr": "100 - (avg by(instance) (rate(node_cpu_seconds_total{mode=\"idle\", instance=~\"$instance\"}[5m])) * 100)",
|
|
"legendFormat": "CPU %",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percent",
|
|
"min": 0,
|
|
"max": 100,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{"color": "green", "value": null},
|
|
{"color": "yellow", "value": 70},
|
|
{"color": "red", "value": 90}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"title": "Memory Usage",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [
|
|
{
|
|
"expr": "(1 - (node_memory_MemAvailable_bytes{instance=~\"$instance\"} / node_memory_MemTotal_bytes{instance=~\"$instance\"})) * 100",
|
|
"legendFormat": "Memory %",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percent",
|
|
"min": 0,
|
|
"max": 100,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{"color": "green", "value": null},
|
|
{"color": "yellow", "value": 70},
|
|
{"color": "red", "value": 90}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 3,
|
|
"title": "Disk Usage",
|
|
"type": "gauge",
|
|
"gridPos": {"h": 8, "w": 8, "x": 0, "y": 8},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [
|
|
{
|
|
"expr": "100 - ((node_filesystem_avail_bytes{instance=~\"$instance\",mountpoint=\"/\",fstype!=\"rootfs\"} / node_filesystem_size_bytes{instance=~\"$instance\",mountpoint=\"/\",fstype!=\"rootfs\"}) * 100)",
|
|
"legendFormat": "Root /",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percent",
|
|
"min": 0,
|
|
"max": 100,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{"color": "green", "value": null},
|
|
{"color": "yellow", "value": 70},
|
|
{"color": "red", "value": 85}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 4,
|
|
"title": "System Load",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 8, "x": 8, "y": 8},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [
|
|
{
|
|
"expr": "node_load1{instance=~\"$instance\"}",
|
|
"legendFormat": "1m",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "node_load5{instance=~\"$instance\"}",
|
|
"legendFormat": "5m",
|
|
"refId": "B"
|
|
},
|
|
{
|
|
"expr": "node_load15{instance=~\"$instance\"}",
|
|
"legendFormat": "15m",
|
|
"refId": "C"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 5,
|
|
"title": "Uptime",
|
|
"type": "stat",
|
|
"gridPos": {"h": 8, "w": 8, "x": 16, "y": 8},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [
|
|
{
|
|
"expr": "time() - node_boot_time_seconds{instance=~\"$instance\"}",
|
|
"legendFormat": "Uptime",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 6,
|
|
"title": "Network Traffic",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 16},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [
|
|
{
|
|
"expr": "rate(node_network_receive_bytes_total{instance=~\"$instance\",device!~\"lo|veth.*|br.*|docker.*\"}[5m])",
|
|
"legendFormat": "Receive {{device}}",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "-rate(node_network_transmit_bytes_total{instance=~\"$instance\",device!~\"lo|veth.*|br.*|docker.*\"}[5m])",
|
|
"legendFormat": "Transmit {{device}}",
|
|
"refId": "B"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "Bps"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 7,
|
|
"title": "Disk I/O",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 16},
|
|
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
|
"targets": [
|
|
{
|
|
"expr": "rate(node_disk_read_bytes_total{instance=~\"$instance\",device!~\"dm-.*\"}[5m])",
|
|
"legendFormat": "Read {{device}}",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "-rate(node_disk_written_bytes_total{instance=~\"$instance\",device!~\"dm-.*\"}[5m])",
|
|
"legendFormat": "Write {{device}}",
|
|
"refId": "B"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "Bps"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|