{ "apiVersion": "dashboard.grafana.app/v2", "kind": "Dashboard", "metadata": { "name": "eacad119-069c-4ce7-a895-c67287d64c91", "generation": 3, "creationTimestamp": "2026-08-07T17:01:57Z", "labels": {}, "annotations": {} }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana", "version": "v0", "spec": {} }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "builtIn": true } } ], "cursorSync": "Off", "description": "Loki dashboard for quick search and timeline for Docker logs.", "editable": true, "elements": { "panel-6": { "kind": "Panel", "spec": { "id": 6, "title": "Timeline", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "loki", "version": "v0", "spec": { "direction": "backward", "editorMode": "code", "expr": "sum(\r\n count_over_time(\r\n {hostname=~\"$Hostname\",composeProject=~\"$ComposeProject\",containerName=~\"$ContainerName\",stream=~\"$Stream\"}\r\n |~ \"(?i)$Search\"[$__interval]\r\n )\r\n) ", "queryType": "range" } }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "timeseries", "version": "13.1.0", "spec": { "options": { "annotations": { "clustering": -1, "multiLane": false }, "dataLinks": [], "legend": { "calcs": [], "displayMode": "list", "enableFacetedFilter": false, "overflow": "ellipsis", "placement": "bottom", "showLegend": false }, "tooltip": { "hideZeros": false, "mode": "multi", "sort": "none" } }, "fieldConfig": { "defaults": { "unit": "short", "thresholds": { "mode": "absolute", "steps": [ { "value": 0, "color": "green" }, { "value": 80, "color": "red" } ] }, "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "hidden", "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "bars", "fillOpacity": 100, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "showValues": false, "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } } }, "overrides": [] } } } } }, "panel-7": { "kind": "Panel", "spec": { "id": 7, "title": "Logs", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "DataQuery", "group": "loki", "version": "v0", "spec": { "direction": "backward", "editorMode": "code", "expr": "{hostname=~\"$Hostname\",composeProject=~\"$ComposeProject\",containerName=~\"$ContainerName\",stream=~\"$Stream\"}\r\n| json\r\n| logfmt\r\n| drop __error__\r\n|~ \"(?i)$Search\"\r\n| pattern ``\r\n| label_format serviceName=\"{{if .composeService}}[{{.composeProject}}] {{.composeService}}{{else}}{{.containerName}}{{end}}\"\r\n| line_format \"\\x1b[36m{{ alignLeft 30 .serviceName }}\\x1b[0m {{.raw_text}}\"", "legendFormat": "", "queryType": "range" } }, "refId": "B", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "VizConfig", "group": "logs", "version": "13.1.0", "spec": { "options": { "annotations": { "clustering": -1, "multiLane": true }, "dedupStrategy": "none", "enableInfiniteScrolling": false, "enableLogDetails": true, "legend": { "calcs": [ "sum" ], "displayMode": "list", "enableFacetedFilter": false, "overflow": "ellipsis", "placement": "bottom", "showLegend": true }, "prettifyLogMessage": true, "showControls": false, "showFieldSelector": false, "showLevel": true, "showTime": false, "sortOrder": "Descending", "timestampResolution": "ms", "tooltip": { "hideZeros": false, "mode": "single", "sort": "none" }, "unwrappedColumns": false, "wrapLogMessage": false }, "fieldConfig": { "defaults": {}, "overrides": [ { "matcher": { "id": "byRegexp", "options": "/^(info|information)$/i" }, "properties": [] }, { "matcher": { "id": "byRegexp", "options": "/^debug$/i" }, "properties": [] }, { "matcher": { "id": "byRegexp", "options": "/^(warn|warning)$/i" }, "properties": [] }, { "matcher": { "id": "byRegexp", "options": "/^(error|errors)$/i" }, "properties": [] }, { "matcher": { "id": "byRegexp", "options": "/^(crit|critical|fatal|severe)$/i" }, "properties": [] }, { "matcher": { "id": "byRegexp", "options": "/^(logs|unknown)$/i" }, "properties": [] } ] } } } } } }, "layout": { "kind": "GridLayout", "spec": { "items": [ { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 0, "width": 24, "height": 3, "element": { "kind": "ElementReference", "name": "panel-6" } } }, { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 3, "width": 24, "height": 30, "element": { "kind": "ElementReference", "name": "panel-7" } } } ] } }, "links": [ { "title": "GitHub", "type": "link", "icon": "external link", "tooltip": "", "url": "https://github.com/Lifailon/logporter", "tags": [], "asDropdown": true, "targetBlank": true, "includeVars": false, "keepTime": false }, { "title": "Docker Hub", "type": "link", "icon": "external link", "tooltip": "", "url": "https://hub.docker.com/r/lifailon/logporter", "tags": [], "asDropdown": true, "targetBlank": true, "includeVars": false, "keepTime": false } ], "liveNow": false, "preload": false, "tags": [ "Docker" ], "timeSettings": { "timezone": "browser", "from": "now-30m", "to": "now", "autoRefresh": "", "autoRefreshIntervals": [ "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "hideTimepicker": false, "fiscalYearStartMonth": 0 }, "title": "Docker Logs", "variables": [ { "kind": "TextVariable", "spec": { "name": "Search", "current": { "text": "", "value": "" }, "query": "", "hide": "dontHide", "skipUrlSync": false } }, { "kind": "QueryVariable", "spec": { "name": "Hostname", "current": { "text": "", "value": "" }, "label": "", "hide": "dontHide", "refresh": "onDashboardLoad", "skipUrlSync": false, "description": "", "query": { "kind": "DataQuery", "group": "prometheus", "version": "v0", "spec": { "qryType": 1, "query": "label_values(docker_cpu_usage_total,hostname)", "refId": "PrometheusVariableQueryEditor-VariableQuery" } }, "regex": "", "regexApplyTo": "value", "sort": "disabled", "definition": "label_values(docker_cpu_usage_total,hostname)", "options": [], "multi": true, "includeAll": false, "allowCustomValue": false } }, { "kind": "QueryVariable", "spec": { "name": "ComposeProject", "current": { "text": "", "value": "" }, "label": "", "hide": "dontHide", "refresh": "onDashboardLoad", "skipUrlSync": false, "description": "", "query": { "kind": "DataQuery", "group": "prometheus", "version": "v0", "spec": { "qryType": 1, "query": "label_values(docker_cpu_usage_total{hostname=~\"$Hostname\"},composeProject)", "refId": "PrometheusVariableQueryEditor-VariableQuery" } }, "regex": "", "regexApplyTo": "value", "sort": "disabled", "definition": "label_values(docker_cpu_usage_total{hostname=~\"$Hostname\"},composeProject)", "options": [], "multi": true, "includeAll": false, "allowCustomValue": false } }, { "kind": "QueryVariable", "spec": { "name": "ContainerName", "current": { "text": "", "value": "" }, "label": "", "hide": "dontHide", "refresh": "onDashboardLoad", "skipUrlSync": false, "description": "", "query": { "kind": "DataQuery", "group": "prometheus", "version": "v0", "spec": { "qryType": 1, "query": "label_values(docker_cpu_usage_total{hostname=~\"$Hostname\"},containerName)", "refId": "PrometheusVariableQueryEditor-VariableQuery" } }, "regex": "", "regexApplyTo": "value", "sort": "disabled", "definition": "label_values(docker_cpu_usage_total{hostname=~\"$Hostname\"},containerName)", "options": [], "multi": true, "includeAll": false, "allowCustomValue": false } }, { "kind": "CustomVariable", "spec": { "name": "Stream", "query": "stdout,stderr", "current": { "text": [ "stdout", "stderr" ], "value": [ "stdout", "stderr" ] }, "options": [], "multi": true, "includeAll": false, "label": "Stream", "hide": "dontHide", "skipUrlSync": false, "allowCustomValue": false, "valuesFormat": "csv" } } ] } }