diff --git a/grafana/dashboard.json b/grafana/dashboard.json index 440f0ad..89af5b0 100644 --- a/grafana/dashboard.json +++ b/grafana/dashboard.json @@ -34,12 +34,6 @@ "name": "Prometheus", "version": "1.0.0" }, - { - "type": "panel", - "id": "singlestat", - "name": "Singlestat", - "version": "" - }, { "type": "panel", "id": "stat", @@ -71,7 +65,7 @@ "gnetId": 10176, "graphTooltip": 0, "id": null, - "iteration": 1604439632531, + "iteration": 1604507904334, "links": [], "panels": [ { @@ -93,12 +87,15 @@ "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { + "color": { + "mode": "thresholds" + }, "custom": {}, "mappings": [ { "id": 0, "op": "=", - "text": "Disabled", + "text": "Stopped", "type": 1, "value": "0" }, @@ -110,29 +107,23 @@ "value": "1" } ], + "max": 1, + "min": 0, "nullValueMode": "connected", "thresholds": { "mode": "absolute", "steps": [ { - "color": "#d44a3a", + "color": "dark-red", "value": null }, { - "color": "#299c46", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 0.05 - }, - { - "color": "#EAB839", - "value": 0.1 + "color": "dark-green", + "value": 1 } ] }, - "unit": "s" + "unit": "short" }, "overrides": [] }, @@ -147,7 +138,169 @@ "links": [], "maxDataPoints": 100, "options": { - "colorMode": "background", + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + }, + "pluginVersion": "7.3.1", + "targets": [ + { + "expr": "adguard_running{hostname=~'$node'}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Status", + "transparent": true, + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "Stopped", + "type": 1, + "value": "0" + }, + { + "id": 1, + "op": "=", + "text": "Enabled", + "type": 1, + "value": "1" + } + ], + "max": 1, + "min": 0, + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-green", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 1 + }, + "id": 102, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.3.1", + "targets": [ + { + "expr": "adguard_protection_enabled{hostname=~'$node'}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Protection", + "transparent": true, + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": {}, + "decimals": 2, + "mappings": [], + "max": 1, + "min": 0, + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "dark-orange", + "value": 0.05 + }, + { + "color": "dark-red", + "value": 0.1 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 6, + "y": 1 + }, + "id": 101, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", @@ -179,69 +332,61 @@ }, { "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "fixed" + }, + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" }, "overrides": [] }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 3, "w": 3, - "x": 3, + "x": 9, "y": 1 }, "id": 82, "interval": null, "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" }, - "tableColumn": "", + "pluginVersion": "7.3.1", "targets": [ { "expr": "adguard_num_dns_queries{hostname=~'$node'}", @@ -252,89 +397,61 @@ "refId": "A" } ], - "thresholds": "", "timeFrom": null, "timeShift": null, "title": "Number of queries", "transparent": true, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" + "type": "stat" }, { "cacheTimeout": null, - "colorBackground": false, - "colorPostfix": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], "datasource": "${DS_PROMETHEUS}", - "decimals": null, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "fixed" + }, + "custom": {}, + "mappings": [], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" }, "overrides": [] }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 3, "w": 3, - "x": 6, + "x": 12, "y": 1 }, "id": 80, "interval": null, "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" }, - "tableColumn": "", + "pluginVersion": "7.3.1", "targets": [ { "expr": "adguard_num_blocked_filtering{hostname=~'$node'}", @@ -345,21 +462,11 @@ "refId": "A" } ], - "thresholds": "", "timeFrom": null, "timeShift": null, "title": "Domains being blocked", "transparent": true, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" + "type": "stat" }, { "cacheTimeout": null, @@ -401,13 +508,13 @@ "gridPos": { "h": 3, "w": 3, - "x": 9, + "x": 15, "y": 1 }, "id": 92, "interval": null, "links": [], - "maxDataPoints": 1, + "maxDataPoints": 1000, "options": { "colorMode": "value", "graphMode": "none", @@ -458,9 +565,9 @@ "fontSize": "80%", "format": "short", "gridPos": { - "h": 8, - "w": 4, - "x": 12, + "h": 7, + "w": 3, + "x": 18, "y": 1 }, "id": 95, @@ -479,18 +586,18 @@ "strokeWidth": 1, "targets": [ { - "expr": "adguard_query_types{hostname=~'$node'}", + "expr": "adguard_top_queried_domains{hostname=~'$node'}", "format": "time_series", "instant": false, "interval": "", "intervalFactor": 1, - "legendFormat": "{{ type }}", + "legendFormat": "{{ domain }}", "refId": "A" } ], "timeFrom": null, "timeShift": null, - "title": "Replies by type", + "title": "Top queries by domain", "transparent": true, "type": "grafana-piechart-panel", "valueName": "avg" @@ -513,64 +620,9 @@ "fontSize": "80%", "format": "short", "gridPos": { - "h": 8, - "w": 4, - "x": 16, - "y": 1 - }, - "id": 100, - "interval": null, - "legend": { - "percentage": true, - "show": false, - "values": true - }, - "legendType": "On graph", - "links": [], - "maxDataPoints": 3, - "nullPointMode": "connected", - "pieType": "donut", - "pluginVersion": "7.3.1", - "strokeWidth": 1, - "targets": [ - { - "expr": "adguard_query_types{hostname=~'$node'}", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{ type }}", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Replies by type", - "transparent": true, - "type": "grafana-piechart-panel", - "valueName": "avg" - }, - { - "aliasColors": {}, - "breakPoint": "50%", - "cacheTimeout": null, - "combine": { - "label": "Others", - "threshold": 0 - }, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fontSize": "80%", - "format": "short", - "gridPos": { - "h": 8, - "w": 4, - "x": 20, + "h": 7, + "w": 3, + "x": 21, "y": 1 }, "id": 99, @@ -622,8 +674,8 @@ "fill": 1, "fillGradient": 0, "gridPos": { - "h": 7, - "w": 12, + "h": 8, + "w": 11, "x": 0, "y": 4 }, @@ -708,61 +760,6 @@ "alignLevel": null } }, - { - "aliasColors": {}, - "breakPoint": "50%", - "cacheTimeout": null, - "combine": { - "label": "Others", - "threshold": 0 - }, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fontSize": "80%", - "format": "short", - "gridPos": { - "h": 8, - "w": 4, - "x": 12, - "y": 9 - }, - "id": 98, - "interval": null, - "legend": { - "percentage": true, - "show": false, - "values": true - }, - "legendType": "On graph", - "links": [], - "maxDataPoints": 3, - "nullPointMode": "connected", - "pieType": "donut", - "pluginVersion": "7.3.1", - "strokeWidth": 1, - "targets": [ - { - "expr": "adguard_top_clients{hostname=~'$node'}", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{ client }}", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Top clients by source", - "transparent": true, - "type": "grafana-piechart-panel", - "valueName": "avg" - }, { "aliasColors": {}, "bars": false, @@ -778,10 +775,10 @@ "fill": 1, "fillGradient": 0, "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 9 + "h": 11, + "w": 7, + "x": 11, + "y": 4 }, "hiddenSeries": false, "id": 97, @@ -827,6 +824,7 @@ "sort": 0, "value_type": "individual" }, + "transparent": true, "type": "graph", "xaxis": { "buckets": null, @@ -858,6 +856,116 @@ "alignLevel": null } }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 7, + "w": 3, + "x": 18, + "y": 8 + }, + "id": 100, + "interval": null, + "legend": { + "percentage": true, + "show": false, + "values": true + }, + "legendType": "On graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "donut", + "pluginVersion": "7.3.1", + "strokeWidth": 1, + "targets": [ + { + "expr": "adguard_query_types{hostname=~'$node'}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ type }}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Replies by type", + "transparent": true, + "type": "grafana-piechart-panel", + "valueName": "avg" + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 7, + "w": 3, + "x": 21, + "y": 8 + }, + "id": 98, + "interval": null, + "legend": { + "percentage": true, + "show": false, + "values": true + }, + "legendType": "On graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "donut", + "pluginVersion": "7.3.1", + "strokeWidth": 1, + "targets": [ + { + "expr": "adguard_top_clients{hostname=~'$node'}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ client }}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Top clients by source", + "transparent": true, + "type": "grafana-piechart-panel", + "valueName": "avg" + }, { "aliasColors": { "pihole": "light-red" @@ -875,10 +983,10 @@ "fill": 1, "fillGradient": 0, "gridPos": { - "h": 7, - "w": 12, + "h": 8, + "w": 11, "x": 0, - "y": 11 + "y": 12 }, "hiddenSeries": false, "id": 62, @@ -973,10 +1081,10 @@ }, "fontSize": "100%", "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 17 + "h": 9, + "w": 13, + "x": 11, + "y": 15 }, "id": 93, "links": [], @@ -1046,9 +1154,9 @@ "fillGradient": 0, "gridPos": { "h": 7, - "w": 12, + "w": 11, "x": 0, - "y": 18 + "y": 20 }, "hiddenSeries": false, "id": 64, @@ -1142,73 +1250,10 @@ }, "fontSize": "100%", "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 25 - }, - "id": 74, - "links": [], - "pageSize": null, - "scroll": true, - "showHeader": true, - "sort": { - "col": 0, - "desc": true - }, - "styles": [ - { - "alias": "", - "align": "auto", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": false, - "mappingType": 1, - "pattern": "Time", - "thresholds": [], - "type": "date", - "unit": "short" - } - ], - "targets": [ - { - "expr": "adguard_top_queried_domains{hostname=~'$node'}", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{ domain }}", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Top queries", - "transform": "timeseries_to_rows", - "transparent": true, - "type": "table-old" - }, - { - "columns": [], - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fontSize": "100%", - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 25 + "h": 10, + "w": 13, + "x": 11, + "y": 24 }, "id": 90, "links": [], @@ -1259,6 +1304,69 @@ "transform": "timeseries_to_rows", "transparent": true, "type": "table-old" + }, + { + "columns": [], + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fontSize": "100%", + "gridPos": { + "h": 7, + "w": 11, + "x": 0, + "y": 27 + }, + "id": 74, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "mappingType": 1, + "pattern": "Time", + "thresholds": [], + "type": "date", + "unit": "short" + } + ], + "targets": [ + { + "expr": "adguard_top_queried_domains{hostname=~'$node'}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ domain }}", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Top queries", + "transform": "timeseries_to_rows", + "transparent": true, + "type": "table-old" } ], "refresh": "10s", @@ -1328,5 +1436,5 @@ "timezone": "", "title": "Adguard Exporter", "uid": "MIBVglomg", - "version": 16 + "version": 19 } \ No newline at end of file diff --git a/grafana/dashboard.png b/grafana/dashboard.png index 049d46d..956203c 100644 Binary files a/grafana/dashboard.png and b/grafana/dashboard.png differ