Fixed the pfBlocker graphs

Labeled the disk utilization graph with the device

TODO:
Make nice table for interface list
Figure out how to get the correct data from dpinger
This commit is contained in:
Victor Robellini 2020-04-02 18:04:38 -04:00
parent 794d34a2ce
commit ae4b8686ea

View File

@ -22,6 +22,12 @@
"name": "Grafana", "name": "Grafana",
"version": "6.7.1" "version": "6.7.1"
}, },
{
"type": "panel",
"id": "grafana-piechart-panel",
"name": "Pie Chart",
"version": "1.4.0"
},
{ {
"type": "panel", "type": "panel",
"id": "grafana-worldmap-panel", "id": "grafana-worldmap-panel",
@ -71,7 +77,7 @@
"gnetId": null, "gnetId": null,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": null,
"iteration": 1585844195441, "iteration": 1585864393668,
"links": [], "links": [],
"panels": [ "panels": [
{ {
@ -121,10 +127,12 @@
"mappingType": 1, "mappingType": 1,
"mappingTypes": [ "mappingTypes": [
{ {
"$$hashKey": "object:971",
"name": "value to text", "name": "value to text",
"value": 1 "value": 1
}, },
{ {
"$$hashKey": "object:972",
"name": "range to text", "name": "range to text",
"value": 2 "value": 2
} }
@ -152,13 +160,15 @@
"tableColumn": "", "tableColumn": "",
"targets": [ "targets": [
{ {
"alias": "Load 15m", "alias": "",
"groupBy": [], "groupBy": [],
"measurement": "system", "measurement": "system",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT \"n_users\" FROM \"system\" WHERE (\"host\" =~ /^$Host$/) AND $timeFilter",
"rawQuery": false,
"refId": "A", "refId": "A",
"resultFormat": "table", "resultFormat": "time_series",
"select": [ "select": [
[ [
{ {
@ -185,6 +195,7 @@
"valueFontSize": "80%", "valueFontSize": "80%",
"valueMaps": [ "valueMaps": [
{ {
"$$hashKey": "object:974",
"op": "=", "op": "=",
"text": "N/A", "text": "N/A",
"value": "null" "value": "null"
@ -811,6 +822,7 @@
} }
] ]
}, },
"title": "${__series.name}",
"unit": "percent" "unit": "percent"
}, },
"overrides": [], "overrides": [],
@ -832,12 +844,6 @@
"device" "device"
], ],
"type": "tag" "type": "tag"
},
{
"params": [
"path"
],
"type": "tag"
} }
], ],
"measurement": "disk", "measurement": "disk",
@ -868,17 +874,11 @@
"key": "path", "key": "path",
"operator": "=", "operator": "=",
"value": "/var/run" "value": "/var/run"
},
{
"condition": "AND",
"key": "device",
"operator": "=~",
"value": "/^$Disk$/"
} }
] ]
} }
], ],
"title": "Disk Space Used", "title": "Disk Utilization",
"type": "gauge" "type": "gauge"
}, },
{ {
@ -1248,7 +1248,7 @@
} }
}, },
{ {
"collapsed": true, "collapsed": false,
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB}",
"gridPos": { "gridPos": {
"h": 1, "h": 1,
@ -1257,7 +1257,10 @@
"y": 13 "y": 13
}, },
"id": 41, "id": 41,
"panels": [ "panels": [],
"title": "Systems",
"type": "row"
},
{ {
"circleMaxSize": 30, "circleMaxSize": 30,
"circleMinSize": 2, "circleMinSize": 2,
@ -1314,7 +1317,7 @@
], ],
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT count(\"action\") FROM \"ip_block_log\" GROUP BY \"GeoIP\"", "query": "SELECT count(\"action\") FROM \"ip_block_log\" WHERE $timeFilter GROUP BY \"GeoIP\"",
"rawQuery": true, "rawQuery": true,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
@ -1374,10 +1377,12 @@
"mappingType": 1, "mappingType": 1,
"mappingTypes": [ "mappingTypes": [
{ {
"$$hashKey": "object:1171",
"name": "value to text", "name": "value to text",
"value": 1 "value": 1
}, },
{ {
"$$hashKey": "object:1172",
"name": "range to text", "name": "range to text",
"value": 2 "value": 2
} }
@ -1411,8 +1416,8 @@
"measurement": "dnsbl_log", "measurement": "dnsbl_log",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "default", "policy": "default",
"query": "SELECT count(\"hitormiss\") FROM \"dnsbl_log\" WHERE (\"host\" =~ /^$Host$/)", "query": "SELECT count(\"hitormiss\") FROM \"dnsbl_log\" WHERE (\"host\" =~ /^$Host$/) AND $timeFilter",
"rawQuery": true, "rawQuery": false,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
"select": [ "select": [
@ -1441,11 +1446,12 @@
"thresholds": "", "thresholds": "",
"timeFrom": null, "timeFrom": null,
"timeShift": null, "timeShift": null,
"title": "DNSBL Block", "title": "pfBlocker - DNS - Total Domains Blocked",
"type": "singlestat", "type": "singlestat",
"valueFontSize": "80%", "valueFontSize": "80%",
"valueMaps": [ "valueMaps": [
{ {
"$$hashKey": "object:1174",
"op": "=", "op": "=",
"text": "N/A", "text": "N/A",
"value": "null" "value": "null"
@ -1454,92 +1460,54 @@
"valueName": "current" "valueName": "current"
}, },
{ {
"columns": [ "aliasColors": {},
{ "breakPoint": "50%",
"text": "Total", "cacheTimeout": null,
"value": "total" "combine": {
} "label": "Others",
], "threshold": 0
},
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB}",
"fontSize": "100%", "fontSize": "80%",
"format": "short",
"gridPos": { "gridPos": {
"h": 9, "h": 9,
"w": 8, "w": 8,
"x": 10, "x": 10,
"y": 14 "y": 14
}, },
"id": 67, "id": 160,
"pageSize": 10, "interval": null,
"showHeader": true, "legend": {
"sort": { "percentage": true,
"col": 1, "show": true,
"desc": true "sideWidth": null,
"sort": "total",
"sortDesc": true,
"values": true
}, },
"styles": [ "legendType": "Right side",
{ "links": [],
"alias": "", "maxDataPoints": 3,
"align": "left", "nullPointMode": "connected",
"colorMode": null, "pieType": "pie",
"colors": [ "strokeWidth": ".5",
"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": "Total",
"thresholds": [],
"type": "number",
"unit": "short"
},
{
"alias": "Host",
"align": "left",
"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,
"mappingType": 1,
"pattern": "Metric",
"thresholds": [],
"type": "number",
"unit": "short"
}
],
"targets": [ "targets": [
{ {
"alias": "[[tag_destination]]", "alias": "[[tag_destination]]",
"groupBy": [ "groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{ {
"params": [ "params": [
"destination" "destination"
], ],
"type": "tag" "type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
} }
], ],
"measurement": "dnsbl_log", "measurement": "dnsbl_log",
"orderByTime": "ASC", "orderByTime": "ASC",
"policy": "autogen", "policy": "autogen",
"query": "SELECT count(\"hitormiss\") FROM \"autogen\".\"dnsbl_log\" WHERE (\"host\" =~ /^$Host$/) AND $timeFilter GROUP BY time($__interval), \"destination\" fill(null)", "query": "SELECT count(\"hitormiss\") FROM \"autogen\".\"dnsbl_log\" WHERE (\"host\" =~ /^$Host$/) AND $timeFilter GROUP BY \"destination\"",
"rawQuery": true, "rawQuery": false,
"refId": "A", "refId": "A",
"resultFormat": "time_series", "resultFormat": "time_series",
"select": [ "select": [
@ -1568,24 +1536,135 @@
"timeFrom": null, "timeFrom": null,
"timeShift": null, "timeShift": null,
"title": "pfBlocker - DNS", "title": "pfBlocker - DNS",
"transform": "timeseries_aggregations", "type": "grafana-piechart-panel",
"type": "table" "valueName": "total"
}
],
"title": "Systems",
"type": "row"
}, },
{ {
"collapsed": true, "cacheTimeout": null,
"colorBackground": false,
"colorValue": true,
"colors": [
"#299c46",
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"datasource": "${DS_INFLUXDB}",
"format": "short",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 3,
"w": 3,
"x": 7,
"y": 17
},
"id": 162,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"$$hashKey": "object:194",
"name": "value to text",
"value": 1
},
{
"$$hashKey": "object:195",
"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,
"ymax": null,
"ymin": null
},
"tableColumn": "",
"targets": [
{
"groupBy": [],
"measurement": "ip_block_log",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT count(\"hitormiss\") FROM \"dnsbl_log\" WHERE (\"host\" =~ /^$Host$/) AND $timeFilter",
"rawQuery": false,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"action"
],
"type": "field"
},
{
"params": [],
"type": "count"
}
]
],
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$Host$/"
}
]
}
],
"thresholds": "",
"timeFrom": null,
"timeShift": null,
"title": "pfBlocker - IP - Total IPs Blocked",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"$$hashKey": "object:197",
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current"
},
{
"collapsed": false,
"datasource": "${DS_INFLUXDB}", "datasource": "${DS_INFLUXDB}",
"gridPos": { "gridPos": {
"h": 1, "h": 1,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 14 "y": 23
}, },
"id": 143, "id": 143,
"panels": [ "panels": [],
"title": "Network Stats",
"type": "row"
},
{ {
"aliasColors": {}, "aliasColors": {},
"bars": false, "bars": false,
@ -1599,7 +1678,7 @@
"h": 8, "h": 8,
"w": 9, "w": 9,
"x": 0, "x": 0,
"y": 15 "y": 24
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 4, "id": 4,
@ -1737,7 +1816,7 @@
"h": 8, "h": 8,
"w": 9, "w": 9,
"x": 9, "x": 9,
"y": 15 "y": 24
}, },
"id": 85, "id": 85,
"pageSize": null, "pageSize": null,
@ -1838,10 +1917,6 @@
"title": "Interface Info", "title": "Interface Info",
"transform": "table", "transform": "table",
"type": "table" "type": "table"
}
],
"title": "Network Stats",
"type": "row"
}, },
{ {
"collapsed": false, "collapsed": false,
@ -1850,7 +1925,7 @@
"h": 1, "h": 1,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 15 "y": 32
}, },
"id": 14, "id": 14,
"panels": [], "panels": [],
@ -1870,7 +1945,7 @@
"h": 8, "h": 8,
"w": 9, "w": 9,
"x": 0, "x": 0,
"y": 16 "y": 33
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 2, "id": 2,
@ -2078,7 +2153,7 @@
"h": 8, "h": 8,
"w": 9, "w": 9,
"x": 9, "x": 9,
"y": 16 "y": 33
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 37, "id": 37,
@ -2378,7 +2453,7 @@
"h": 1, "h": 1,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 24 "y": 41
}, },
"id": 43, "id": 43,
"panels": [], "panels": [],
@ -2397,7 +2472,7 @@
"h": 7, "h": 7,
"w": 9, "w": 9,
"x": 0, "x": 0,
"y": 25 "y": 42
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 38, "id": 38,
@ -2625,7 +2700,7 @@
"h": 7, "h": 7,
"w": 9, "w": 9,
"x": 9, "x": 9,
"y": 25 "y": 42
}, },
"hiddenSeries": false, "hiddenSeries": false,
"id": 39, "id": 39,
@ -2972,7 +3047,7 @@
"list": [ "list": [
{ {
"current": { "current": {
"selected": true, "selected": false,
"text": "InfluxDB", "text": "InfluxDB",
"value": "InfluxDB" "value": "InfluxDB"
}, },
@ -3185,7 +3260,7 @@
] ]
}, },
"time": { "time": {
"from": "now-30m", "from": "now-3h",
"to": "now" "to": "now"
}, },
"timepicker": { "timepicker": {
@ -3208,5 +3283,5 @@
"variables": { "variables": {
"list": [] "list": []
}, },
"version": 33 "version": 53
} }