📊 feat(monitoring): add node-exporter for host system metrics

- Add node-exporter service to docker-compose for CPU/Memory/Disk monitoring
- Enable node-exporter scrape target in Prometheus config
- Update System Overview dashboard with Host System section:
  - CPU, Memory, Disk usage gauges
  - Total RAM, Total Disk, Uptime, Load stats
  - CPU & Memory over time graph
  - Network I/O graph
- Add Node Exporter to service status panel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2026-02-01 12:38:44 +01:00
parent 84e9f86db9
commit 7aa5115c78
3 changed files with 472 additions and 19 deletions

View file

@ -11,6 +11,436 @@
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
"id": 20,
"panels": [],
"title": "Host System (Mac Mini)",
"type": "row"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 70 },
{ "color": "red", "value": 85 }
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": { "h": 5, "w": 4, "x": 0, "y": 1 },
"id": 21,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "100 - (avg(rate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)",
"refId": "A"
}
],
"title": "CPU Usage",
"type": "gauge"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 70 },
{ "color": "red", "value": 85 }
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": { "h": 5, "w": 4, "x": 4, "y": 1 },
"id": 22,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "100 * (1 - ((node_memory_free_bytes + node_memory_cached_bytes + node_memory_buffers_bytes) / node_memory_total_bytes))",
"refId": "A"
}
],
"title": "Memory Usage",
"type": "gauge"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 70 },
{ "color": "red", "value": 85 }
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": { "h": 5, "w": 4, "x": 8, "y": 1 },
"id": 23,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "100 - ((node_filesystem_avail_bytes{mountpoint=\"/\",fstype!=\"rootfs\"} / node_filesystem_size_bytes{mountpoint=\"/\",fstype!=\"rootfs\"}) * 100)",
"refId": "A"
}
],
"title": "Disk Usage (/)",
"type": "gauge"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [{ "color": "blue", "value": null }]
},
"unit": "decbytes"
},
"overrides": []
},
"gridPos": { "h": 5, "w": 3, "x": 12, "y": 1 },
"id": 24,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "node_memory_total_bytes",
"refId": "A"
}
],
"title": "Total RAM",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [{ "color": "blue", "value": null }]
},
"unit": "decbytes"
},
"overrides": []
},
"gridPos": { "h": 5, "w": 3, "x": 15, "y": 1 },
"id": 25,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "node_filesystem_size_bytes{mountpoint=\"/\",fstype!=\"rootfs\"}",
"refId": "A"
}
],
"title": "Total Disk",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [{ "color": "green", "value": null }]
},
"unit": "s"
},
"overrides": []
},
"gridPos": { "h": 5, "w": 3, "x": 18, "y": 1 },
"id": 26,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "time() - node_boot_time_seconds",
"refId": "A"
}
],
"title": "Uptime",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 5 },
{ "color": "red", "value": 10 }
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": { "h": 5, "w": 3, "x": 21, "y": 1 },
"id": 27,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "node_load1",
"refId": "A"
}
],
"title": "Load (1m)",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 20,
"gradientMode": "opacity",
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
"insertNulls": false,
"lineInterpolation": "smooth",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": { "type": "linear" },
"showPoints": "never",
"spanNulls": false,
"stacking": { "group": "A", "mode": "none" },
"thresholdsStyle": { "mode": "off" }
},
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [{ "color": "green", "value": null }]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": { "h": 7, "w": 12, "x": 0, "y": 6 },
"id": 28,
"options": {
"legend": {
"calcs": ["mean", "max"],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": { "mode": "multi", "sort": "desc" }
},
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "100 - (avg(rate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)",
"legendFormat": "CPU Usage",
"refId": "A"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "100 * (1 - ((node_memory_free_bytes + node_memory_cached_bytes + node_memory_buffers_bytes) / node_memory_total_bytes))",
"legendFormat": "Memory Usage",
"refId": "B"
}
],
"title": "CPU & Memory Over Time",
"type": "timeseries"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 20,
"gradientMode": "opacity",
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
"insertNulls": false,
"lineInterpolation": "smooth",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": { "type": "linear" },
"showPoints": "never",
"spanNulls": false,
"stacking": { "group": "A", "mode": "none" },
"thresholdsStyle": { "mode": "off" }
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [{ "color": "green", "value": null }]
},
"unit": "Bps"
},
"overrides": [
{
"matcher": { "id": "byRegexp", "options": ".*TX.*" },
"properties": [{ "id": "custom.transform", "value": "negative-Y" }]
}
]
},
"gridPos": { "h": 7, "w": 12, "x": 12, "y": 6 },
"id": 29,
"options": {
"legend": {
"calcs": ["mean", "max"],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": { "mode": "multi", "sort": "desc" }
},
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "rate(node_network_receive_bytes_total{device!~\"lo|veth.*|docker.*|br-.*\"}[5m])",
"legendFormat": "RX {{device}}",
"refId": "A"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "rate(node_network_transmit_bytes_total{device!~\"lo|veth.*|docker.*|br-.*\"}[5m])",
"legendFormat": "TX {{device}}",
"refId": "B"
}
],
"title": "Network I/O",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 13 },
"id": 1,
"panels": [],
"title": "Service Status",
@ -40,7 +470,7 @@
},
"overrides": []
},
"gridPos": { "h": 4, "w": 24, "x": 0, "y": 1 },
"gridPos": { "h": 4, "w": 24, "x": 0, "y": 14 },
"id": 2,
"options": {
"colorMode": "background",
@ -56,6 +486,12 @@
},
"pluginVersion": "10.0.0",
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "up{job=\"node\"}",
"legendFormat": "Node Exporter",
"refId": "I"
},
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "up{job=\"mana-core-auth\"}",
@ -110,7 +546,7 @@
},
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 },
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 18 },
"id": 3,
"panels": [],
"title": "Traffic Overview",
@ -151,7 +587,7 @@
},
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 },
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 19 },
"id": 4,
"options": {
"legend": {
@ -208,7 +644,7 @@
},
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 6 },
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 19 },
"id": 5,
"options": {
"legend": {
@ -232,7 +668,7 @@
},
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 },
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 27 },
"id": 8,
"panels": [],
"title": "Database",
@ -256,7 +692,7 @@
},
"overrides": []
},
"gridPos": { "h": 5, "w": 6, "x": 0, "y": 15 },
"gridPos": { "h": 5, "w": 6, "x": 0, "y": 28 },
"id": 9,
"options": {
"colorMode": "value",
@ -295,7 +731,7 @@
},
"overrides": []
},
"gridPos": { "h": 5, "w": 6, "x": 6, "y": 15 },
"gridPos": { "h": 5, "w": 6, "x": 6, "y": 28 },
"id": 10,
"options": {
"colorMode": "value",
@ -334,7 +770,7 @@
},
"overrides": []
},
"gridPos": { "h": 5, "w": 6, "x": 12, "y": 15 },
"gridPos": { "h": 5, "w": 6, "x": 12, "y": 28 },
"id": 11,
"options": {
"colorMode": "value",
@ -377,7 +813,7 @@
},
"overrides": []
},
"gridPos": { "h": 5, "w": 6, "x": 18, "y": 15 },
"gridPos": { "h": 5, "w": 6, "x": 18, "y": 28 },
"id": 12,
"options": {
"colorMode": "value",
@ -437,7 +873,7 @@
},
"overrides": []
},
"gridPos": { "h": 7, "w": 12, "x": 0, "y": 20 },
"gridPos": { "h": 7, "w": 12, "x": 0, "y": 33 },
"id": 13,
"options": {
"legend": {
@ -494,7 +930,7 @@
},
"overrides": []
},
"gridPos": { "h": 7, "w": 12, "x": 12, "y": 20 },
"gridPos": { "h": 7, "w": 12, "x": 12, "y": 33 },
"id": 14,
"options": {
"legend": {

View file

@ -21,14 +21,14 @@ scrape_configs:
static_configs:
- targets: ['localhost:9090']
# Host system metrics via node-exporter (disabled - container not deployed)
# - job_name: 'node'
# static_configs:
# - targets: ['node-exporter:9100']
# relabel_configs:
# - source_labels: [__address__]
# target_label: instance
# replacement: 'mac-mini'
# Host system metrics via node-exporter
- job_name: 'node'
static_configs:
- targets: ['node-exporter:9100']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'mac-mini'
# Docker container metrics via cAdvisor (disabled - container not deployed)
# - job_name: 'cadvisor'