diff --git a/Grafana-pfSense.png b/Grafana-pfSense.png index 1f00bcc..3e69971 100755 Binary files a/Grafana-pfSense.png and b/Grafana-pfSense.png differ diff --git a/pfSense-Grafana-Dashboard.json b/pfSense-Grafana-Dashboard.json index b8c431f..1812e4b 100755 --- a/pfSense-Grafana-Dashboard.json +++ b/pfSense-Grafana-Dashboard.json @@ -77,7 +77,7 @@ "gnetId": null, "graphTooltip": 0, "id": null, - "iteration": 1586560615790, + "iteration": 1588523576991, "links": [], "panels": [ { @@ -311,161 +311,12 @@ "title": "CPU Total", "type": "gauge" }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_INFLUXDB}", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 6, - "x": 4, - "y": 1 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "repeat": null, - "repeatDirection": "h", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "alias": "$tag_cpu", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "cpu" - ], - "type": "tag" - }, - { - "params": [ - "none" - ], - "type": "fill" - } - ], - "measurement": "cpu", - "orderByTime": "ASC", - "policy": "default", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "usage_idle" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - }, - { - "params": [ - "* -1 + 100" - ], - "type": "math" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=~", - "value": "/^$Host$/" - }, - { - "condition": "AND", - "key": "cpu", - "operator": "=~", - "value": "/^$CPU$/" - } - ] - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:15942", - "format": "percent", - "label": null, - "logBase": 1, - "max": "100", - "min": "0", - "show": true - }, - { - "$$hashKey": "object:15943", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, { "datasource": "${DS_INFLUXDB}", "gridPos": { "h": 6, "w": 2, - "x": 10, + "x": 4, "y": 1 }, "id": 10, @@ -553,9 +404,316 @@ ], "timeFrom": null, "timeShift": null, - "title": "", + "title": "System Load", "type": "gauge" }, + { + "datasource": "${DS_INFLUXDB}", + "gridPos": { + "h": 6, + "w": 2, + "x": 6, + "y": 1 + }, + "id": 12, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 75 + }, + { + "color": "red", + "value": 85 + } + ] + }, + "title": "Ram", + "unit": "percent" + }, + "overrides": [], + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "6.7.2", + "targets": [ + { + "alias": "Ram", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "previous" + ], + "type": "fill" + } + ], + "measurement": "mem", + "orderByTime": "ASC", + "policy": "autogen", + "query": "SELECT mean(\"value\") FROM \"measurement\" WHERE $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "used_percent" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$Host$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Utilization", + "type": "gauge" + }, + { + "cacheTimeout": null, + "datasource": "$dataSource", + "description": "", + "gridPos": { + "h": 6, + "w": 4, + "x": 8, + "y": 1 + }, + "id": 223, + "links": [], + "options": { + "fieldOptions": { + "calcs": [ + "lastNotNull" + ], + "defaults": { + "mappings": [], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 60 + }, + { + "color": "#d44a3a", + "value": 85 + } + ] + }, + "title": "${__series.name}", + "unit": "percent" + }, + "overrides": [], + "values": false + }, + "orientation": "horizontal", + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "6.7.2", + "repeatDirection": "h", + "targets": [ + { + "alias": "$tag_device", + "groupBy": [ + { + "params": [ + "device" + ], + "type": "tag" + } + ], + "measurement": "disk", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"used_percent\" FROM \"disk\" WHERE (\"host\" =~ /^$Host$/ AND \"path\" = '/var/run' AND \"device\" =~ /^$Disk$/) AND $timeFilter GROUP BY \"device\"", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "used_percent" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$Host$/" + }, + { + "condition": "AND", + "key": "device", + "operator": "!=", + "value": "devfs" + } + ] + } + ], + "title": "Disk Utilization", + "type": "gauge" + }, + { + "columns": [], + "datasource": "${DS_INFLUXDB}", + "fontSize": "100%", + "gridPos": { + "h": 3, + "w": 5, + "x": 12, + "y": 1 + }, + "id": 220, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 6, + "desc": false + }, + "styles": [ + { + "$$hashKey": "object:838", + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "$$hashKey": "object:839", + "alias": "", + "align": "right", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 0, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "locale" + } + ], + "targets": [ + { + "groupBy": [], + "measurement": "pf", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "match" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "Match" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "state-mismatch" + ], + "type": "field" + }, + { + "params": [ + "State Mismatch" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "state-insert" + ], + "type": "field" + }, + { + "params": [ + "State Insert" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$Host$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "PF Information", + "transform": "table", + "type": "table" + }, { "aliasColors": {}, "bars": false, @@ -566,8 +724,8 @@ "fillGradient": 0, "gridPos": { "h": 6, - "w": 6, - "x": 12, + "w": 7, + "x": 17, "y": 1 }, "hiddenSeries": false, @@ -789,182 +947,113 @@ "valueName": "current" }, { - "cacheTimeout": null, - "datasource": "$dataSource", - "description": "", + "columns": [], + "datasource": "${DS_INFLUXDB}", + "fontSize": "100%", "gridPos": { - "h": 6, - "w": 2, - "x": 0, - "y": 7 + "h": 3, + "w": 5, + "x": 12, + "y": 4 }, - "id": 47, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "lastNotNull" - ], - "defaults": { - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 50 - }, - { - "color": "#d44a3a", - "value": 80 - } - ] - }, - "title": "${__series.name}", - "unit": "percent" - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true + "id": 219, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 6, + "desc": false }, - "pluginVersion": "6.7.2", - "repeat": null, - "repeatDirection": "h", - "targets": [ + "styles": [ { - "alias": "$tag_device", - "groupBy": [ - { - "params": [ - "device" - ], - "type": "tag" - } + "$$hashKey": "object:838", + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "$$hashKey": "object:839", + "alias": "", + "align": "right", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" ], - "measurement": "disk", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT \"used_percent\" FROM \"disk\" WHERE (\"host\" =~ /^$Host$/ AND \"path\" = '/var/run' AND \"device\" =~ /^$Disk$/) AND $timeFilter GROUP BY \"device\"", - "rawQuery": false, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "used_percent" - ], - "type": "field" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=~", - "value": "/^$Host$/" - }, - { - "condition": "AND", - "key": "path", - "operator": "=", - "value": "/var/run" - } - ] + "decimals": 0, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" } ], - "title": "Disk Utilization", - "type": "gauge" - }, - { - "datasource": "${DS_INFLUXDB}", - "gridPos": { - "h": 6, - "w": 2, - "x": 2, - "y": 7 - }, - "id": 12, - "options": { - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 75 - }, - { - "color": "red", - "value": 85 - } - ] - }, - "title": "Ram", - "unit": "percent" - }, - "overrides": [], - "values": false - }, - "orientation": "auto", - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "6.7.2", "targets": [ { - "alias": "Ram", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "previous" - ], - "type": "fill" - } - ], - "measurement": "mem", + "groupBy": [], + "measurement": "processes", "orderByTime": "ASC", - "policy": "autogen", - "query": "SELECT mean(\"value\") FROM \"measurement\" WHERE $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": false, + "policy": "default", "refId": "A", - "resultFormat": "time_series", + "resultFormat": "table", "select": [ [ { "params": [ - "used_percent" + "running" ], "type": "field" }, { "params": [], - "type": "mean" + "type": "last" + }, + { + "params": [ + "Running" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "idle" + ], + "type": "field" + } + ], + [ + { + "params": [ + "sleeping" + ], + "type": "field" + } + ], + [ + { + "params": [ + "wait" + ], + "type": "field" + } + ], + [ + { + "params": [ + "blocked" + ], + "type": "field" + } + ], + [ + { + "params": [ + "zombies" + ], + "type": "field" } ] ], @@ -979,8 +1068,158 @@ ], "timeFrom": null, "timeShift": null, - "title": "Memory Utilization", - "type": "gauge" + "title": "Process Information", + "transform": "table", + "type": "table" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_INFLUXDB}", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "repeat": null, + "repeatDirection": "h", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "$tag_cpu", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "cpu" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "cpu", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "usage_idle" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "* -1 + 100" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$Host$/" + }, + { + "condition": "AND", + "key": "cpu", + "operator": "=~", + "value": "/^$CPU$/" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:15942", + "format": "percent", + "label": null, + "logBase": 1, + "max": "100", + "min": "0", + "show": true + }, + { + "$$hashKey": "object:15943", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -993,7 +1232,7 @@ "gridPos": { "h": 6, "w": 6, - "x": 4, + "x": 8, "y": 7 }, "hiddenSeries": false, @@ -1004,7 +1243,7 @@ "current": true, "max": false, "min": false, - "rightSide": false, + "rightSide": true, "show": true, "total": false, "values": true @@ -1088,6 +1327,7 @@ }, "yaxes": [ { + "$$hashKey": "object:473", "format": "percent", "label": null, "logBase": 1, @@ -1096,6 +1336,7 @@ "show": true }, { + "$$hashKey": "object:474", "format": "short", "label": null, "logBase": 1, @@ -1119,8 +1360,8 @@ "fillGradient": 0, "gridPos": { "h": 6, - "w": 8, - "x": 10, + "w": 10, + "x": 14, "y": 7 }, "hiddenSeries": false, @@ -1483,10 +1724,92 @@ "format": "locale", "gridPos": { "h": 9, - "w": 8, + "w": 5, "x": 10, "y": 14 }, + "id": 234, + "interval": null, + "legend": { + "percentage": true, + "percentageDecimals": 2, + "show": true, + "sideWidth": null, + "sort": "total", + "sortDesc": true, + "values": true + }, + "legendType": "Right side", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "pieType": "pie", + "strokeWidth": ".5", + "targets": [ + { + "alias": "[[tag_source]]", + "groupBy": [ + { + "params": [ + "source" + ], + "type": "tag" + } + ], + "measurement": "dnsbl_log", + "orderByTime": "ASC", + "policy": "autogen", + "query": "SELECT count(\"hitormiss\") FROM \"autogen\".\"dnsbl_log\" WHERE (\"host\" =~ /^$Host$/) AND $timeFilter GROUP BY \"destination\"", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "hitormiss" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$Host$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "pfBlocker - DNS - Internal hosts - Blocked Queries", + "type": "grafana-piechart-panel", + "valueName": "total" + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "${DS_INFLUXDB}", + "decimals": null, + "fontSize": "80%", + "format": "locale", + "gridPos": { + "h": 9, + "w": 9, + "x": 15, + "y": 14 + }, "id": 160, "interval": null, "legend": { @@ -1690,7 +2013,7 @@ "fillGradient": 0, "gridPos": { "h": 8, - "w": 9, + "w": 15, "x": 0, "y": 24 }, @@ -1702,7 +2025,7 @@ "current": true, "max": true, "min": true, - "rightSide": false, + "rightSide": true, "show": true, "sideWidth": null, "total": false, @@ -1801,14 +2124,16 @@ }, "yaxes": [ { + "$$hashKey": "object:304", "format": "µs", "label": "", - "logBase": 1, + "logBase": 2, "max": null, "min": null, "show": true }, { + "$$hashKey": "object:305", "format": "short", "label": null, "logBase": 1, @@ -1831,7 +2156,7 @@ "gridPos": { "h": 8, "w": 9, - "x": 9, + "x": 15, "y": 24 }, "id": 194, @@ -1841,7 +2166,7 @@ "scroll": true, "showHeader": true, "sort": { - "col": 1, + "col": 2, "desc": false }, "styles": [ @@ -2024,7 +2349,7 @@ "fillGradient": 0, "gridPos": { "h": 8, - "w": 9, + "w": 12, "x": 0, "y": 33 }, @@ -2232,8 +2557,8 @@ "fillGradient": 0, "gridPos": { "h": 8, - "w": 9, - "x": 9, + "w": 12, + "x": 12, "y": 33 }, "hiddenSeries": false, @@ -2423,7 +2748,7 @@ }, { "params": [ - "10s" + "1s" ], "type": "derivative" } @@ -2463,7 +2788,7 @@ }, { "params": [ - "10s" + "1s" ], "type": "derivative" } @@ -2551,7 +2876,7 @@ "fillGradient": 0, "gridPos": { "h": 7, - "w": 9, + "w": 12, "x": 0, "y": 42 }, @@ -2779,8 +3104,8 @@ "fillGradient": 0, "gridPos": { "h": 7, - "w": 9, - "x": 9, + "w": 12, + "x": 12, "y": 42 }, "hiddenSeries": false, @@ -3007,7 +3332,7 @@ }, { "params": [ - "10s" + "1s" ], "type": "derivative" } @@ -3054,7 +3379,7 @@ }, { "params": [ - "10s" + "1s" ], "type": "derivative" } @@ -3119,7 +3444,7 @@ } } ], - "refresh": "30m", + "refresh": "30s", "schemaVersion": 22, "style": "dark", "tags": [ @@ -3174,7 +3499,7 @@ "allValue": null, "current": {}, "datasource": "$dataSource", - "definition": "SHOW TAG VALUES FROM \"diskio\" WITH KEY = \"name\" WHERE \"host\" =~ /^$Host$/", + "definition": "SHOW TAG VALUES FROM \"disk\" WITH KEY = \"device\" WHERE \"host\" =~ /^$Host$/", "hide": 0, "includeAll": true, "index": -1, @@ -3182,7 +3507,7 @@ "multi": false, "name": "Disk", "options": [], - "query": "SHOW TAG VALUES FROM \"diskio\" WITH KEY = \"name\" WHERE \"host\" =~ /^$Host$/", + "query": "SHOW TAG VALUES FROM \"disk\" WITH KEY = \"device\" WHERE \"host\" =~ /^$Host$/", "refresh": 1, "regex": "", "skipUrlSync": false, @@ -3367,5 +3692,5 @@ "variables": { "list": [] }, - "version": 39 + "version": 53 } \ No newline at end of file