{ "annotations": { "list": [ { "builtIn": 1, "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" }, { "enable": true, "expr": "{job=\"flogs\"} | json | bytes > 29900", "hide": false, "iconColor": "red", "name": "Show Large Requests", "target": {} } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 1, "iteration": 1648254271582, "links": [], "liveNow": false, "panels": [ { "gridPos": { "h": 6, "w": 12, "x": 0, "y": 0 }, "id": 2, "options": { "dedupStrategy": "none", "enableLogDetails": true, "prettifyLogMessage": false, "showCommonLabels": false, "showLabels": false, "showTime": false, "sortOrder": "Descending", "wrapLogMessage": false }, "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "{job=\"flogs\"}", "refId": "A" } ], "title": "Logs", "transparent": true, "type": "logs" }, { "gridPos": { "h": 6, "w": 12, "x": 12, "y": 0 }, "id": 8, "options": { "dedupStrategy": "none", "enableLogDetails": true, "prettifyLogMessage": false, "showCommonLabels": false, "showLabels": false, "showTime": false, "sortOrder": "Descending", "wrapLogMessage": false }, "pluginVersion": "8.4.2", "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "{job=\"flogs\"} | json | line_format \"{{ .method }} {{ .request }} 👉 {{ .status }} by {{ .user_identifier }} ({{div .bytes 1000}} kb)\" ", "refId": "A" } ], "title": "Simplified logs", "transparent": true, "type": "logs" }, { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "decbytes" }, "overrides": [] }, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 6 }, "id": 6, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "max_over_time({job=\"flogs\"} | json | unwrap bytes[5m]) by (status)", "legendFormat": "{{status}}", "refId": "A" } ], "title": "Max size per HTTP status", "transparent": true, "type": "timeseries" }, { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "decbytes" }, "overrides": [] }, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 6 }, "id": 4, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "max_over_time({job=\"flogs\"} | json | unwrap bytes[5m]) by (method)", "legendFormat": "{{method}}", "refId": "A" } ], "title": "Max size per HTTP method", "transparent": true, "type": "timeseries" }, { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "mappings": [] }, "overrides": [] }, "gridPos": { "h": 6, "w": 7, "x": 0, "y": 12 }, "id": 5, "options": { "displayLabels": [], "legend": { "displayMode": "list", "placement": "bottom", "values": [ "value", "percent" ] }, "pieType": "pie", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "sum by (method) (count_over_time({job=\"flogs\"} | json [5m]))", "legendFormat": "{{method}}", "queryType": "range", "refId": "A" } ], "title": "Distribution by method", "transparent": true, "type": "piechart" }, { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "mappings": [] }, "overrides": [] }, "gridPos": { "h": 6, "w": 7, "x": 8, "y": 12 }, "id": 7, "options": { "displayLabels": [], "legend": { "displayMode": "list", "placement": "bottom", "values": [ "value", "percent" ] }, "pieType": "pie", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "sum by (status) (count_over_time({job=\"flogs\"} | json [5m]))", "legendFormat": "{{status}}", "queryType": "range", "refId": "A" } ], "title": "Distribution by status", "transparent": true, "type": "piechart" }, { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "mappings": [] }, "overrides": [] }, "gridPos": { "h": 6, "w": 7, "x": 15, "y": 12 }, "id": 13, "options": { "displayLabels": [], "legend": { "displayMode": "list", "placement": "bottom", "values": [ "value", "percent" ] }, "pieType": "pie", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "sum by (protocol) (count_over_time({job=\"flogs\"} | json [5m]))", "legendFormat": "{{protocol}}", "queryType": "range", "refId": "A" } ], "title": "Distribution by protocol", "transparent": true, "type": "piechart" }, { "fieldConfig": { "defaults": { "color": { "mode": "continuous-BlYlRd" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "percentunit" }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 0, "y": 18 }, "id": 12, "options": { "colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.2", "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "sum(count_over_time({job=\"flogs\"} | json | user_identifier != \"-\" [5m])) / sum(count_over_time({job=\"flogs\"} [5m]))", "queryType": "range", "refId": "A" } ], "title": "Identified requests (5m)", "transparent": true, "type": "stat" }, { "fieldConfig": { "defaults": { "color": { "mode": "continuous-BlPu" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 4, "y": 18 }, "id": 9, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.2", "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "sum(count_over_time({job=\"flogs\"} | json | bytes > 10000[5m])) / sum(count_over_time({job=\"flogs\"} | json [5m])) * 100", "queryType": "range", "refId": "A" } ], "title": "> 10kb (5m)", "transparent": true, "type": "stat" }, { "fieldConfig": { "defaults": { "color": { "mode": "continuous-BlPu" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 8, "y": 18 }, "id": 10, "options": { "colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.2", "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "count_over_time({job=\"flogs\"}[5m])", "queryType": "range", "refId": "A" } ], "title": "Total lines (5m)", "transparent": true, "type": "stat" }, { "fieldConfig": { "defaults": { "color": { "mode": "continuous-BlPu" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "/s" }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 12, "y": 18 }, "id": 18, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.2", "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "rate({job=\"flogs\"}[5m])", "queryType": "range", "refId": "A" } ], "title": "Lines/sec (5m)", "transparent": true, "type": "stat" }, { "fieldConfig": { "defaults": { "color": { "mode": "continuous-YlBl" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "decbytes" }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 16, "y": 18 }, "id": 11, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.2", "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "max(max_over_time({job=\"flogs\"} | json | unwrap bytes[5m]))", "queryType": "range", "refId": "A" } ], "title": "Largest request body (5m)", "transparent": true, "type": "stat" }, { "fieldConfig": { "defaults": { "color": { "mode": "continuous-BlPu" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "binBps" }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 20, "y": 18 }, "id": 19, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "8.4.2", "targets": [ { "datasource": { "type": "loki", "uid": "P8E80F9AEF21F6940" }, "expr": "bytes_rate({job=\"flogs\"}[5m])", "queryType": "range", "refId": "A" } ], "title": "Bytes/sec (5m)", "transparent": true, "type": "stat" } ], "refresh": "", "schemaVersion": 35, "style": "dark", "tags": [], "templating": { "list": [ { "current": { "selected": false, "text": "flogs", "value": "flogs" }, "definition": "label_values(job)", "hide": 0, "includeAll": false, "multi": false, "name": "job", "options": [], "query": "label_values(job)", "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" } ] }, "time": { "from": "now-5m", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Loki flog example", "uid": "_JSEbzL7z", "version": 14, "weekStart": "" }