{ "apiVersion": "dashboard.grafana.app/v2", "kind": "Dashboard", "metadata": { "name": "admltw2" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "builtIn": true, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "query": { "datasource": { "name": "-- Grafana --" }, "group": "grafana", "kind": "DataQuery", "spec": {}, "version": "v0" } } } ], "cursorSync": "Off", "editable": true, "elements": { "panel-1": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "bfkfq6kdpznr4e" }, "group": "loki", "kind": "DataQuery", "spec": { "direction": "backward", "editorMode": "builder", "expr": "{host=\"beepi\", filename=\"/var/log/ufw.log\"} |= `[UFW BLOCK]` | detected_level != `info`", "queryType": "range" }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [] } }, "description": "", "id": 1, "links": [], "title": "UFW Blocks", "vizConfig": { "group": "logs", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": {}, "overrides": [] }, "options": { "dedupStrategy": "numbers", "enableInfiniteScrolling": false, "enableLogDetails": true, "prettifyLogMessage": true, "showControls": false, "showFieldSelector": false, "showLabels": false, "showLevel": true, "showTime": true, "sortOrder": "Descending", "syntaxHighlighting": true, "timestampResolution": "ms", "unwrappedColumns": false, "wrapLogMessage": false } }, "version": "13.0.1" } } }, "panel-2": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "bfkfq6kdpznr4e" }, "group": "loki", "kind": "DataQuery", "spec": { "direction": "backward", "editorMode": "builder", "expr": "{filename=\"/var/log/fail2ban.log\"} |= `NOTICE`", "queryType": "range" }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [] } }, "description": "", "id": 2, "links": [], "title": "Fail2Ban bans", "vizConfig": { "group": "logs", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": {}, "overrides": [] }, "options": { "dedupStrategy": "none", "enableInfiniteScrolling": false, "enableLogDetails": true, "prettifyLogMessage": true, "showControls": false, "showFieldSelector": false, "showLabels": false, "showLevel": true, "showTime": false, "sortOrder": "Descending", "timestampResolution": "ms", "unwrappedColumns": false, "wrapLogMessage": false } }, "version": "13.0.1" } } }, "panel-3": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "bfkfq6kdpznr4e" }, "group": "loki", "kind": "DataQuery", "spec": { "direction": "backward", "editorMode": "builder", "expr": "count_over_time({filename=\"/var/log/fail2ban.log\"} |= `NOTICE` |= `Ban` != `Restore` [$__auto])", "legendFormat": "", "queryType": "range", "step": "10m" }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [] } }, "description": "", "id": 3, "links": [], "title": "Fail2Ban Over Time", "vizConfig": { "group": "barchart", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "fillOpacity": 80, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineWidth": 1, "scaleDistribution": { "type": "linear" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 0, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": 0 } ] }, "unit": "none" }, "overrides": [] }, "options": { "barRadius": 0, "barWidth": 0.97, "fullHighlight": false, "groupWidth": 0.7, "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": false }, "orientation": "auto", "showValue": "auto", "stacking": "none", "tooltip": { "hideZeros": false, "mode": "single", "sort": "none" }, "xTickLabelRotation": 0, "xTickLabelSpacing": 0 } }, "version": "13.0.1" } } }, "panel-4": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "bfkfq6kdpznr4e" }, "group": "loki", "kind": "DataQuery", "spec": { "direction": "backward", "editorMode": "builder", "expr": "{type=\"Ban\"}", "queryType": "range" }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [ { "group": "extractFields", "kind": "Transformation", "spec": { "options": { "delimiter": ",", "format": "json", "keepTime": false, "replace": false, "source": "labels" } } }, { "group": "convertFieldType", "kind": "Transformation", "spec": { "options": { "conversions": [ { "destinationType": "number", "targetField": "geoip_location_latitude" }, { "destinationType": "number", "targetField": "geoip_location_longitude" } ], "fields": {} } } } ] } }, "description": "", "id": 4, "links": [], "title": "Fail2Ban Worldmap", "vizConfig": { "group": "geomap", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": 0 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "geoip_location_latitude", "scope": "series" }, "properties": [ { "id": "decimals", "value": 4 } ] }, { "matcher": { "id": "byName", "options": "geoip_location_longitude", "scope": "series" }, "properties": [ { "id": "decimals", "value": 4 } ] }, { "matcher": { "id": "byName", "options": "__error__", "scope": "series" }, "properties": [ { "id": "custom.hideFrom", "value": { "legend": true, "tooltip": true, "viz": true } } ] }, { "matcher": { "id": "byName", "options": "__error_details__", "scope": "series" }, "properties": [ { "id": "custom.hideFrom", "value": { "legend": true, "tooltip": true, "viz": true } } ] }, { "matcher": { "id": "byName", "options": "labels", "scope": "series" }, "properties": [ { "id": "custom.hideFrom", "value": { "legend": true, "tooltip": true, "viz": true } } ] }, { "matcher": { "id": "byName", "options": "labelTypes", "scope": "series" }, "properties": [ { "id": "custom.hideFrom", "value": { "legend": true, "tooltip": true, "viz": true } } ] } ] }, "options": { "basemap": { "config": {}, "name": "Layer 0", "noRepeat": false, "type": "default" }, "controls": { "mouseWheelZoom": true, "showAttribution": true, "showDebug": false, "showMeasure": false, "showScale": false, "showZoom": true }, "layers": [ { "config": { "blur": 17, "radius": 9, "weight": { "fixed": 0.5, "max": 1, "min": 0 } }, "layer-tooltip": false, "location": { "latitude": "geoip_location_latitude", "longitude": "geoip_location_longitude", "mode": "coords" }, "name": "Bans", "opacity": 1, "tooltip": true, "type": "heatmap" } ], "tooltip": { "mode": "details" }, "view": { "allLayers": true, "dashboardVariable": false, "id": "zero", "lat": 0, "lon": 0, "noRepeat": false, "zoom": 1 } } }, "version": "13.0.1" } } }, "panel-5": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "bfkfq6kdpznr4e" }, "group": "loki", "kind": "DataQuery", "spec": { "direction": "backward", "editorMode": "builder", "expr": "{job=\"varlog\"} |= `ERROR` or `WARN` or `CRITICAL` != `queryType` or `query_hash` | logfmt", "queryType": "range" }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [] } }, "description": "", "id": 5, "links": [], "title": "New panel", "vizConfig": { "group": "logs", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": {}, "overrides": [] }, "options": { "dedupStrategy": "none", "enableInfiniteScrolling": false, "enableLogDetails": true, "prettifyLogMessage": true, "showControls": false, "showFieldSelector": false, "showLevel": true, "showTime": false, "sortOrder": "Descending", "timestampResolution": "ms", "unwrappedColumns": false, "wrapLogMessage": false } }, "version": "13.0.1" } } } }, "layout": { "kind": "GridLayout", "spec": { "items": [ { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-5" }, "height": 8, "width": 24, "x": 0, "y": 0 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-4" }, "height": 8, "width": 12, "x": 0, "y": 8 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-3" }, "height": 8, "width": 12, "x": 12, "y": 8 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-2" }, "height": 7, "width": 24, "x": 0, "y": 16 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-1" }, "height": 8, "width": 24, "x": 0, "y": 23 } } ] } }, "links": [], "liveNow": false, "preferences": { "layout": { "kind": "GridLayout", "spec": { "items": [] } } }, "preload": false, "tags": [], "timeSettings": { "autoRefresh": "", "autoRefreshIntervals": [ "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "fiscalYearStartMonth": 0, "from": "now-6h", "hideTimepicker": false, "timezone": "browser", "to": "now" }, "title": "Logging", "variables": [ { "datasource": { "name": "bfkfq6kdpznr4e" }, "group": "loki", "kind": "AdhocVariable", "spec": { "allowCustomValue": true, "baseFilters": [], "defaultKeys": [], "enableGroupBy": false, "filters": [], "hide": "dontHide", "name": "Filters", "skipUrlSync": false } } ] } }