Sanitized mirror from private repository - 2026-03-29 13:33:25 UTC
Some checks failed
Documentation / Build Docusaurus (push) Failing after 5m0s
Documentation / Deploy to GitHub Pages (push) Has been skipped

This commit is contained in:
Gitea Mirror Bot
2026-03-29 13:33:25 +00:00
commit 75d4f4e02b
1280 changed files with 331190 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
# Prometheus + Grafana Monitoring Stack
# Ports: 9090 (Prometheus), 3300 (Grafana)
#
# Config files are in prometheus/ and grafana/ subdirectories relative to this file
# Dashboards provisioned: infrastructure-overview, node-details, node-exporter, synology-monitoring
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- ./prometheus:/etc/prometheus
- prometheus-data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.enable-lifecycle"
ports:
- "9090:9090"
restart: unless-stopped
networks:
- monitoring
grafana:
image: grafana/grafana-oss:latest
container_name: grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD="REDACTED_PASSWORD"
volumes:
- grafana-data:/var/lib/grafana
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:ro
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro
- ./grafana/dashboards:/etc/grafana/dashboards:ro
ports:
- "3300:3000"
restart: unless-stopped
depends_on:
- prometheus
networks:
- monitoring
node_exporter:
image: prom/node-exporter:latest
container_name: node_exporter
network_mode: host
pid: host
volumes:
- /:/host:ro,rslave
- /sys:/host/sys:ro
- /proc:/host/proc:ro
command:
- '--path.rootfs=/host'
restart: unless-stopped
volumes:
prometheus-data:
grafana-data:
networks:
monitoring:
driver: bridge

View File

@@ -0,0 +1,366 @@
{
"uid": "infrastructure-overview-v2",
"title": "Infrastructure Overview - All Devices",
"tags": [
"infrastructure",
"node-exporter",
"tailscale"
],
"timezone": "browser",
"schemaVersion": 38,
"version": 1,
"refresh": "30s",
"templating": {
"list": [
{
"current": {},
"hide": 0,
"includeAll": false,
"label": "Data Source",
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"refresh": 1,
"type": "datasource"
},
{
"allValue": "",
"current": {},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"definition": "label_values(node_uname_info, job)",
"hide": 0,
"includeAll": true,
"label": "Host",
"multi": true,
"name": "job",
"query": "label_values(node_uname_info, job)",
"refresh": 1,
"regex": "",
"sort": 1,
"type": "query"
}
]
},
"panels": [
{
"id": 1,
"type": "stat",
"title": "Device Status",
"gridPos": {
"h": 5,
"w": 24,
"x": 0,
"y": 0
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"mappings": [
{
"type": "value",
"options": {
"0": {
"text": "DOWN",
"color": "red"
},
"1": {
"text": "UP",
"color": "green"
}
}
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
}
}
},
"options": {
"colorMode": "background",
"textMode": "value_and_name",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "up{job=~\"$job\"}",
"legendFormat": "{{job}}",
"refId": "A"
}
]
},
{
"id": 2,
"type": "timeseries",
"title": "CPU Usage",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 5
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"max": 100,
"min": 0
}
},
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"mean",
"max"
]
}
},
"targets": [
{
"expr": "100 - (avg by(job) (rate(node_cpu_seconds_total{mode=\"idle\", job=~\"$job\"}[5m])) * 100)",
"legendFormat": "{{job}}",
"refId": "A"
}
]
},
{
"id": 3,
"type": "timeseries",
"title": "Memory Usage",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 5
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"max": 100,
"min": 0
}
},
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"mean",
"max"
]
}
},
"targets": [
{
"expr": "(1 - (node_memory_MemAvailable_bytes{job=~\"$job\"} / node_memory_MemTotal_bytes{job=~\"$job\"})) * 100",
"legendFormat": "{{job}}",
"refId": "A"
}
]
},
{
"id": 4,
"type": "bargauge",
"title": "Root Disk Usage",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 13
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 70
},
{
"color": "red",
"value": 85
}
]
}
}
},
"options": {
"displayMode": "gradient",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "100 - ((node_filesystem_avail_bytes{job=~\"$job\", mountpoint=\"/\", fstype!=\"rootfs\"} / node_filesystem_size_bytes{job=~\"$job\", mountpoint=\"/\", fstype!=\"rootfs\"}) * 100)",
"legendFormat": "{{job}}",
"refId": "A"
}
]
},
{
"id": 5,
"type": "stat",
"title": "Uptime",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 13
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
}
},
"options": {
"colorMode": "value",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "node_time_seconds{job=~\"$job\"} - node_boot_time_seconds{job=~\"$job\"}",
"legendFormat": "{{job}}",
"refId": "A"
}
]
},
{
"id": 6,
"type": "timeseries",
"title": "Network Receive",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 21
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "Bps"
}
},
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"mean",
"max"
]
}
},
"targets": [
{
"expr": "sum by(job) (rate(node_network_receive_bytes_total{job=~\"$job\", device!~\"lo|docker.*|br-.*|veth.*\"}[5m]))",
"legendFormat": "{{job}}",
"refId": "A"
}
]
},
{
"id": 7,
"type": "timeseries",
"title": "Network Transmit",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 21
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "Bps"
}
},
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"mean",
"max"
]
}
},
"targets": [
{
"expr": "sum by(job) (rate(node_network_transmit_bytes_total{job=~\"$job\", device!~\"lo|docker.*|br-.*|veth.*\"}[5m]))",
"legendFormat": "{{job}}",
"refId": "A"
}
]
}
]
}

View File

@@ -0,0 +1,936 @@
{
"uid": "node-details-v2",
"title": "Node Details - Full Metrics",
"tags": [
"node-exporter",
"detailed",
"infrastructure"
],
"timezone": "browser",
"schemaVersion": 38,
"version": 1,
"refresh": "30s",
"time": {
"from": "now-1h",
"to": "now"
},
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "prometheus",
"value": "prometheus"
},
"hide": 0,
"includeAll": false,
"label": "Data Source",
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"definition": "label_values(node_uname_info, job)",
"hide": 0,
"includeAll": false,
"label": "Host",
"multi": false,
"name": "job",
"options": [],
"query": "label_values(node_uname_info, job)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"definition": "label_values(node_uname_info{job=\"$job\"}, instance)",
"hide": 0,
"includeAll": false,
"label": "Instance",
"multi": false,
"name": "instance",
"options": [],
"query": "label_values(node_uname_info{job=\"$job\"}, instance)",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
}
]
},
"panels": [
{
"id": 1,
"type": "row",
"title": "\ud83d\udcca Quick Stats",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"collapsed": false
},
{
"id": 2,
"type": "stat",
"title": "Uptime",
"gridPos": {
"h": 4,
"w": 4,
"x": 0,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
}
},
"options": {
"colorMode": "value",
"graphMode": "none",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "node_time_seconds{job=\"$job\",instance=\"$instance\"} - node_boot_time_seconds{job=\"$job\",instance=\"$instance\"}",
"legendFormat": "Uptime",
"refId": "A"
}
]
},
{
"id": 3,
"type": "stat",
"title": "CPU Cores",
"gridPos": {
"h": 4,
"w": 3,
"x": 4,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "blue",
"value": null
}
]
}
}
},
"options": {
"colorMode": "value",
"graphMode": "none",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "count(node_cpu_seconds_total{job=\"$job\",instance=\"$instance\",mode=\"idle\"})",
"legendFormat": "Cores",
"refId": "A"
}
]
},
{
"id": 4,
"type": "stat",
"title": "Total RAM",
"gridPos": {
"h": 4,
"w": 3,
"x": 7,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "bytes",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "purple",
"value": null
}
]
}
}
},
"options": {
"colorMode": "value",
"graphMode": "none",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "node_memory_MemTotal_bytes{job=\"$job\",instance=\"$instance\"}",
"legendFormat": "RAM",
"refId": "A"
}
]
},
{
"id": 5,
"type": "gauge",
"title": "CPU",
"gridPos": {
"h": 4,
"w": 3,
"x": 10,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 60
},
{
"color": "red",
"value": 80
}
]
}
}
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "100 - (avg(rate(node_cpu_seconds_total{job=\"$job\",instance=\"$instance\",mode=\"idle\"}[5m])) * 100)",
"legendFormat": "CPU",
"refId": "A"
}
]
},
{
"id": 6,
"type": "gauge",
"title": "Memory",
"gridPos": {
"h": 4,
"w": 3,
"x": 13,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 70
},
{
"color": "red",
"value": 85
}
]
}
}
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "(1 - (node_memory_MemAvailable_bytes{job=\"$job\",instance=\"$instance\"} / node_memory_MemTotal_bytes{job=\"$job\",instance=\"$instance\"})) * 100",
"legendFormat": "Memory",
"refId": "A"
}
]
},
{
"id": 7,
"type": "gauge",
"title": "Disk /",
"gridPos": {
"h": 4,
"w": 3,
"x": 16,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 70
},
{
"color": "red",
"value": 85
}
]
}
}
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "100 - ((node_filesystem_avail_bytes{job=\"$job\",instance=\"$instance\",mountpoint=\"/\",fstype!=\"rootfs\"} / node_filesystem_size_bytes{job=\"$job\",instance=\"$instance\",mountpoint=\"/\",fstype!=\"rootfs\"}) * 100)",
"legendFormat": "Disk",
"refId": "A"
}
]
},
{
"id": 8,
"type": "stat",
"title": "Load 1m",
"gridPos": {
"h": 4,
"w": 2,
"x": 19,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"decimals": 2,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 2
},
{
"color": "red",
"value": 4
}
]
}
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "node_load1{job=\"$job\",instance=\"$instance\"}",
"legendFormat": "1m",
"refId": "A"
}
]
},
{
"id": 9,
"type": "stat",
"title": "Load 5m",
"gridPos": {
"h": 4,
"w": 2,
"x": 21,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"decimals": 2,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 2
},
{
"color": "red",
"value": 4
}
]
}
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "node_load5{job=\"$job\",instance=\"$instance\"}",
"legendFormat": "5m",
"refId": "A"
}
]
},
{
"id": 10,
"type": "row",
"title": "\ud83d\udda5\ufe0f CPU Details",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 5
},
"collapsed": false
},
{
"id": 11,
"type": "timeseries",
"title": "CPU Usage Breakdown",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 6
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"custom": {
"fillOpacity": 50,
"stacking": {
"mode": "normal",
"group": "A"
}
}
}
},
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"mean",
"max"
]
}
},
"targets": [
{
"expr": "avg(rate(node_cpu_seconds_total{job=\"$job\",instance=\"$instance\",mode=\"user\"}[5m])) * 100",
"legendFormat": "User",
"refId": "A"
},
{
"expr": "avg(rate(node_cpu_seconds_total{job=\"$job\",instance=\"$instance\",mode=\"system\"}[5m])) * 100",
"legendFormat": "System",
"refId": "B"
},
{
"expr": "avg(rate(node_cpu_seconds_total{job=\"$job\",instance=\"$instance\",mode=\"iowait\"}[5m])) * 100",
"legendFormat": "IOWait",
"refId": "C"
},
{
"expr": "avg(rate(node_cpu_seconds_total{job=\"$job\",instance=\"$instance\",mode=\"steal\"}[5m])) * 100",
"legendFormat": "Steal",
"refId": "D"
}
]
},
{
"id": 12,
"type": "timeseries",
"title": "CPU Per Core",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 6
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"max": 100,
"min": 0
}
},
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"mean"
]
}
},
"targets": [
{
"expr": "100 - (rate(node_cpu_seconds_total{job=\"$job\",instance=\"$instance\",mode=\"idle\"}[5m]) * 100)",
"legendFormat": "CPU {{cpu}}",
"refId": "A"
}
]
},
{
"id": 20,
"type": "row",
"title": "\ud83e\udde0 Memory Details",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 14
},
"collapsed": false
},
{
"id": 21,
"type": "timeseries",
"title": "Memory Usage",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 15
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "bytes",
"custom": {
"fillOpacity": 30,
"stacking": {
"mode": "normal",
"group": "A"
}
}
}
},
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"mean"
]
}
},
"targets": [
{
"expr": "node_memory_MemTotal_bytes{job=\"$job\",instance=\"$instance\"} - node_memory_MemAvailable_bytes{job=\"$job\",instance=\"$instance\"}",
"legendFormat": "Used",
"refId": "A"
},
{
"expr": "node_memory_Buffers_bytes{job=\"$job\",instance=\"$instance\"}",
"legendFormat": "Buffers",
"refId": "B"
},
{
"expr": "node_memory_Cached_bytes{job=\"$job\",instance=\"$instance\"}",
"legendFormat": "Cached",
"refId": "C"
},
{
"expr": "node_memory_MemFree_bytes{job=\"$job\",instance=\"$instance\"}",
"legendFormat": "Free",
"refId": "D"
}
]
},
{
"id": 22,
"type": "timeseries",
"title": "Swap Usage",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 15
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "bytes"
}
},
"targets": [
{
"expr": "node_memory_SwapTotal_bytes{job=\"$job\",instance=\"$instance\"}",
"legendFormat": "Total",
"refId": "A"
},
{
"expr": "node_memory_SwapTotal_bytes{job=\"$job\",instance=\"$instance\"} - node_memory_SwapFree_bytes{job=\"$job\",instance=\"$instance\"}",
"legendFormat": "Used",
"refId": "B"
}
]
},
{
"id": 30,
"type": "row",
"title": "\ud83d\udcbe Disk Details",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 23
},
"collapsed": false
},
{
"id": 31,
"type": "bargauge",
"title": "Disk Space Usage",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 70
},
{
"color": "red",
"value": 85
}
]
}
}
},
"options": {
"displayMode": "gradient",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "100 - ((node_filesystem_avail_bytes{job=\"$job\",instance=\"$instance\",fstype!~\"tmpfs|overlay|squashfs\"} / node_filesystem_size_bytes{job=\"$job\",instance=\"$instance\",fstype!~\"tmpfs|overlay|squashfs\"}) * 100)",
"legendFormat": "{{mountpoint}}",
"refId": "A"
}
]
},
{
"id": 32,
"type": "timeseries",
"title": "Disk I/O",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "Bps"
},
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": ".*Write.*"
},
"properties": [
{
"id": "custom.transform",
"value": "negative-Y"
}
]
}
]
},
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"mean",
"max"
]
}
},
"targets": [
{
"expr": "rate(node_disk_read_bytes_total{job=\"$job\",instance=\"$instance\",device!~\"loop.*|dm-.*\"}[5m])",
"legendFormat": "{{device}} Read",
"refId": "A"
},
{
"expr": "rate(node_disk_written_bytes_total{job=\"$job\",instance=\"$instance\",device!~\"loop.*|dm-.*\"}[5m])",
"legendFormat": "{{device}} Write",
"refId": "B"
}
]
},
{
"id": 40,
"type": "row",
"title": "\ud83c\udf10 Network Details",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 32
},
"collapsed": false
},
{
"id": 41,
"type": "timeseries",
"title": "Network Traffic",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 33
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "bps"
},
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": ".*TX.*"
},
"properties": [
{
"id": "custom.transform",
"value": "negative-Y"
}
]
}
]
},
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"mean",
"max"
]
}
},
"targets": [
{
"expr": "rate(node_network_receive_bytes_total{job=\"$job\",instance=\"$instance\",device!~\"lo|docker.*|br-.*|veth.*\"}[5m]) * 8",
"legendFormat": "{{device}} RX",
"refId": "A"
},
{
"expr": "rate(node_network_transmit_bytes_total{job=\"$job\",instance=\"$instance\",device!~\"lo|docker.*|br-.*|veth.*\"}[5m]) * 8",
"legendFormat": "{{device}} TX",
"refId": "B"
}
]
},
{
"id": 42,
"type": "timeseries",
"title": "Network Errors",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 33
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "pps"
}
},
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"mean"
]
}
},
"targets": [
{
"expr": "rate(node_network_receive_errs_total{job=\"$job\",instance=\"$instance\",device!~\"lo|docker.*|br-.*|veth.*\"}[5m])",
"legendFormat": "{{device}} RX Errors",
"refId": "A"
},
{
"expr": "rate(node_network_transmit_errs_total{job=\"$job\",instance=\"$instance\",device!~\"lo|docker.*|br-.*|veth.*\"}[5m])",
"legendFormat": "{{device}} TX Errors",
"refId": "B"
}
]
}
],
"id": null
}

View File

@@ -0,0 +1,351 @@
{
"uid": "synology-dashboard-v2",
"title": "Synology NAS Monitoring",
"tags": [
"synology",
"nas",
"snmp"
],
"timezone": "browser",
"schemaVersion": 38,
"version": 1,
"refresh": "30s",
"templating": {
"list": [
{
"current": {},
"hide": 0,
"includeAll": false,
"label": "Data Source",
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"refresh": 1,
"type": "datasource"
},
{
"allValue": "",
"current": {},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"definition": "label_values(ssCpuRawIdle, job)",
"hide": 0,
"includeAll": true,
"label": "NAS",
"multi": true,
"name": "job",
"query": "label_values(ssCpuRawIdle, job)",
"refresh": 1,
"regex": "",
"sort": 1,
"type": "query"
}
]
},
"panels": [
{
"id": 1,
"type": "stat",
"title": "NAS Status",
"gridPos": {
"h": 4,
"w": 24,
"x": 0,
"y": 0
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"mappings": [
{
"type": "value",
"options": {
"0": {
"text": "DOWN",
"color": "red"
},
"1": {
"text": "UP",
"color": "green"
}
}
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
}
}
},
"options": {
"colorMode": "background",
"textMode": "value_and_name",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "up{job=~\"$job\"}",
"legendFormat": "{{job}}",
"refId": "A"
}
]
},
{
"id": 2,
"type": "gauge",
"title": "CPU Usage",
"gridPos": {
"h": 6,
"w": 8,
"x": 0,
"y": 4
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 60
},
{
"color": "red",
"value": 80
}
]
}
}
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "100 - ((ssCpuRawIdle{job=~\"$job\"} / (ssCpuRawUser{job=~\"$job\"} + ssCpuRawSystem{job=~\"$job\"} + ssCpuRawIdle{job=~\"$job\"} + ssCpuRawWait{job=~\"$job\"})) * 100)",
"legendFormat": "{{job}}",
"refId": "A"
}
]
},
{
"id": 3,
"type": "gauge",
"title": "Memory Usage",
"gridPos": {
"h": 6,
"w": 8,
"x": 8,
"y": 4
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 70
},
{
"color": "red",
"value": 90
}
]
}
}
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "((memTotalReal{job=~\"$job\"} - memAvailReal{job=~\"$job\"}) / memTotalReal{job=~\"$job\"}) * 100",
"legendFormat": "{{job}}",
"refId": "A"
}
]
},
{
"id": 4,
"type": "stat",
"title": "Total Memory",
"gridPos": {
"h": 6,
"w": 8,
"x": 16,
"y": 4
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "decbytes",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "blue",
"value": null
}
]
}
}
},
"options": {
"colorMode": "value",
"graphMode": "none",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "memTotalReal{job=~\"$job\"} * 1024",
"legendFormat": "{{job}}",
"refId": "A"
}
]
},
{
"id": 5,
"type": "timeseries",
"title": "Load Average",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 10
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"options": {
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"mean"
]
}
},
"targets": [
{
"expr": "laLoad{job=~\"$job\", laIndex=\"1\"}",
"legendFormat": "{{job}} 1m",
"refId": "A"
},
{
"expr": "laLoad{job=~\"$job\", laIndex=\"2\"}",
"legendFormat": "{{job}} 5m",
"refId": "B"
},
{
"expr": "laLoad{job=~\"$job\", laIndex=\"3\"}",
"legendFormat": "{{job}} 15m",
"refId": "C"
}
]
},
{
"id": 6,
"type": "stat",
"title": "Uptime",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 10
},
"datasource": {
"type": "prometheus",
"uid": "eeyq1w1zddtkwb"
},
"fieldConfig": {
"defaults": {
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
}
},
"options": {
"colorMode": "value",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "sysUpTime{job=~\"$job\"} / 100",
"legendFormat": "{{job}}",
"refId": "A"
}
]
}
]
}

View File

@@ -0,0 +1,13 @@
apiVersion: 1
providers:
- name: 'Homelab Dashboards'
orgId: 1
folder: ''
folderUid: ''
type: file
disableDeletion: false
updateIntervalSeconds: 30
allowUiUpdates: true
options:
path: /etc/grafana/dashboards

View File

@@ -0,0 +1,9 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
editable: false

View File

@@ -0,0 +1,98 @@
global:
scrape_interval: 15s
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["prometheus:9090"]
- job_name: "homelab-node"
static_configs:
- targets: ["100.67.40.126:9100"]
- job_name: "raspberry-pis"
static_configs:
- targets: ["100.77.151.40:9100"] # pi-5
- targets: ["100.123.246.75:9100"] # pi-5-kevin
- job_name: "setillo-node"
static_configs:
- targets: ["100.125.0.20:9100"]
- job_name: "setillo-snmp"
metrics_path: /snmp
params:
module: [synology]
auth: [snmpv3]
target: ["127.0.0.1"]
static_configs:
- targets: ["100.125.0.20:9116"]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
replacement: "127.0.0.1"
- source_labels: [__param_target]
target_label: instance
replacement: "100.125.0.20"
- target_label: __address__
replacement: "100.125.0.20:9116"
- job_name: "calypso-node"
static_configs:
- targets: ["100.103.48.78:9100"]
- job_name: "calypso-snmp"
metrics_path: /snmp
params:
module: [synology]
auth: [snmpv3]
target: ["127.0.0.1"]
static_configs:
- targets: ["100.103.48.78:9116"]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
replacement: "127.0.0.1"
- source_labels: [__param_target]
target_label: instance
replacement: "100.103.48.78"
- target_label: __address__
replacement: "100.103.48.78:9116"
- job_name: "atlantis-node"
static_configs:
- targets: ["100.83.230.112:9100"]
- job_name: "atlantis-snmp"
metrics_path: /snmp
params:
module: [synology]
auth: [snmpv3]
target: ["127.0.0.1"]
static_configs:
- targets: ["100.83.230.112:9116"]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
replacement: "127.0.0.1"
- source_labels: [__param_target]
target_label: instance
replacement: "100.83.230.112"
- target_label: __address__
replacement: "100.83.230.112:9116"
- job_name: "concord-nuc-node"
static_configs:
- targets: ["100.72.55.21:9100"]
- job_name: "truenas-node"
static_configs:
- targets: ["100.75.252.64:9100"]
- job_name: "vmi2076105-node"
static_configs:
- targets: ["100.99.156.20:9100"]
- job_name: "proxmox-node"
static_configs:
- targets: ["100.87.12.28:9100"]