Files
nix-config/modules/nixos/services/grafana/dashboards/nas-overview.json
mjallen18 70002a19e2 hmm
2026-04-07 18:39:42 -05:00

583 lines
16 KiB
JSON
Executable File

{
"title": "NAS Overview",
"uid": "jallen-nas-overview",
"schemaVersion": 38,
"version": 1,
"refresh": "30s",
"time": { "from": "now-1h", "to": "now" },
"tags": ["nas", "overview"],
"templating": {
"list": [
{
"name": "datasource",
"type": "datasource",
"query": "prometheus",
"current": {},
"hide": 0,
"label": "Datasource"
}
]
},
"panels": [
{
"id": 100,
"type": "row",
"title": "System",
"gridPos": { "x": 0, "y": 0, "w": 24, "h": 1 },
"collapsed": false
},
{
"id": 1,
"type": "stat",
"title": "CPU Usage",
"gridPos": { "x": 0, "y": 1, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 70 },
{ "color": "red", "value": 90 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "100 - (avg(rate(node_cpu_seconds_total{mode=\"idle\"}[2m])) * 100)",
"legendFormat": "CPU %",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 2,
"type": "stat",
"title": "RAM Used",
"gridPos": { "x": 4, "y": 1, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 75 },
{ "color": "red", "value": 90 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "(1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100",
"legendFormat": "RAM %",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 3,
"type": "stat",
"title": "RAM Available",
"gridPos": { "x": 8, "y": 1, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "bytes",
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "yellow", "value": 2147483648 },
{ "color": "green", "value": 8589934592 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "node_memory_MemAvailable_bytes",
"legendFormat": "Available",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 4,
"type": "stat",
"title": "System Load (15m)",
"gridPos": { "x": 12, "y": 1, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"decimals": 2,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 4 },
{ "color": "red", "value": 8 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "node_load15",
"legendFormat": "load15",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 5,
"type": "stat",
"title": "Uptime",
"gridPos": { "x": 16, "y": 1, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [{ "color": "blue", "value": null }]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "time() - node_boot_time_seconds",
"legendFormat": "uptime",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 6,
"type": "stat",
"title": "Open File Descriptors",
"gridPos": { "x": 20, "y": 1, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 50000 },
{ "color": "red", "value": 90000 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "node_filefd_allocated",
"legendFormat": "open FDs",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 101,
"type": "row",
"title": "Storage",
"gridPos": { "x": 0, "y": 5, "w": 24, "h": 1 },
"collapsed": false
},
{
"id": 7,
"type": "bargauge",
"title": "Disk Usage by Mount",
"gridPos": { "x": 0, "y": 6, "w": 12, "h": 8 },
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"orientation": "horizontal",
"displayMode": "gradient"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 75 },
{ "color": "red", "value": 90 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "100 - (node_filesystem_avail_bytes{fstype!~\"tmpfs|fuse.lxcfs|squashfs|vfat\"} / node_filesystem_size_bytes{fstype!~\"tmpfs|fuse.lxcfs|squashfs|vfat\"} * 100)",
"legendFormat": "{{mountpoint}}",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 8,
"type": "timeseries",
"title": "Disk I/O",
"gridPos": { "x": 12, "y": 6, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "Bps",
"custom": { "lineWidth": 2, "fillOpacity": 5 }
}
},
"targets": [
{
"expr": "sum(rate(node_disk_read_bytes_total[5m]))",
"legendFormat": "Read",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "sum(rate(node_disk_written_bytes_total[5m]))",
"legendFormat": "Write",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 102,
"type": "row",
"title": "Network",
"gridPos": { "x": 0, "y": 14, "w": 24, "h": 1 },
"collapsed": false
},
{
"id": 9,
"type": "timeseries",
"title": "Network Throughput",
"gridPos": { "x": 0, "y": 15, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "Bps",
"custom": { "lineWidth": 2, "fillOpacity": 5 }
}
},
"targets": [
{
"expr": "sum(rate(node_network_receive_bytes_total{device!~\"lo|tailscale.*\"}[5m]))",
"legendFormat": "Received",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "sum(rate(node_network_transmit_bytes_total{device!~\"lo|tailscale.*\"}[5m]))",
"legendFormat": "Transmitted",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 10,
"type": "timeseries",
"title": "Network Errors & Drops",
"gridPos": { "x": 12, "y": 15, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "pps",
"custom": { "lineWidth": 2 }
}
},
"targets": [
{
"expr": "sum(rate(node_network_receive_errs_total[5m]))",
"legendFormat": "RX Errors",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "sum(rate(node_network_receive_drop_total[5m]))",
"legendFormat": "RX Drops",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "sum(rate(node_network_transmit_errs_total[5m]))",
"legendFormat": "TX Errors",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 103,
"type": "row",
"title": "UPS",
"gridPos": { "x": 0, "y": 23, "w": 24, "h": 1 },
"collapsed": false
},
{
"id": 11,
"type": "stat",
"title": "UPS Status",
"gridPos": { "x": 0, "y": 24, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"mappings": [
{ "type": "value", "options": { "1": { "text": "Online", "color": "green" } } },
{ "type": "value", "options": { "0": { "text": "On Battery", "color": "red" } } }
],
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "green", "value": 1 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "network_ups_tools_ups_status",
"legendFormat": "Status",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 12,
"type": "gauge",
"title": "Battery Charge",
"gridPos": { "x": 4, "y": 24, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "orange", "value": 20 },
{ "color": "green", "value": 80 }
]
}
}
},
"targets": [
{
"expr": "network_ups_tools_battery_charge",
"legendFormat": "Charge",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 13,
"type": "gauge",
"title": "UPS Load",
"gridPos": { "x": 8, "y": 24, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 60 },
{ "color": "red", "value": 85 }
]
}
}
},
"targets": [
{
"expr": "network_ups_tools_ups_load",
"legendFormat": "Load",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 14,
"type": "stat",
"title": "Runtime Remaining",
"gridPos": { "x": 12, "y": 24, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "orange", "value": 300 },
{ "color": "green", "value": 600 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "network_ups_tools_battery_runtime",
"legendFormat": "Runtime",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 104,
"type": "row",
"title": "Services",
"gridPos": { "x": 0, "y": 28, "w": 24, "h": 1 },
"collapsed": false
},
{
"id": 15,
"type": "stat",
"title": "Caddy Request Rate (5m)",
"gridPos": { "x": 0, "y": 29, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "reqps",
"thresholds": { "mode": "absolute", "steps": [{ "color": "blue", "value": null }] },
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "sum(rate(caddy_http_requests_total[5m]))",
"legendFormat": "req/s",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 16,
"type": "stat",
"title": "PostgreSQL Active Connections",
"gridPos": { "x": 4, "y": 29, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 50 },
{ "color": "red", "value": 80 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "sum(pg_stat_activity_count{state=\"active\"})",
"legendFormat": "active conns",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 17,
"type": "stat",
"title": "Nextcloud Users (24h)",
"gridPos": { "x": 8, "y": 29, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"thresholds": { "mode": "absolute", "steps": [{ "color": "blue", "value": null }] },
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "nextcloud_active_users_daily",
"legendFormat": "active users",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 18,
"type": "stat",
"title": "Gitea Repositories",
"gridPos": { "x": 12, "y": 29, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"thresholds": { "mode": "absolute", "steps": [{ "color": "blue", "value": null }] },
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "gitea_repositories",
"legendFormat": "repos",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 19,
"type": "stat",
"title": "restic Backup Size",
"gridPos": { "x": 16, "y": 29, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "bytes",
"thresholds": { "mode": "absolute", "steps": [{ "color": "blue", "value": null }] },
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "restic_rest_server_bytes_total",
"legendFormat": "backup bytes",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 20,
"type": "stat",
"title": "MariaDB Queries/s",
"gridPos": { "x": 20, "y": 29, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "qps",
"thresholds": { "mode": "absolute", "steps": [{ "color": "blue", "value": null }] },
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "rate(mysql_global_status_queries[5m])",
"legendFormat": "queries/s",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
}
]
}