Compare commits

..

13 Commits

9 changed files with 520 additions and 116 deletions

View File

@@ -53,7 +53,7 @@
},
"targets": [
{
"expr": "count(rate(container_last_seen{name=~\"$container\",name!=\"\"}[5m]))",
"expr": "count((time() - container_last_seen{name=~\"$container|.*\",name!=\"\"}) < 120)",
"refId": "A"
}
],
@@ -103,7 +103,7 @@
},
"targets": [
{
"expr": "sum(rate(container_cpu_usage_seconds_total{name=~\"$container\",name!=\"\"}[5m])) * 100",
"expr": "sum(rate(container_cpu_usage_seconds_total{name=~\"$container|.*\",name!=\"\"}[5m])) * 100",
"refId": "A"
}
],
@@ -153,7 +153,7 @@
},
"targets": [
{
"expr": "sum(container_memory_usage_bytes{name=~\"$container\",name!=\"\"})",
"expr": "sum(container_memory_usage_bytes{name=~\"$container|.*\",name!=\"\"})",
"refId": "A"
}
],
@@ -186,7 +186,7 @@
},
"targets": [
{
"expr": "sum(rate(container_network_receive_bytes_total{name=~\"$container\",name!=\"\"}[5m])) + sum(rate(container_network_transmit_bytes_total{name=~\"$container\",name!=\"\"}[5m]))",
"expr": "sum(rate(container_network_receive_bytes_total{name=~\"$container|.*\",name!=\"\"}[5m])) + sum(rate(container_network_transmit_bytes_total{name=~\"$container|.*\",name!=\"\"}[5m]))",
"refId": "A"
}
],
@@ -244,7 +244,7 @@
},
"targets": [
{
"expr": "rate(container_cpu_usage_seconds_total{name=~\"$container\",name!=\"\"}[5m]) * 100",
"expr": "rate(container_cpu_usage_seconds_total{name=~\"$container|.*\",name!=\"\"}[5m]) * 100",
"legendFormat": "{{name}}",
"refId": "A"
}
@@ -297,7 +297,7 @@
},
"targets": [
{
"expr": "rate(container_cpu_usage_seconds_total{name=~\"$container\",name!=\"\"}[5m]) * 100",
"expr": "rate(container_cpu_usage_seconds_total{name=~\"$container|.*\",name!=\"\"}[5m]) * 100",
"legendFormat": "{{name}}",
"refId": "A"
}
@@ -356,7 +356,7 @@
},
"targets": [
{
"expr": "container_memory_usage_bytes{name=~\"$container\",name!=\"\"}",
"expr": "container_memory_usage_bytes{name=~\"$container|.*\",name!=\"\"}",
"legendFormat": "{{name}}",
"refId": "A"
}
@@ -409,7 +409,7 @@
},
"targets": [
{
"expr": "(container_memory_usage_bytes{name=~\"$container\",name!=\"\"} / container_spec_memory_limit_bytes{name=~\"$container\",name!=\"\"}) * 100",
"expr": "100 * (container_memory_usage_bytes{name=~\"$container|.*\",name!=\"\"} / container_spec_memory_limit_bytes{name=~\"$container|.*\",name!=\"\"}) and on(name) (container_spec_memory_limit_bytes{name=~\"$container|.*\",name!=\"\"} > 0)",
"legendFormat": "{{name}}",
"refId": "A"
}
@@ -468,7 +468,7 @@
},
"targets": [
{
"expr": "rate(container_network_receive_bytes_total{name=~\"$container\",name!=\"\"}[5m])",
"expr": "rate(container_network_receive_bytes_total{name=~\"$container|.*\",name!=\"\"}[5m])",
"legendFormat": "{{name}} - {{interface}}",
"refId": "A"
}
@@ -515,7 +515,7 @@
},
"targets": [
{
"expr": "rate(container_network_transmit_bytes_total{name=~\"$container\",name!=\"\"}[5m])",
"expr": "rate(container_network_transmit_bytes_total{name=~\"$container|.*\",name!=\"\"}[5m])",
"legendFormat": "{{name}} - {{interface}}",
"refId": "A"
}
@@ -574,7 +574,7 @@
},
"targets": [
{
"expr": "rate(container_fs_reads_bytes_total{name=~\"$container\",name!=\"\"}[5m])",
"expr": "rate(container_fs_reads_bytes_total{name=~\"$container|.*\",name!=\"\"}[5m])",
"legendFormat": "{{name}} - {{device}}",
"refId": "A"
}
@@ -621,7 +621,7 @@
},
"targets": [
{
"expr": "rate(container_fs_writes_bytes_total{name=~\"$container\",name!=\"\"}[5m])",
"expr": "rate(container_fs_writes_bytes_total{name=~\"$container|.*\",name!=\"\"}[5m])",
"legendFormat": "{{name}} - {{device}}",
"refId": "A"
}
@@ -770,35 +770,35 @@
},
"targets": [
{
"expr": "container_last_seen{name=~\"$container\",name!=\"\"}",
"expr": "container_last_seen{name=~\"$container|.*\",name!=\"\"}",
"format": "table",
"instant": true,
"legendFormat": "{{name}}",
"refId": "A"
},
{
"expr": "rate(container_cpu_usage_seconds_total{name=~\"$container\",name!=\"\"}[5m]) * 100",
"expr": "rate(container_cpu_usage_seconds_total{name=~\"$container|.*\",name!=\"\"}[5m]) * 100",
"format": "table",
"instant": true,
"legendFormat": "{{name}}",
"refId": "B"
},
{
"expr": "container_memory_usage_bytes{name=~\"$container\",name!=\"\"}",
"expr": "container_memory_usage_bytes{name=~\"$container|.*\",name!=\"\"}",
"format": "table",
"instant": true,
"legendFormat": "{{name}}",
"refId": "C"
},
{
"expr": "rate(container_network_receive_bytes_total{name=~\"$container\",name!=\"\"}[5m])",
"expr": "rate(container_network_receive_bytes_total{name=~\"$container|.*\",name!=\"\"}[5m])",
"format": "table",
"instant": true,
"legendFormat": "{{name}}",
"refId": "D"
},
{
"expr": "rate(container_network_transmit_bytes_total{name=~\"$container\",name!=\"\"}[5m])",
"expr": "rate(container_network_transmit_bytes_total{name=~\"$container|.*\",name!=\"\"}[5m])",
"format": "table",
"instant": true,
"legendFormat": "{{name}}",
@@ -858,9 +858,14 @@
"query": "label_values(container_last_seen{name!=\"\"},name)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"refresh": 2,
"sort": 1,
"type": "query"
"type": "query",
"current": {
"selected": true,
"text": "All",
"value": "$__all"
}
}
]
},

View File

@@ -16,7 +16,7 @@
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
@@ -169,7 +169,7 @@
{
"editorMode": "code",
"exemplar": false,
"expr": "irate(node_pressure_irq_stalled_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])",
"expr": "irate(node_pressure_irq_stalled_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]) or vector(0)",
"format": "time_series",
"instant": true,
"legendFormat": "Irq",
@@ -1963,7 +1963,7 @@
},
{
"editorMode": "code",
"expr": "sum by(instance) (irate(node_cpu_guest_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])) / on(instance) group_left sum by (instance)((irate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]))) \u003e 0",
"expr": "sum by(instance) (irate(node_cpu_guest_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])) / on(instance) group_left sum by (instance)((irate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]))) > 0",
"format": "time_series",
"legendFormat": "Guest CPU usage",
"range": true,
@@ -3392,7 +3392,7 @@
},
{
"editorMode": "code",
"expr": "rate(node_pressure_irq_stalled_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])",
"expr": "rate(node_pressure_irq_stalled_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]) or vector(0)",
"format": "time_series",
"legendFormat": "IRQ - Full",
"range": true,
@@ -4143,7 +4143,7 @@
"editorMode": "code",
"expr": "node_memory_Inactive_anon_bytes{instance=\"$node\",job=\"$job\"}",
"format": "time_series",
"legendFormat": "Inactive_anon Anonymous memory on inactive LRU (incl. tmpfs \u0026 swap cache)",
"legendFormat": "Inactive_anon Anonymous memory on inactive LRU (incl. tmpfs & swap cache)",
"range": true,
"refId": "B",
"step": 240
@@ -4161,7 +4161,7 @@
"editorMode": "code",
"expr": "node_memory_Active_anon_bytes{instance=\"$node\",job=\"$job\"}",
"format": "time_series",
"legendFormat": "Active_anon Anonymous memory on active LRU (incl. tmpfs \u0026 swap cache)",
"legendFormat": "Active_anon Anonymous memory on active LRU (incl. tmpfs & swap cache)",
"range": true,
"refId": "D",
"step": 240
@@ -15667,7 +15667,11 @@
"templating": {
"list": [
{
"current": {},
"current": {
"selected": true,
"text": "prometheus",
"value": "ff1qkncht70n4c"
},
"includeAll": false,
"label": "Datasource",
"name": "ds_prometheus",
@@ -15678,12 +15682,16 @@
"type": "datasource"
},
{
"current": {},
"current": {
"selected": true,
"text": "linux",
"value": "linux"
},
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"definition": "",
"definition": "label_values(node_uname_info, job)",
"includeAll": false,
"label": "Job",
"name": "job",
@@ -15698,7 +15706,11 @@
"type": "query"
},
{
"current": {},
"current": {
"selected": true,
"text": "armub",
"value": "armub"
},
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"
@@ -15718,7 +15730,11 @@
"type": "query"
},
{
"current": {},
"current": {
"selected": true,
"text": "192.168.50.4:9100",
"value": "192.168.50.4:9100"
},
"datasource": {
"type": "prometheus",
"uid": "${ds_prometheus}"

View File

@@ -185,7 +185,7 @@
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"expr": "sum(rate({service_name=\"proxy/traefik-access\"} |~ ` 2\\d{2} ` [5m]))",
"expr": "sum(rate({service_name=\"proxy/traefik-access\"} |~ ` 2\\d{2} ` [5m])) or vector(0)",
"legendFormat": "2xx 成功",
"refId": "A"
},
@@ -194,7 +194,7 @@
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"expr": "sum(rate({service_name=\"proxy/traefik-access\"} |~ ` 3\\d{2} ` [5m]))",
"expr": "sum(rate({service_name=\"proxy/traefik-access\"} |~ ` 3\\d{2} ` [5m])) or vector(0)",
"legendFormat": "3xx 重定向",
"refId": "B"
},
@@ -203,7 +203,7 @@
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"expr": "sum(rate({service_name=\"proxy/traefik-access\"} |~ ` 4\\d{2} ` [5m]))",
"expr": "sum(rate({service_name=\"proxy/traefik-access\"} |~ ` 4\\d{2} ` [5m])) or vector(0)",
"legendFormat": "4xx 用戶端錯誤",
"refId": "C"
},
@@ -212,7 +212,7 @@
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"expr": "sum(rate({service_name=\"proxy/traefik-access\"} |~ ` 5\\d{2} ` [5m]))",
"expr": "sum(rate({service_name=\"proxy/traefik-access\"} |~ ` 5\\d{2} ` [5m])) or vector(0)",
"legendFormat": "5xx 伺服器錯誤",
"refId": "D"
}
@@ -282,7 +282,7 @@
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"expr": "(sum(rate({service_name=\"proxy/traefik-access\"} |~ ` [45]\\d{2} ` [5m])) / sum(rate({service_name=\"proxy/traefik-access\"} [5m]))) * 100",
"expr": "(sum(rate({service_name=\"proxy/traefik-access\"} |~ ` [45]\\d{2} ` [5m])) / clamp_min(sum(rate({service_name=\"proxy/traefik-access\"} [5m])), 1e-9)) * 100",
"refId": "A"
}
],
@@ -414,11 +414,11 @@
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"expr": "{service_name=\"proxy/traefik-access\"} |~ ` [45]\\d{2} `",
"expr": "{service_name=\"proxy/traefik-access\"}",
"refId": "A"
}
],
"title": "🔝 錯誤請求 (4xx/5xx)",
"title": "🔝 最近請求 (Traefik Access)",
"type": "logs"
},
{

View File

@@ -16,7 +16,7 @@
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"name": "Annotations & Alerts",
"showIn": 0,
"type": "dashboard"
}
@@ -1219,7 +1219,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "sum by (client, name) (rate(adguard_processing_time_milliseconds_sum[$__rate_interval])) / sum by (client, name) (rate(adguard_processing_time_milliseconds_count[$__rate_interval]) \u003e 0)",
"expr": "sum by (client, name) (rate(adguard_processing_time_milliseconds_sum[$__rate_interval])) / sum by (client, name) (rate(adguard_processing_time_milliseconds_count[$__rate_interval]) > 0)",
"format": "time_series",
"hide": false,
"instant": false,
@@ -1695,7 +1695,11 @@
"templating": {
"list": [
{
"current": {},
"current": {
"selected": true,
"text": "http://192.168.20.6:80",
"value": "http://192.168.20.6:80"
},
"datasource": {
"type": "prometheus",
"uid": "ff1qkncht70n4c"

View File

@@ -0,0 +1,308 @@
{
"apiVersion": "dashboard.grafana.app/v1beta1",
"kind": "Dashboard",
"metadata": {
"name": "truenas-audit-overview"
},
"spec": {
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 5,
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"content": "# TrueNAS Audit Overview\n\nNative TrueNAS audit events from remote syslog, parsed in Alloy, and stored in Loki as `job=\"truenas_syslog\"`.\n\n[Open Audit Logs Panel](#/viewPanel=4)\n\n## Quick Checks\n```bash\n# dns host (receiver)\nsudo systemctl status alloy --no-pager\nsudo tail -n 50 /var/log/truenas/truenas-syslog.log\n\n# truenas host (sender)\nmidclt call system.advanced.config | jq '{syslogserver,syslog_transport,syslog_audit,syslog_tls_certificate,sed_user}'\n```\n",
"mode": "markdown"
},
"pluginVersion": "12.2.1",
"targets": [],
"title": "Status",
"type": "text"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": 0
},
{
"color": "orange",
"value": 1
},
{
"color": "red",
"value": 10
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 8,
"x": 0,
"y": 5
},
"id": 2,
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "12.2.1",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"expr": "sum(count_over_time({job=\\\"truenas_syslog\\\",host=~\\\"$host\\\",svc=~\\\"$svc\\\"}[5m]))",
"refId": "A"
}
],
"title": "Audit Related Events (5m)",
"type": "stat"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 20,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"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": 0
},
{
"color": "red",
"value": 1
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 16,
"x": 8,
"y": 5
},
"id": 3,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "12.2.1",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"expr": "sum(count_over_time({job=\\\"truenas_syslog\\\",host=~\\\"$host\\\",svc=~\\\"$svc\\\",success=\\\"false\\\"}[5m]))",
"legendFormat": "Failures",
"refId": "A"
},
{
"datasource": {
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"expr": "sum(count_over_time({job=\\\"truenas_syslog\\\",host=~\\\"$host\\\",svc=~\\\"SUDO|SYSTEM\\\"}[5m]))",
"legendFormat": "Privileged Actions",
"refId": "B"
}
],
"title": "Security Event Rates",
"type": "timeseries"
},
{
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 24,
"x": 0,
"y": 13
},
"id": 4,
"options": {
"showCommonLabels": false,
"showLabels": true,
"showTime": true,
"wrapLogMessage": true
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"expr": "{job=\\\"truenas_syslog\\\",host=~\\\"$host\\\",svc=~\\\"$svc\\\"}",
"refId": "A"
}
],
"title": "Audit / Security Logs",
"type": "logs"
}
],
"preload": false,
"refresh": "30s",
"schemaVersion": 42,
"tags": [
"truenas",
"audit",
"security",
"loki"
],
"templating": {
"list": [
{
"name": "host",
"type": "query",
"datasource": {
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"definition": "label_values({job=\"truenas_syslog\"}, host)",
"query": "label_values({job=\"truenas_syslog\"}, host)",
"refresh": 1,
"sort": 1,
"includeAll": true,
"allValue": ".*",
"multi": false,
"current": {
"text": "All",
"value": "$__all",
"selected": true
}
},
{
"name": "svc",
"type": "query",
"query": "label_values({job=\\\"truenas_syslog\\\",host=~\\\"$host\\\"}, svc)",
"includeAll": true,
"allValue": ".*",
"multi": false,
"current": {
"text": "All",
"value": "$__all",
"selected": true
},
"datasource": {
"type": "loki",
"uid": "ef1qnibjxb5z4a"
},
"definition": "label_values({job=\\\"truenas_syslog\\\",host=~\\\"$host\\\"}, svc)",
"refresh": 1,
"sort": 1
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "TrueNAS Audit Overview"
}
}

View File

@@ -16,7 +16,7 @@
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
@@ -178,7 +178,8 @@
"id": 280,
"panels": [],
"title": "Disk Utilization",
"type": "row"
"type": "row",
"targets": []
},
{
"datasource": {
@@ -243,7 +244,7 @@
"uid": "ff1qkncht70n4c"
},
"editorMode": "code",
"expr": "disk_utilization{instance=~\"$instance\"}",
"expr": "disk_busy{instance=~\"$instance\"}",
"instant": false,
"legendFormat": "{{disk}}",
"range": true,
@@ -345,7 +346,7 @@
"uid": "ff1qkncht70n4c"
},
"editorMode": "code",
"expr": "disk_utilization{instance=~\"$instance\"}",
"expr": "disk_busy{instance=~\"$instance\"}",
"instant": false,
"legendFormat": "{{disk}}",
"range": true,
@@ -366,7 +367,8 @@
"id": 255,
"panels": [],
"title": "Disk I/O",
"type": "row"
"type": "row",
"targets": []
},
{
"datasource": {
@@ -565,7 +567,7 @@
"uid": "ff1qkncht70n4c"
},
"editorMode": "code",
"expr": "abs(disk_iotime{instance=~\"$instance\", disk=~\"$disk\"})",
"expr": "abs(disk_busy{instance=~\"$instance\", disk=~\"$disk\"})",
"instant": false,
"legendFormat": "{{op}}",
"range": true,
@@ -689,7 +691,8 @@
"id": 296,
"panels": [],
"title": "Disk Other",
"type": "row"
"type": "row",
"targets": []
},
{
"datasource": {
@@ -784,9 +787,9 @@
"uid": "ff1qkncht70n4c"
},
"editorMode": "code",
"expr": "abs(disk_await{instance=~\"$instance\", disk=~\"$disk\"})",
"expr": "((1000 * sum by (disk) (disk_busy{instance=~\"$instance\", disk=~\"$disk\"})) / clamp_min(sum by (disk) (disk_io_ops{instance=~\"$instance\", disk=~\"$disk\"}), 0.001)) or on (disk) (0 * sum by (disk) (disk_busy{instance=~\"$instance\", disk=~\"$disk\"}))",
"instant": false,
"legendFormat": "{{op}}",
"legendFormat": "{{disk}}",
"range": true,
"refId": "A"
}
@@ -887,7 +890,7 @@
"uid": "ff1qkncht70n4c"
},
"editorMode": "code",
"expr": "disk_io_backlog{instance=~\"$instance\", disk=~\"$disk\"}",
"expr": "0 * disk_busy{instance=~\"$instance\", disk=~\"$disk\"}",
"instant": false,
"legendFormat": "backlog",
"range": true,
@@ -1003,7 +1006,7 @@
"uid": "ff1qkncht70n4c"
},
"editorMode": "code",
"expr": "disk_qops{instance=~\"$instance\", disk=~\"$disk\"}",
"expr": "sum by (disk) (disk_io_ops{instance=~\"$instance\", disk=~\"$disk\"})",
"instant": false,
"legendFormat": "value",
"range": true,
@@ -1106,7 +1109,7 @@
"uid": "ff1qkncht70n4c"
},
"editorMode": "code",
"expr": "abs(disk_io_size{instance=~\"$instance\", disk=~\"$disk\"})",
"expr": "(1024 * sum by (disk) (disk_io{instance=~\"$instance\", disk=~\"$disk\"})) / clamp_min(sum by (disk) (disk_io_ops{instance=~\"$instance\", disk=~\"$disk\"}), 0.001)",
"instant": false,
"legendFormat": "{{op}}",
"range": true,
@@ -1125,7 +1128,11 @@
"templating": {
"list": [
{
"current": {},
"current": {
"selected": true,
"text": "TrueNas",
"value": "TrueNas"
},
"datasource": {
"type": "prometheus",
"uid": "ff1qkncht70n4c"
@@ -1148,7 +1155,11 @@
"type": "query"
},
{
"current": {},
"current": {
"selected": true,
"text": "192.168.20.5:9108",
"value": "192.168.20.5:9108"
},
"datasource": {
"type": "prometheus",
"uid": "ff1qkncht70n4c"
@@ -1172,7 +1183,15 @@
},
{
"allValue": ".*",
"current": {},
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "prometheus",
"uid": "ff1qkncht70n4c"

View File

@@ -16,7 +16,7 @@
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
@@ -24,7 +24,13 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"links": [],
"links": [
{
"title": "Open Audit Dashboard",
"url": "/d/truenas-audit-overview/truenas-audit-overview",
"targetBlank": false
}
],
"panels": [
{
"datasource": {
@@ -181,7 +187,7 @@
}
]
},
"unit": "rotmhz"
"unit": "celsius"
},
"overrides": []
},
@@ -212,14 +218,14 @@
"uid": "ff1qkncht70n4c"
},
"editorMode": "code",
"expr": "cpu_frequency{instance=~\"$instance\", cpu=~\"$cpu\"}",
"expr": "cpu_temperature{instance=~\"$instance\", cpu=~\"$cpu\"}",
"instant": false,
"legendFormat": "{{cpu}}",
"range": true,
"refId": "A"
}
],
"title": "CPU frequency",
"title": "CPU temperature",
"type": "timeseries"
},
{
@@ -338,7 +344,7 @@
}
},
"mappings": [],
"unit": "mbytes"
"unit": "bytes"
},
"overrides": []
},
@@ -381,11 +387,23 @@
"uid": "ff1qkncht70n4c"
},
"editorMode": "code",
"expr": "physical_memory{instance=~\"$instance\"}",
"instant": false,
"legendFormat": "{{kind}}",
"range": true,
"expr": "(truenas_truenas_truenas_meminfo_total_total{instance=~\"$instance\"} - truenas_truenas_truenas_meminfo_available_available{instance=~\"$instance\"})",
"instant": true,
"legendFormat": "used",
"range": false,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "ff1qkncht70n4c"
},
"editorMode": "code",
"expr": "truenas_truenas_truenas_meminfo_available_available{instance=~\"$instance\"}",
"instant": true,
"legendFormat": "available",
"range": false,
"refId": "B"
}
],
"title": "Memory usage",
@@ -613,29 +631,19 @@
"fieldMinMax": false,
"mappings": [
{
"type": "value",
"options": {
"degraded": {
"color": "orange",
"0": {
"text": "down",
"color": "red",
"index": 0
},
"faulted": {
"color": "semi-dark-orange",
"1": {
"text": "up",
"color": "green",
"index": 1
},
"offline": {
"color": "text",
"index": 2
},
"removed": {
"color": "purple",
"index": 3
},
"unavail": {
"color": "red",
"index": 4
}
},
"type": "value"
}
}
],
"thresholds": {
@@ -681,15 +689,15 @@
"uid": "ff1qkncht70n4c"
},
"editorMode": "code",
"expr": "zfs_pool{instance=~\"$instance\"} \u003e 0",
"expr": "up{job=\"TrueNas\",instance=~\"$instance\"}",
"format": "table",
"instant": false,
"legendFormat": "{{pool}}",
"legendFormat": "{{instance}}",
"range": true,
"refId": "A"
}
],
"title": "Pool State",
"title": "TrueNAS Exporter State",
"transformations": [
{
"id": "groupingToMatrix",
@@ -1375,7 +1383,7 @@
"refId": "B"
}
],
"title": "Interrupts \u0026 Context switches",
"title": "Interrupts & Context switches",
"type": "timeseries"
}
],
@@ -2124,7 +2132,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "interface_duplex{instance=~\"$instance\", interface=~\"$interface\"} \u003e 0",
"expr": "interface_duplex{instance=~\"$instance\", interface=~\"$interface\"} > 0",
"format": "time_series",
"instant": false,
"legendFormat": "{{interface}} - {{state}}",
@@ -2223,7 +2231,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "interface_operationstate{instance=~\"$instance\", interface=~\"$interface\"} \u003e 0",
"expr": "interface_operationstate{instance=~\"$instance\", interface=~\"$interface\"} > 0",
"format": "time_series",
"instant": false,
"legendFormat": "{{interface}} - {{state}}",
@@ -2322,7 +2330,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "interface_carrierstate{instance=~\"$instance\", interface=~\"$interface\"} \u003e 0",
"expr": "interface_carrierstate{instance=~\"$instance\", interface=~\"$interface\"} > 0",
"format": "time_series",
"instant": false,
"legendFormat": "{{interface}} - {{state}}",
@@ -2421,7 +2429,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "interface_mtu{instance=~\"$instance\", interface=~\"$interface\"} \u003e 0",
"expr": "interface_mtu{instance=~\"$instance\", interface=~\"$interface\"} > 0",
"format": "time_series",
"instant": false,
"legendFormat": "{{interface}}",
@@ -2634,7 +2642,7 @@
"refId": "B"
}
],
"title": "Network errors \u0026 drops",
"title": "Network errors & drops",
"type": "timeseries"
}
],
@@ -5896,7 +5904,11 @@
"templating": {
"list": [
{
"current": {},
"current": {
"text": "prometheus",
"value": "ff1qkncht70n4c",
"selected": true
},
"label": "Data source",
"name": "DS_MIMIR",
"options": [],
@@ -5905,7 +5917,11 @@
"type": "datasource"
},
{
"current": {},
"current": {
"selected": true,
"text": "TrueNas",
"value": "TrueNas"
},
"datasource": {
"type": "prometheus",
"uid": "ff1qkncht70n4c"
@@ -5924,7 +5940,11 @@
"type": "query"
},
{
"current": {},
"current": {
"selected": true,
"text": "192.168.20.5:9108",
"value": "192.168.20.5:9108"
},
"datasource": {
"type": "prometheus",
"uid": "ff1qkncht70n4c"
@@ -5944,19 +5964,27 @@
},
{
"allValue": ".*",
"current": {},
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "prometheus",
"uid": "ff1qkncht70n4c"
},
"definition": "label_values(cpu_usage{instance=\"$instance\", job=\"$job\"},cpu)",
"definition": "label_values(cpu_temperature{instance=\"$instance\", job=\"$job\"},cpu)",
"includeAll": true,
"multi": true,
"name": "cpu",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(cpu_usage{instance=\"$instance\", job=\"$job\"},cpu)",
"query": "label_values(cpu_temperature{instance=\"$instance\", job=\"$job\"},cpu)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
@@ -5965,7 +5993,15 @@
},
{
"allValue": ".*",
"current": {},
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "prometheus",
"uid": "ff1qkncht70n4c"
@@ -5986,7 +6022,15 @@
},
{
"allValue": ".*",
"current": {},
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "prometheus",
"uid": "ff1qkncht70n4c"
@@ -6007,7 +6051,15 @@
},
{
"allValue": ".*",
"current": {},
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"definition": "label_values(services_cpu{instance=\"$instance\"},service)",
"includeAll": true,
"multi": true,

View File

@@ -16,7 +16,7 @@
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
@@ -111,7 +111,7 @@
"pluginVersion": "12.2.1",
"targets": [
{
"expr": "(\n sum(increase(unbound_cache_hits_total[15m])) +\n sum(increase(redis_keyspace_hits_total[15m]))\n)\n/\n(\n sum(increase(unbound_cache_hits_total[15m])) +\n sum(increase(unbound_cache_misses_total[15m])) +\n sum(increase(redis_keyspace_hits_total[15m])) +\n sum(increase(redis_keyspace_misses_total[15m]))\n)",
"expr": "(sum(rate(unbound_cache_hits_total[30m])) + sum(rate(redis_keyspace_hits_total[30m]))) / clamp_min((sum(rate(unbound_cache_hits_total[30m])) + sum(rate(unbound_cache_misses_total[30m])) + sum(rate(redis_keyspace_hits_total[30m])) + sum(rate(redis_keyspace_misses_total[30m]))), 1e-9)",
"refId": "A"
}
],
@@ -489,7 +489,7 @@
"pluginVersion": "12.2.1",
"targets": [
{
"expr": "redis_used_memory_bytes",
"expr": "redis_memory_used_bytes",
"legendFormat": "Used Memory",
"refId": "A"
},
@@ -504,7 +504,7 @@
"refId": "C"
}
],
"title": "Redis Memory \u0026 Key Turnover",
"title": "Redis Memory & Key Turnover",
"type": "timeseries"
},
{
@@ -1001,7 +1001,7 @@
{
"direction": "backward",
"editorMode": "code",
"expr": "topk(10, sum by (domain) (count_over_time({job=\"unbound\"} | pattern \"\u003c_\u003e \u003c_\u003e reply: \u003cclient\u003e \u003cdomain\u003e \u003cqtype\u003e \u003cclass\u003e \u003crcode\u003e \u003cduration\u003e \u003ccached\u003e \u003canswer_len\u003e\" [5m])))",
"expr": "topk(10, sum by (domain) (count_over_time({job=\"unbound\"} | pattern \"<_> <_> reply: <_> <domain> <_> <_> <_> <_> <_> <_>\" [5m])))",
"queryType": "instant",
"refId": "A"
}
@@ -1057,7 +1057,7 @@
"pluginVersion": "12.2.1",
"targets": [
{
"expr": "{job=\"unbound\"} | pattern \"\u003c_\u003e \u003c_\u003e reply: \u003cclient\u003e \u003cdomain\u003e \u003cqtype\u003e \u003cclass\u003e \u003crcode\u003e \u003cduration\u003e \u003ccached\u003e \u003canswer_len\u003e\"",
"expr": "{job=\"unbound\"} | pattern \"<_> <_> reply: <client> <domain> <qtype> <class> <rcode> <duration> <cached> <answer_len>\"",
"refId": "A"
}
],
@@ -1162,7 +1162,7 @@
"pluginVersion": "12.2.1",
"targets": [
{
"expr": "sum by (instance) (rate(unbound_cache_hits_total[5m])) /\n(\n sum by (instance) (rate(unbound_cache_hits_total[5m])) +\n sum by (instance) (rate(unbound_cache_misses_total[5m]))\n)",
"expr": "sum by (instance) (rate(unbound_cache_hits_total[30m])) / clamp_min((sum by (instance) (rate(unbound_cache_hits_total[30m])) + sum by (instance) (rate(unbound_cache_misses_total[30m]))), 1e-9)",
"legendFormat": "{{instance}}",
"refId": "A"
}
@@ -1587,7 +1587,7 @@
"refId": "B"
}
],
"title": "Unbound Process CPU \u0026 Memory",
"title": "Unbound Process CPU & Memory",
"type": "timeseries"
}
],

View File

@@ -24,7 +24,7 @@
},
"id": 1,
"options": {
"content": "# Home Overview\n\n## Grafana Dashboards\n\n### HomeLab\n- [AdGuard Home](/d/AdGuard-Home-Exporter/adguard-home-exporter)\n- [TrueNAS Disk Insight](/d/edlz616ehgmpsd/truenas-scale-disk-insight)\n- [TrueNAS Overview](/d/truenas-overview/truenas-scale-overview)\n- [Unbound Resolver](/d/6edd697a-1ab7-41b5-94d1-57e2b7121217/unbound-resolver-overview)\n- [VyOS Router](/d/9012547f-46a9-44d0-bbb0-a6e8d861fdd6/vyos-router)\n\n### GBarmUB\n- [CrowdSec Security](/d/270488bc-baf3-4db4-88a1-8c2e56ad84b8/crowdsec-security-dashboard-gbarmub)\n- [Docker Metrics](/d/b0ae5882-f3a7-45c5-a4da-21a4815f8ed0/docker-container-metrics)\n- [GBarmUB Node Exporter](/d/rYdddlPWk/gbarmub-node-exporter)\n- [Traefik Log Review](/d/63e74460-92b3-4886-86f2-1fe27c783ece/traefik-log-review-dashboard)\n- [Traefik Official](/d/gbwmrxv/traefik-official-standalone-dashboard)\n\n### Root\n- [Home Overview](/d/home-overview/home-overview)\n- [Prometheus Stats](/d/UDdpyzz7z/prometheus-2-0-stats)",
"content": "# Home Overview\n\n## Grafana Dashboards\n\n### HomeLab\n- [AdGuard Home](/d/AdGuard-Home-Exporter/adguard-home-exporter)\n- [TrueNAS Disk Insight](/d/edlz616ehgmpsd/truenas-scale-disk-insight)\n- [TrueNAS Overview](/d/truenas-overview/truenas-scale-overview)\n- [TrueNAS Audit](/d/truenas-audit-overview/truenas-audit-overview)\n- [Unbound Resolver](/d/6edd697a-1ab7-41b5-94d1-57e2b7121217/unbound-resolver-overview)\n- [VyOS Router](/d/9012547f-46a9-44d0-bbb0-a6e8d861fdd6/vyos-router)\n\n### GBarmUB\n- [CrowdSec Security](/d/270488bc-baf3-4db4-88a1-8c2e56ad84b8/crowdsec-security-dashboard-gbarmub)\n- [Docker Metrics](/d/b0ae5882-f3a7-45c5-a4da-21a4815f8ed0/docker-container-metrics)\n- [GBarmUB Node Exporter](/d/rYdddlPWk/gbarmub-node-exporter)\n- [Traefik Log Review](/d/63e74460-92b3-4886-86f2-1fe27c783ece/traefik-log-review-dashboard)\n- [Traefik Official](/d/gbwmrxv/traefik-official-standalone-dashboard)\n\n### Root\n- [Home Overview](/d/home-overview/home-overview)\n- [Prometheus Stats](/d/UDdpyzz7z/prometheus-2-0-stats)",
"mode": "markdown"
},
"pluginVersion": "12.1.1",