All checks were successful
Run nix flake check / flake-check (push) Successful in 2m3s
- Change default OIDC role from Viewer to Editor for Explore access - Add declarative dashboard provisioning - Add node-exporter dashboard (CPU, memory, disk, load, network, I/O) - Add Loki logs dashboard with host/job filters Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
86 lines
2.1 KiB
JSON
86 lines
2.1 KiB
JSON
{
|
|
"uid": "logs-homelab",
|
|
"title": "Logs - Homelab",
|
|
"tags": ["loki", "logs", "homelab"],
|
|
"timezone": "browser",
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"refresh": "30s",
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"name": "host",
|
|
"type": "query",
|
|
"datasource": {"type": "loki", "uid": "loki"},
|
|
"query": "label_values(host)",
|
|
"refresh": 2,
|
|
"includeAll": true,
|
|
"multi": false,
|
|
"current": {"text": "All", "value": "$__all"}
|
|
},
|
|
{
|
|
"name": "job",
|
|
"type": "query",
|
|
"datasource": {"type": "loki", "uid": "loki"},
|
|
"query": "label_values(job)",
|
|
"refresh": 2,
|
|
"includeAll": true,
|
|
"multi": false,
|
|
"current": {"text": "All", "value": "$__all"}
|
|
},
|
|
{
|
|
"name": "search",
|
|
"type": "textbox",
|
|
"current": {"text": "", "value": ""},
|
|
"label": "Search"
|
|
}
|
|
]
|
|
},
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"title": "Log Volume",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 6, "w": 24, "x": 0, "y": 0},
|
|
"datasource": {"type": "loki", "uid": "loki"},
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (host) (count_over_time({host=~\"$host\", job=~\"$job\"} |~ \"$search\" [1m]))",
|
|
"legendFormat": "{{host}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"options": {
|
|
"legend": {"displayMode": "list", "placement": "bottom"}
|
|
}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"title": "Logs",
|
|
"type": "logs",
|
|
"gridPos": {"h": 18, "w": 24, "x": 0, "y": 6},
|
|
"datasource": {"type": "loki", "uid": "loki"},
|
|
"targets": [
|
|
{
|
|
"expr": "{host=~\"$host\", job=~\"$job\"} |~ \"$search\"",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"options": {
|
|
"showTime": true,
|
|
"showLabels": true,
|
|
"showCommonLabels": false,
|
|
"wrapLogMessage": true,
|
|
"prettifyLogMessage": false,
|
|
"enableLogDetails": true,
|
|
"sortOrder": "Descending"
|
|
}
|
|
}
|
|
]
|
|
}
|