This commit is contained in:
mjallen18
2026-03-24 10:20:46 -05:00
parent d1960837a0
commit 7798684d29
10 changed files with 1564 additions and 11 deletions

View File

@@ -0,0 +1,296 @@
{
"title": "Caddy",
"uid": "jallen-caddy",
"schemaVersion": 38,
"version": 1,
"refresh": "30s",
"time": { "from": "now-1h", "to": "now" },
"templating": {
"list": [
{
"name": "datasource",
"type": "datasource",
"query": "prometheus",
"current": {},
"hide": 0,
"label": "Datasource"
},
{
"name": "handler",
"type": "query",
"datasource": { "type": "prometheus", "uid": "$datasource" },
"query": "label_values(caddy_http_requests_total, handler)",
"refresh": 2,
"includeAll": true,
"allValue": ".*",
"label": "Handler"
}
]
},
"panels": [
{
"id": 1,
"type": "stat",
"title": "Request Rate (5m)",
"gridPos": { "x": 0, "y": 0, "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": 2,
"type": "stat",
"title": "Error Rate (5m)",
"gridPos": { "x": 4, "y": 0, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "reqps",
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "red", "value": 0.01 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "sum(rate(caddy_http_requests_total{code=~\"5..\"}[5m]))",
"legendFormat": "5xx/s",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 3,
"type": "stat",
"title": "Active Requests",
"gridPos": { "x": 8, "y": 0, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [{ "color": "blue", "value": null }]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "sum(caddy_http_active_requests)",
"legendFormat": "active",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 4,
"type": "stat",
"title": "P99 Latency (5m)",
"gridPos": { "x": 12, "y": 0, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "s",
"decimals": 3,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 0.5 },
{ "color": "red", "value": 2 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "histogram_quantile(0.99, sum(rate(caddy_http_request_duration_seconds_bucket[5m])) by (le))",
"legendFormat": "P99",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 5,
"type": "stat",
"title": "Total Bytes Received",
"gridPos": { "x": 16, "y": 0, "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": "sum(caddy_http_request_size_bytes_sum)",
"legendFormat": "bytes in",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 6,
"type": "stat",
"title": "Total Bytes Sent",
"gridPos": { "x": 20, "y": 0, "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": "sum(caddy_http_response_size_bytes_sum)",
"legendFormat": "bytes out",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 7,
"type": "timeseries",
"title": "Request Rate by Status Code",
"gridPos": { "x": 0, "y": 4, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "reqps",
"custom": { "lineWidth": 2, "fillOpacity": 5 }
},
"overrides": [
{ "matcher": { "id": "byName", "options": "5xx" }, "properties": [{ "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } }] },
{ "matcher": { "id": "byName", "options": "4xx" }, "properties": [{ "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } }] },
{ "matcher": { "id": "byName", "options": "2xx" }, "properties": [{ "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } }] },
{ "matcher": { "id": "byName", "options": "3xx" }, "properties": [{ "id": "color", "value": { "fixedColor": "blue", "mode": "fixed" } }] }
]
},
"targets": [
{
"expr": "sum(rate(caddy_http_requests_total{code=~\"2..\"}[5m]))",
"legendFormat": "2xx",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "sum(rate(caddy_http_requests_total{code=~\"3..\"}[5m]))",
"legendFormat": "3xx",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "sum(rate(caddy_http_requests_total{code=~\"4..\"}[5m]))",
"legendFormat": "4xx",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "sum(rate(caddy_http_requests_total{code=~\"5..\"}[5m]))",
"legendFormat": "5xx",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 8,
"type": "timeseries",
"title": "Request Latency Percentiles",
"gridPos": { "x": 12, "y": 4, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "s",
"decimals": 3,
"custom": { "lineWidth": 2 }
}
},
"targets": [
{
"expr": "histogram_quantile(0.50, sum(rate(caddy_http_request_duration_seconds_bucket[5m])) by (le))",
"legendFormat": "P50",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "histogram_quantile(0.90, sum(rate(caddy_http_request_duration_seconds_bucket[5m])) by (le))",
"legendFormat": "P90",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "histogram_quantile(0.99, sum(rate(caddy_http_request_duration_seconds_bucket[5m])) by (le))",
"legendFormat": "P99",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 9,
"type": "timeseries",
"title": "Request Rate by Handler",
"gridPos": { "x": 0, "y": 12, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "reqps",
"custom": { "lineWidth": 2, "fillOpacity": 5 }
}
},
"targets": [
{
"expr": "sum(rate(caddy_http_requests_total{handler=~\"$handler\"}[5m])) by (handler)",
"legendFormat": "{{handler}}",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 10,
"type": "timeseries",
"title": "Bandwidth",
"gridPos": { "x": 12, "y": 12, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "Bps",
"custom": { "lineWidth": 2, "fillOpacity": 10 }
}
},
"targets": [
{
"expr": "sum(rate(caddy_http_request_size_bytes_sum[5m]))",
"legendFormat": "Inbound",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "sum(rate(caddy_http_response_size_bytes_sum[5m]))",
"legendFormat": "Outbound",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
}
]
}

View File

@@ -0,0 +1,246 @@
{
"title": "Gitea",
"uid": "jallen-gitea",
"schemaVersion": 38,
"version": 1,
"refresh": "1m",
"time": { "from": "now-6h", "to": "now" },
"templating": {
"list": [
{
"name": "datasource",
"type": "datasource",
"query": "prometheus",
"current": {},
"hide": 0,
"label": "Datasource"
}
]
},
"panels": [
{
"id": 1,
"type": "stat",
"title": "Repositories",
"gridPos": { "x": 0, "y": 0, "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": 2,
"type": "stat",
"title": "Users",
"gridPos": { "x": 4, "y": 0, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"thresholds": { "mode": "absolute", "steps": [{ "color": "blue", "value": null }] },
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "gitea_users",
"legendFormat": "users",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 3,
"type": "stat",
"title": "Open Issues",
"gridPos": { "x": 8, "y": 0, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"thresholds": { "mode": "absolute", "steps": [{ "color": "blue", "value": null }] },
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "gitea_issues_open",
"legendFormat": "open issues",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 4,
"type": "stat",
"title": "Open PRs",
"gridPos": { "x": 12, "y": 0, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"thresholds": { "mode": "absolute", "steps": [{ "color": "purple", "value": null }] },
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "gitea_issues_open{type=\"pull_request\"}",
"legendFormat": "open PRs",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 5,
"type": "stat",
"title": "Orgs",
"gridPos": { "x": 16, "y": 0, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"thresholds": { "mode": "absolute", "steps": [{ "color": "blue", "value": null }] },
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "gitea_organizations",
"legendFormat": "orgs",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 6,
"type": "stat",
"title": "Mirrors",
"gridPos": { "x": 20, "y": 0, "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_mirrors",
"legendFormat": "mirrors",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 7,
"type": "timeseries",
"title": "HTTP Request Rate by Method",
"gridPos": { "x": 0, "y": 4, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "reqps",
"custom": { "lineWidth": 2, "fillOpacity": 5 }
}
},
"targets": [
{
"expr": "sum(rate(gitea_access_total[5m])) by (method)",
"legendFormat": "{{method}}",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 8,
"type": "timeseries",
"title": "HTTP Response Codes",
"gridPos": { "x": 12, "y": 4, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "reqps",
"custom": { "lineWidth": 2, "fillOpacity": 5 }
},
"overrides": [
{ "matcher": { "id": "byName", "options": "5xx" }, "properties": [{ "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } }] },
{ "matcher": { "id": "byName", "options": "4xx" }, "properties": [{ "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } }] },
{ "matcher": { "id": "byName", "options": "2xx" }, "properties": [{ "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } }] }
]
},
"targets": [
{
"expr": "sum(rate(gitea_access_total{code=~\"2..\"}[5m]))",
"legendFormat": "2xx",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "sum(rate(gitea_access_total{code=~\"4..\"}[5m]))",
"legendFormat": "4xx",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "sum(rate(gitea_access_total{code=~\"5..\"}[5m]))",
"legendFormat": "5xx",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 9,
"type": "timeseries",
"title": "Repository & User Growth",
"gridPos": { "x": 0, "y": 12, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"custom": { "lineWidth": 2 }
}
},
"targets": [
{
"expr": "gitea_repositories",
"legendFormat": "Repositories",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "gitea_users",
"legendFormat": "Users",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "gitea_organizations",
"legendFormat": "Organizations",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 10,
"type": "timeseries",
"title": "Issues & PRs Over Time",
"gridPos": { "x": 12, "y": 12, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"custom": { "lineWidth": 2 }
}
},
"targets": [
{
"expr": "gitea_issues_open",
"legendFormat": "Open Issues",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "gitea_issues_closed",
"legendFormat": "Closed Issues",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
}
]
}

View File

@@ -0,0 +1,582 @@
{
"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" }
}
]
}
]
}

View File

@@ -0,0 +1,301 @@
{
"title": "UPS (NUT)",
"uid": "jallen-nut",
"schemaVersion": 38,
"version": 1,
"refresh": "30s",
"time": { "from": "now-3h", "to": "now" },
"templating": {
"list": [
{
"name": "datasource",
"type": "datasource",
"query": "prometheus",
"current": {},
"hide": 0,
"includeAll": false,
"label": "Datasource"
},
{
"name": "ups",
"type": "query",
"datasource": { "type": "prometheus", "uid": "$datasource" },
"query": "label_values(network_ups_tools_ups_status, ups)",
"refresh": 2,
"includeAll": false,
"label": "UPS"
}
]
},
"panels": [
{
"id": 1,
"type": "stat",
"title": "Status",
"gridPos": { "x": 0, "y": 0, "w": 4, "h": 4 },
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"colorMode": "background",
"textMode": "value"
},
"fieldConfig": {
"defaults": {
"mappings": [
{ "type": "value", "options": { "1": { "text": "OL", "color": "green" } } },
{ "type": "value", "options": { "0": { "text": "OB", "color": "red" } } }
],
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "green", "value": 1 }
]
}
}
},
"targets": [
{
"expr": "network_ups_tools_ups_status{ups=\"$ups\"}",
"legendFormat": "Status",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 2,
"type": "gauge",
"title": "Battery Charge",
"gridPos": { "x": 4, "y": 0, "w": 4, "h": 4 },
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"minVizWidth": 75
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "orange", "value": 20 },
{ "color": "yellow", "value": 50 },
{ "color": "green", "value": 80 }
]
}
}
},
"targets": [
{
"expr": "network_ups_tools_battery_charge{ups=\"$ups\"}",
"legendFormat": "Charge",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 3,
"type": "gauge",
"title": "Load",
"gridPos": { "x": 8, "y": 0, "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{ups=\"$ups\"}",
"legendFormat": "Load",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 4,
"type": "stat",
"title": "Runtime Remaining",
"gridPos": { "x": 12, "y": 0, "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 }
]
}
}
},
"targets": [
{
"expr": "network_ups_tools_battery_runtime{ups=\"$ups\"}",
"legendFormat": "Runtime",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 5,
"type": "stat",
"title": "Input Voltage",
"gridPos": { "x": 16, "y": 0, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "volt",
"decimals": 1,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "green", "value": 100 }
]
}
}
},
"targets": [
{
"expr": "network_ups_tools_input_voltage{ups=\"$ups\"}",
"legendFormat": "Input V",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 6,
"type": "stat",
"title": "Battery Voltage",
"gridPos": { "x": 20, "y": 0, "w": 4, "h": 4 },
"options": { "reduceOptions": { "calcs": ["lastNotNull"] } },
"fieldConfig": {
"defaults": {
"unit": "volt",
"decimals": 1,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "green", "value": 10 }
]
}
}
},
"targets": [
{
"expr": "network_ups_tools_battery_voltage{ups=\"$ups\"}",
"legendFormat": "Battery V",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 7,
"type": "timeseries",
"title": "Battery Charge Over Time",
"gridPos": { "x": 0, "y": 4, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"custom": { "lineWidth": 2, "fillOpacity": 10 },
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "green", "value": 50 }
]
},
"color": { "mode": "thresholds" }
}
},
"targets": [
{
"expr": "network_ups_tools_battery_charge{ups=\"$ups\"}",
"legendFormat": "Charge %",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 8,
"type": "timeseries",
"title": "Load Over Time",
"gridPos": { "x": 12, "y": 4, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"custom": { "lineWidth": 2, "fillOpacity": 10 }
}
},
"targets": [
{
"expr": "network_ups_tools_ups_load{ups=\"$ups\"}",
"legendFormat": "Load %",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 9,
"type": "timeseries",
"title": "Input Voltage Over Time",
"gridPos": { "x": 0, "y": 12, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "volt",
"decimals": 1,
"custom": { "lineWidth": 2, "fillOpacity": 5 }
}
},
"targets": [
{
"expr": "network_ups_tools_input_voltage{ups=\"$ups\"}",
"legendFormat": "Input Voltage",
"datasource": { "type": "prometheus", "uid": "$datasource" }
},
{
"expr": "network_ups_tools_output_voltage{ups=\"$ups\"}",
"legendFormat": "Output Voltage",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
},
{
"id": 10,
"type": "timeseries",
"title": "Runtime Remaining Over Time",
"gridPos": { "x": 12, "y": 12, "w": 12, "h": 8 },
"fieldConfig": {
"defaults": {
"unit": "s",
"custom": { "lineWidth": 2, "fillOpacity": 10 }
}
},
"targets": [
{
"expr": "network_ups_tools_battery_runtime{ups=\"$ups\"}",
"legendFormat": "Runtime",
"datasource": { "type": "prometheus", "uid": "$datasource" }
}
]
}
]
}