Add Loki Alloy logging baseline

This commit is contained in:
2026-05-16 13:26:49 +02:00
parent 5ada1ad153
commit a5add937f8
17 changed files with 330 additions and 5 deletions
@@ -0,0 +1,23 @@
{
"uid": "kallilab-container-error-rate",
"title": "Container Error Rate",
"schemaVersion": 39,
"version": 1,
"refresh": "5m",
"time": { "from": "now-24h", "to": "now" },
"panels": [
{
"id": 1,
"type": "table",
"title": "Container Errors Last 24h",
"datasource": { "type": "loki", "uid": "loki" },
"targets": [
{
"refId": "A",
"expr": "sum by (container_name) (count_over_time({platform=\"docker\"} |~ \"(?i)(level=error|error|fatal|panic)\" [24h]))"
}
],
"gridPos": { "h": 16, "w": 24, "x": 0, "y": 0 }
}
]
}
@@ -0,0 +1,43 @@
{
"uid": "kallilab-logs-last-60m",
"title": "Last 60 min before now",
"schemaVersion": 39,
"version": 1,
"refresh": "30s",
"time": { "from": "now-60m", "to": "now" },
"templating": {
"list": [
{
"name": "container",
"type": "query",
"datasource": { "type": "loki", "uid": "loki" },
"query": "label_values(container_name)",
"includeAll": true,
"allValue": ".+",
"refresh": 1
}
]
},
"panels": [
{
"id": 1,
"type": "logs",
"title": "Docker Log Stream",
"datasource": { "type": "loki", "uid": "loki" },
"targets": [
{
"refId": "A",
"expr": "{platform=\"docker\", container_name=~\"$container\"}"
}
],
"gridPos": { "h": 20, "w": 24, "x": 0, "y": 0 },
"options": {
"showTime": true,
"showLabels": true,
"wrapLogMessage": false,
"enableLogDetails": true,
"sortOrder": "Descending"
}
}
]
}
@@ -0,0 +1,12 @@
apiVersion: 1
providers:
- name: KalliLab Observability
orgId: 1
folder: KalliLab Observability
type: file
disableDeletion: false
updateIntervalSeconds: 60
allowUiUpdates: false
options:
path: /etc/grafana/provisioning/dashboards
@@ -0,0 +1,23 @@
{
"uid": "kallilab-restart-events",
"title": "Restart Events",
"schemaVersion": 39,
"version": 1,
"refresh": "5m",
"time": { "from": "now-24h", "to": "now" },
"panels": [
{
"id": 1,
"type": "heatmap",
"title": "Restart-like Log Events",
"datasource": { "type": "loki", "uid": "loki" },
"targets": [
{
"refId": "A",
"expr": "sum by (container_name) (count_over_time({platform=\"docker\"} |~ \"(?i)(restart|restarting|started|exited|oom)\" [5m]))"
}
],
"gridPos": { "h": 16, "w": 24, "x": 0, "y": 0 }
}
]
}