{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "datasource", "uid": "grafana" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "description": "Loki version 2 showcase using JSON Traefik access logs.", "editable": true, "fiscalYearStartMonth": 0, "gnetId": 13713, "graphTooltip": 0, "links": [], "panels": [ { "datasource": { "type": "loki", "uid": "loki" }, "description": "", "gridPos": { "h": 2, "w": 24, "x": 0, "y": 0 }, "id": 32, "interval": "", "options": { "code": { "language": "plaintext", "showLineNumbers": false, "showMiniMap": false }, "content": "
\n \n Traefik Dashboard\n
", "mode": "html" }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "expr": "loki_build_info", "format": "table", "instant": false, "interval": "", "legendFormat": "", "refId": "A" } ], "transparent": true, "type": "text" }, { "datasource": { "type": "loki", "uid": "loki" }, "description": "", "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "purple", "value": null } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 4, "w": 6, "x": 0, "y": 2 }, "id": 4, "interval": "1m", "options": { "colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "sum" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "value", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "editorMode": "code", "expr": "sum(count_over_time({namespace=\"traefik-system\"} |= \"RequestProtocol\" [$__interval]))", "legendFormat": "", "queryType": "range", "refId": "A" } ], "title": "Total requests ", "transparent": true, "type": "stat" }, { "datasource": { "type": "loki", "uid": "loki" }, "description": "", "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "light-blue", "value": null } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 8, "w": 9, "x": 6, "y": 2 }, "id": 5, "interval": "30s", "options": { "colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "sum" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "editorMode": "code", "expr": "sum by (OriginStatus) (count_over_time({namespace=\"traefik-system\"}|= \"RequestProtocol\" | json | __error__=\"\" [$__interval]))", "legendFormat": "HTTP Status: {{OriginStatus}}", "queryType": "range", "refId": "A" } ], "title": "Requests per status code", "transparent": true, "type": "stat" }, { "datasource": { "type": "loki", "uid": "loki" }, "description": "", "fieldConfig": { "defaults": { "mappings": [], "max": 100, "min": 0, "noValue": "0", "thresholds": { "mode": "absolute", "steps": [ { "color": "purple", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 4, "w": 4, "x": 15, "y": 2 }, "id": 19, "interval": "5m", "maxDataPoints": 1, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": [ "mean" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "value", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "expr": " sum(rate({namespace=\"traefik-system\"} |~ \"RequestProtocol\" | json | OriginStatus >= 400 |__error__=\"\"[$__interval])) / (sum(rate({namespace=\"traefik-system\"} |~ \"RequestProtocol\" | json | __error__=\"\"[$__interval])) / 100)", "legendFormat": "", "refId": "A" } ], "title": "% of 4/5xx ", "transparent": true, "type": "stat" }, { "datasource": { "type": "loki", "uid": "loki" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "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" } }, "decimals": 0, "mappings": [], "min": 0, "noValue": "0", "thresholds": { "mode": "absolute", "steps": [ { "color": "purple", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "none" }, "overrides": [ { "matcher": { "id": "byValue", "options": { "op": "gte", "reducer": "allIsZero", "value": 0 } }, "properties": [ { "id": "custom.hideFrom", "value": { "legend": true, "tooltip": true, "viz": false } } ] }, { "matcher": { "id": "byValue", "options": { "op": "gte", "reducer": "allIsNull", "value": 0 } }, "properties": [ { "id": "custom.hideFrom", "value": { "legend": true, "tooltip": true, "viz": false } } ] }, { "matcher": { "id": "byType", "options": "time" }, "properties": [ { "id": "custom.axisPlacement", "value": "hidden" } ] } ] }, "gridPos": { "h": 4, "w": 5, "x": 19, "y": 2 }, "id": 36, "interval": "1m", "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": false }, "tooltip": { "maxHeight": 600, "mode": "multi", "sort": "none" } }, "pluginVersion": "7.3.6", "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "expr": " sum by (OriginStatus,ServiceName) (count_over_time({namespace=\"traefik-system\"} |~ \"RequestProtocol\" | json | OriginStatus >= 400 |__error__=\"\"[$__interval]))", "legendFormat": " {{ServiceName}} / {{OriginStatus}} ", "refId": "A" } ], "title": " 4/5xx Services", "transparent": true, "type": "timeseries" }, { "datasource": { "type": "loki", "uid": "loki" }, "description": "", "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "purple", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 4, "w": 6, "x": 0, "y": 6 }, "id": 22, "interval": "5m", "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "mean" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "value", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "expr": "count(sum by (ClientHost) (count_over_time({namespace=\"traefik-system\"}|= \"RequestProtocol\" | json | __error__=\"\" [$__interval])))", "legendFormat": "", "refId": "A" } ], "title": "Users right now", "transparent": true, "type": "stat" }, { "datasource": { "type": "loki", "uid": "loki" }, "description": "", "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "purple", "value": null } ] }, "unit": "decbytes" }, "overrides": [] }, "gridPos": { "h": 4, "w": 9, "x": 15, "y": 6 }, "id": 8, "interval": "1m", "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": [ "sum" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "value", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "expr": "sum_over_time({namespace=\"traefik-system\"}|= \"RequestProtocol\" | json | OriginStatus=200 | unwrap DownstreamContentSize | __error__=\"\" [$__interval])", "legendFormat": "Bytes sent", "refId": "A" } ], "title": "Total Bytes Sent", "transformations": [ { "id": "reduce", "options": { "reducers": [ "sum" ] } }, { "id": "organize", "options": { "excludeByName": {}, "indexByName": {}, "renameByName": { "Total": "Bytes Sent" } } } ], "transparent": true, "type": "stat" }, { "datasource": { "type": "loki", "uid": "loki" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "decimals": 0, "mappings": [], "unit": "short" }, "overrides": [] }, "gridPos": { "h": 8, "w": 8, "x": 0, "y": 10 }, "id": 33, "interval": "5m", "maxDataPoints": 3, "options": { "legend": { "calcs": [], "displayMode": "table", "placement": "right", "showLegend": true, "values": [ "value", "percent" ] }, "pieType": "pie", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "maxHeight": 600, "mode": "single", "sort": "none" } }, "pluginVersion": "7.3.4", "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "expr": "sum by (RouterName) (count_over_time({namespace=\"traefik-system\"}|= \"RequestProtocol\" | json | __error__=\"\" [$__interval]))", "legendFormat": "{{RouterName}}", "refId": "A" } ], "title": "Requests Route", "transparent": true, "type": "piechart" }, { "datasource": { "type": "tempo", "uid": "tempo" }, "gridPos": { "h": 17, "w": 16, "x": 8, "y": 10 }, "id": 37, "options": { "edges": {}, "nodes": {} }, "targets": [ { "datasource": { "type": "tempo", "uid": "tempo" }, "limit": 20, "queryType": "serviceMap", "refId": "A", "tableType": "traces" } ], "title": "Service graph", "type": "nodeGraph" }, { "datasource": { "type": "loki", "uid": "loki" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 90, "gradientMode": "opacity", "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": "line+area" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "transparent", "value": null }, { "color": "red", "value": 0.3 } ] }, "unit": "ns" }, "overrides": [ { "matcher": { "id": "byName", "options": "95th percentile" }, "properties": [ { "id": "color", "value": { "fixedColor": "blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "max latency" }, "properties": [ { "id": "color", "value": { "fixedColor": "super-light-blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "max latency" }, "properties": [ { "id": "custom.fillOpacity", "value": 30 }, { "id": "custom.lineStyle", "value": { "dash": [ 10, 10 ], "fill": "dash" } } ] } ] }, "gridPos": { "h": 9, "w": 8, "x": 0, "y": 18 }, "id": 16, "interval": "30s", "options": { "legend": { "calcs": [ "max" ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "maxHeight": 600, "mode": "multi", "sort": "none" } }, "pluginVersion": "7.3.6", "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "expr": "quantile_over_time(0.95,{namespace=\"traefik-system\"} |= \"RequestProtocol\"| json | unwrap Duration | __error__=\"\" [$__interval]) by (ServiceName)", "hide": false, "legendFormat": " {{ ServiceName }}", "refId": "C" } ], "title": "95th percentile of Request Time", "transparent": true, "type": "timeseries" }, { "datasource": { "type": "loki", "uid": "loki" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 90, "gradientMode": "opacity", "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": "line+area" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "transparent", "value": null }, { "color": "red", "value": 0.3 } ] }, "unit": "ns" }, "overrides": [ { "matcher": { "id": "byName", "options": "95th percentile" }, "properties": [ { "id": "color", "value": { "fixedColor": "blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "max latency" }, "properties": [ { "id": "color", "value": { "fixedColor": "super-light-blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "max latency" }, "properties": [ { "id": "custom.fillOpacity", "value": 30 }, { "id": "custom.lineStyle", "value": { "dash": [ 10, 10 ], "fill": "dash" } } ] } ] }, "gridPos": { "h": 9, "w": 8, "x": 0, "y": 27 }, "id": 34, "interval": "30s", "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "maxHeight": 600, "mode": "multi", "sort": "none" } }, "pluginVersion": "7.3.6", "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "expr": "max by (ServiceName) (max_over_time({namespace=\"traefik-system\"} |= \"RequestProtocol\" |json | unwrap Duration | __error__=\"\" [$__interval]))", "hide": false, "legendFormat": "{{ ServiceName}}", "refId": "D" } ], "title": "Max Age of Request Time", "transparent": true, "type": "timeseries" }, { "datasource": { "type": "loki", "uid": "loki" }, "gridPos": { "h": 16, "w": 16, "x": 8, "y": 27 }, "id": 11, "interval": "", "options": { "dedupStrategy": "none", "enableLogDetails": true, "prettifyLogMessage": false, "showCommonLabels": false, "showLabels": false, "showTime": true, "sortOrder": "Descending", "wrapLogMessage": false }, "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "expr": "{namespace=\"traefik-system\"} |= \"RequestProtocol\" | json | line_format \"{{.OriginStatus}} {{.RequestMethod}} {{.RequestAddr}}{{.RequestPath}} -> {{.ServiceAddr}}\"", "legendFormat": "", "refId": "A" } ], "title": "Logs", "transparent": true, "type": "logs" }, { "datasource": { "type": "loki", "uid": "loki" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 90, "gradientMode": "opacity", "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": "line+area" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "transparent", "value": null }, { "color": "red", "value": 0.3 } ] }, "unit": "decbytes" }, "overrides": [ { "matcher": { "id": "byName", "options": "95th percentile" }, "properties": [ { "id": "color", "value": { "fixedColor": "blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "max latency" }, "properties": [ { "id": "color", "value": { "fixedColor": "super-light-blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "max latency" }, "properties": [ { "id": "custom.fillOpacity", "value": 30 }, { "id": "custom.lineStyle", "value": { "dash": [ 10, 10 ], "fill": "dash" } } ] } ] }, "gridPos": { "h": 9, "w": 8, "x": 0, "y": 36 }, "id": 35, "interval": "30s", "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "maxHeight": 600, "mode": "multi", "sort": "none" } }, "pluginVersion": "7.3.6", "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "expr": "sum by (ServiceName) (sum_over_time({namespace=\"traefik-system\"} |= \"RequestProtocol\" |json | unwrap RequestContentSize | __error__=\"\" [$__interval]))", "hide": false, "legendFormat": "{{ ServiceName}}", "refId": "D" } ], "title": "Requests Size", "transparent": true, "type": "timeseries" } ], "refresh": false, "schemaVersion": 39, "tags": [], "templating": { "list": [] }, "time": { "from": "now-12h", "to": "now" }, "timeRangeUpdatedDuringEditOrView": false, "timepicker": { "refresh_intervals": [ "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ] }, "timezone": "", "title": "Traefik Via Loki", "uid": "fJarCeaGk", "version": 1, "weekStart": "" }