From fc1e5de5f4647a4dea8ae489ec2f3ff0116984f6 Mon Sep 17 00:00:00 2001 From: smilebasti <60941345+smilebasti@users.noreply.github.com> Date: Sun, 10 Dec 2023 14:02:24 +0100 Subject: [PATCH] release v2.4.0 merge --- Dockerfile | 5 +- Getipinfo.py | 23 +- changelog.md | 6 +- docker-compose.yml | 4 +- ...s Map Dashboard Influx v2.4 NO filter.json | 2582 ++++++++++++++++ ...Map Dashboard Influx v2.4 with filter.json | 2603 +++++++++++++++++ sendips.sh | 11 +- sendredirectionips.sh | 11 +- start.sh | 2 +- 9 files changed, 5230 insertions(+), 17 deletions(-) create mode 100644 npmGrafStats Map Dashboard Influx v2.4 NO filter.json create mode 100644 npmGrafStats Map Dashboard Influx v2.4 with filter.json diff --git a/Dockerfile b/Dockerfile index 0269ff5..52a6471 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN mkdir -p /root/.config/NPMGRAF ## install curl for slim image RUN apt-get update && apt-get install -y \ - curl \ + curl gcc \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt /root/.config/NPMGRAF/requirements.txt @@ -30,3 +30,6 @@ COPY start.sh /root/start.sh RUN chmod +x /root/start.sh ENTRYPOINT ["/root/start.sh"] + + + diff --git a/Getipinfo.py b/Getipinfo.py index df3f9c8..e55618b 100644 --- a/Getipinfo.py +++ b/Getipinfo.py @@ -5,7 +5,10 @@ measurement_name = (sys.argv[5]) # get measurement from argv print ('Measurement-name: '+measurement_name) -# argv1 = outsideip, agrv2 = Domain, argv3 length, argv4 tragetip +# argv1 = outsideip, agrv2 = Domain, argv3 length, argv4 tragetip, sys.argv[5] bucketname, sys.argv[6] date, sys.argv[7] asn + + +asn = str(sys.argv[7]) import geoip2.database import socket @@ -27,20 +30,22 @@ Target = str(sys.argv[4]) reader.close() -reader = geoip2.database.Reader('/geolite/GeoLite2-ASN.mmdb') -response = reader.asn(str(sys.argv[1])) -Asn = response.autonomous_system_organization -reader.close() +if asn =='true': + reader = geoip2.database.Reader('/geolite/GeoLite2-ASN.mmdb') + response = reader.asn(str(sys.argv[1])) + Asn = response.autonomous_system_organization + reader.close() # print to log print (Country) print (State) print (City) print (Zip) -print (Asn) print (Long) print (Lat) print (ISO) +if asn =='true': + print (Asn) print ('Outside IP: ', IP) print ('Target IP: ', Target) print ('Domain: ', Domain) @@ -110,7 +115,8 @@ point.tag("Name", Country) point.tag("IP", IP), point.tag("Target", Target) -point.tag("Asn", Asn) +if asn =='true': + point.tag("Asn", Asn) point.field("Domain", Domain) point.field("latitude", Lat) @@ -120,7 +126,8 @@ point.field("key", ISO) point.field("IP", IP) point.field("Target", Target) -point.field("Asn", Asn) +if asn =='true': + point.field("Asn", Asn) point.field("Name", Country) point.field("duration", duration) point.field("metric", 1) diff --git a/changelog.md b/changelog.md index 98dff93..fdfdc16 100644 --- a/changelog.md +++ b/changelog.md @@ -4,11 +4,15 @@ - Get lenght and device - grafana more internal panels and plain numbers -- use alpine as base image ### Not planned features - maybe analys fallback/default/error logs - grafan 10.1 missle map (route feature only one and not multiple possible) +## v2.4.0 +- add ASN as optional feature see #32 and #33 thanks to @maxdd +- added ASN to Grafana +- added no filter Grafana Dashboard #20121 + ## v2.3.2 - Grafana Dashboard added Filter - Fix spelling in Readme diff --git a/docker-compose.yml b/docker-compose.yml index 7d2fb93..a6fa250 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,7 +37,7 @@ services: - ./mysql:/var/lib/mysql npmgraf: - image: smilebasti/npmgrafstats:latest # set tag to 'latest-arm' for arm/v7 and arm64 image + image: smilebasti/npmgrafstats:latest # change to ghcr.io/smilebasti/npmgrafstats if you prefer Github Container Registry restart: unless-stopped environment: REDIRECTION_LOGS: '' # TRUE or FALSE or ONLY @@ -76,7 +76,7 @@ services: environment: GEOIPUPDATE_ACCOUNT_ID: '' GEOIPUPDATE_LICENSE_KEY: '' - GEOIPUPDATE_EDITION_IDS: 'GeoLite2-City GeoLite2-ASN' + GEOIPUPDATE_EDITION_IDS: 'GeoLite2-City GeoLite2-ASN' #GeoLite2-ASN is optional GEOIPUPDATE_FREQUENCY: 24 volumes: - ./geolite:/usr/share/GeoIP diff --git a/npmGrafStats Map Dashboard Influx v2.4 NO filter.json b/npmGrafStats Map Dashboard Influx v2.4 NO filter.json new file mode 100644 index 0000000..fce5397 --- /dev/null +++ b/npmGrafStats Map Dashboard Influx v2.4 NO filter.json @@ -0,0 +1,2582 @@ +{ + "__inputs": [ + { + "name": "DS_INFLUXDB2-NPMGRAFSTATS", + "label": "InfluxDB2-npmgrafstats", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, + { + "type": "panel", + "id": "geomap", + "name": "Geomap", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.2.2" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "npmGrafStats Map Dashboard with InfluxDB v2.4 powered by https://github.com/smilebasti/npmGrafStats.\n\nFor a Dashboard with the filtering option use https://grafana.com/grafana/dashboards/18826.", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 18826, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 23, + "panels": [], + "title": "Real Connections (without monitoring services or internal calls)", + "type": "row" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "(without monitoring services or internal calls)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 17, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 11, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "All real Accessed Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "_value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 0, + "y": 18 + }, + "id": 26, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 5, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Count" + } + ] + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "IP" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"IP\") \r\n |> group(columns: [\"IP\"])\r\n |> count()\r\n |> drop(columns: [\"_start\", \"_stop\"])\r\n |> yield(name: \"alias\")\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Hits per IP", + "transformations": [ + { + "id": "labelsToFields", + "options": { + "mode": "columns" + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "joinByField", + "options": { + "byField": "IP", + "mode": "outer" + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "(without monitoring services or internal calls)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 7, + "y": 18 + }, + "id": 25, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r._field == \"IP\")\r\n |> group(columns: [\"_count\"])\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n |> count()", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "timeFrom": "5m", + "title": "Hit's in the last ...", + "type": "stat" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "(without monitoring services or internal calls)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 22, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 24, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "/.*/", + "limit": 220, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "alias": "", + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "name" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r._field == \"Name\")\r\n |> group(columns: [\"Name\"])\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n |> count()", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "name" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [], + "tz": "" + } + ], + "title": "Hits per Nation", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 13, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "always", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green" + }, + { + "color": "yellow", + "value": 75 + }, + { + "color": "dark-red", + "value": 90 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "Domain" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 26 + }, + "id": 27, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "pluginVersion": "9.2.3", + "targets": [ + { + "alias": "", + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"Domain\")\r\n |> group(columns: [\"_measurement\", \"_field\", \"_time=1m\"])\r\n |> aggregateWindow(every: 1m, fn: count, createEmpty: false)\r\n |> yield(name: \"count\")\r\n\r\n\r\n", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + }, + { + "params": [ + "alias" + ], + "type": "alias" + } + ] + ], + "tags": [], + "tz": "" + } + ], + "title": "Hits per 1 min", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 31, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Real Reverse Proxy Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Redirect Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 32, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Real Redirection Domains", + "type": "bargauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 52 + }, + "id": 19, + "panels": [], + "title": "World Map", + "type": "row" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#c94141", + "mode": "thresholds" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "semi-dark-red" + }, + { + "color": "semi-dark-yellow", + "value": 4 + }, + { + "color": "#3ce126", + "value": 10 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "_value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 21, + "w": 24, + "x": 0, + "y": 53 + }, + "id": 33, + "maxDataPoints": 1, + "options": { + "basemap": { + "config": {}, + "name": "Layer 0", + "type": "default" + }, + "controls": { + "mouseWheelZoom": true, + "showAttribution": true, + "showDebug": false, + "showMeasure": false, + "showScale": false, + "showZoom": true + }, + "layers": [ + { + "config": { + "showLegend": true, + "style": { + "color": { + "field": "_value", + "fixed": "dark-green" + }, + "opacity": 0.6, + "rotation": { + "field": "_value", + "fixed": 0, + "max": 360, + "min": -360, + "mode": "mod" + }, + "size": { + "field": "_value", + "fixed": 5, + "max": 14, + "min": 2 + }, + "symbol": { + "fixed": "img/icons/marker/circle.svg", + "mode": "fixed" + }, + "text": { + "fixed": "", + "mode": "field" + }, + "textConfig": { + "fontSize": 12, + "offsetX": 0, + "offsetY": 0, + "textAlign": "center", + "textBaseline": "middle" + } + } + }, + "location": { + "mode": "auto" + }, + "name": "IP count", + "tooltip": true, + "type": "markers" + } + ], + "tooltip": { + "mode": "details" + }, + "view": { + "allLayers": true, + "id": "fit", + "lat": 0, + "lon": 0, + "zoom": 14.94 + } + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "latitude" + ], + "type": "tag" + }, + { + "params": [ + "longitude" + ], + "type": "tag" + }, + { + "params": [ + "IP" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r._field == \"IP\") \r\n |> group(columns: [\"longitude\",\"latitude\",\"IP\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + }, + { + "params": [ + "counts" + ], + "type": "alias" + } + ] + ], + "tags": [] + } + ], + "title": "Real IPs Map Overview (without excluded IPs)", + "transformations": [ + { + "id": "labelsToFields", + "options": {} + }, + { + "id": "merge", + "options": {} + }, + { + "id": "joinByField", + "options": { + "byField": "IP", + "mode": "outer" + } + } + ], + "type": "geomap" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 74 + }, + "id": 37, + "panels": [], + "title": "ASN", + "type": "row" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "_value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 75 + }, + "id": 38, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Count" + } + ] + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"Asn\") \r\n |> group(columns: [\"Asn\", \"IP\"])\r\n |> count()\r\n |> drop(columns: [\"_start\", \"_stop\"])\r\n |> yield(name: \"alias\")", + "refId": "A" + } + ], + "title": "ASN", + "transformations": [ + { + "id": "labelsToFields", + "options": {} + }, + { + "id": "merge", + "options": {} + } + ], + "type": "table" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 84 + }, + "id": 17, + "panels": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 17, + "w": 24, + "x": 0, + "y": 83 + }, + "id": 22, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "All Accessed Domains", + "type": "bargauge" + } + ], + "title": "All Accessed (with excluded IPs and internal calls)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 85 + }, + "id": 15, + "panels": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "_value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 0, + "y": 101 + }, + "id": 7, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 5, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Count" + } + ] + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "IP" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_field\"] == \"IP\") \r\n |> group(columns: [\"IP\"])\r\n |> count()\r\n |> drop(columns: [\"_start\", \"_stop\"])\r\n |> yield(name: \"alias\")\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Hits per IP", + "transformations": [ + { + "id": "labelsToFields", + "options": { + "mode": "columns" + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "joinByField", + "options": { + "byField": "IP", + "mode": "outer" + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 7, + "y": 101 + }, + "id": 9, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._field == \"IP\")\r\n |> group(columns: [\"_count\"])\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n |> count()", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "timeFrom": "5m", + "title": "Hit's in the last ...", + "type": "stat" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 22, + "w": 12, + "x": 12, + "y": 101 + }, + "id": 5, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "/.*/", + "limit": 220, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "alias": "", + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "name" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._field == \"Name\")\r\n |> group(columns: [\"Name\"])\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n |> count()", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "name" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [], + "tz": "" + } + ], + "title": "Hits per Nation", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 13, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "always", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green" + }, + { + "color": "yellow", + "value": 75 + }, + { + "color": "dark-red", + "value": 90 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 109 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "pluginVersion": "9.2.3", + "targets": [ + { + "alias": "", + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_field\"] == \"Domain\")\r\n |> group(columns: [\"_measurement\", \"_field\", \"_time=1m\"])\r\n |> aggregateWindow(every: 1m, fn: count, createEmpty: false)\r\n |> yield(name: \"count\")\r\n\r\n\r\n", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + }, + { + "params": [ + "alias" + ], + "type": "alias" + } + ] + ], + "tags": [], + "tz": "" + } + ], + "title": "Hits per 1 min", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "_value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 123 + }, + "id": 34, + "maxDataPoints": 1, + "options": { + "basemap": { + "config": {}, + "name": "Layer 0", + "type": "default" + }, + "controls": { + "mouseWheelZoom": true, + "showAttribution": true, + "showDebug": false, + "showMeasure": false, + "showScale": false, + "showZoom": true + }, + "layers": [ + { + "config": { + "showLegend": true, + "style": { + "color": { + "field": "_value", + "fixed": "dark-green" + }, + "opacity": 0.6, + "rotation": { + "field": "_value", + "fixed": 0, + "max": 360, + "min": -360, + "mode": "mod" + }, + "size": { + "field": "_value", + "fixed": 5, + "max": 14, + "min": 2 + }, + "symbol": { + "fixed": "img/icons/marker/circle.svg", + "mode": "fixed" + }, + "text": { + "fixed": "", + "mode": "field" + }, + "textConfig": { + "fontSize": 12, + "offsetX": 0, + "offsetY": 0, + "textAlign": "center", + "textBaseline": "middle" + } + } + }, + "location": { + "mode": "auto" + }, + "name": "Monitoring IPs", + "tooltip": true, + "type": "markers" + } + ], + "tooltip": { + "mode": "details" + }, + "view": { + "allLayers": true, + "id": "fit", + "lat": 0, + "lon": 0, + "zoom": 14.94 + } + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "latitude" + ], + "type": "tag" + }, + { + "params": [ + "longitude" + ], + "type": "tag" + }, + { + "params": [ + "IP" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"MonitoringRedirIPs\" or r[\"_measurement\"] == \"MonitoringRProxyIPs\")\r\n |> filter(fn: (r) => r._field == \"IP\") \r\n |> group(columns: [\"longitude\",\"latitude\",\"IP\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + }, + { + "params": [ + "counts" + ], + "type": "alias" + } + ] + ], + "tags": [] + } + ], + "title": "Only excluded IPs Map", + "transformations": [ + { + "id": "labelsToFields", + "options": {} + }, + { + "id": "merge", + "options": {} + }, + { + "id": "joinByField", + "options": { + "byField": "IP", + "mode": "outer" + } + } + ], + "type": "geomap" + } + ], + "title": "Detail overall (with excluded IPs and internal calls)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 86 + }, + "id": 21, + "panels": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 24, + "x": 0, + "y": 138 + }, + "id": 35, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Real Reverse Proxy Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 151 + }, + "id": 12, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 40, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"InternalRProxyIPs\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Internal Reverse Proxy Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 151 + }, + "id": 13, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 40, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"MonitoringRProxyIPs\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Monitoring Reverse Proxy Domains", + "type": "bargauge" + } + ], + "title": "Reverse Proxy - Monitoring and Internal Domain calls", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 87 + }, + "id": 30, + "panels": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 24, + "x": 0, + "y": 139 + }, + "id": 36, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Real Redirection Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 152 + }, + "id": 28, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 40, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"InternalRedirIPs\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Internal Redirection Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 152 + }, + "id": 29, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 40, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Monitoring Redirection Domains", + "type": "bargauge" + } + ], + "title": "Redirections - Monitoring and Internal Domain calls", + "type": "row" + } + ], + "refresh": "15s", + "schemaVersion": 38, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "15s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "npmGrafStats Map Dashboard Influx v2.4 NO filter", + "uid": "pvWDTV_MW1", + "version": 4, + "weekStart": "" +} \ No newline at end of file diff --git a/npmGrafStats Map Dashboard Influx v2.4 with filter.json b/npmGrafStats Map Dashboard Influx v2.4 with filter.json new file mode 100644 index 0000000..c675310 --- /dev/null +++ b/npmGrafStats Map Dashboard Influx v2.4 with filter.json @@ -0,0 +1,2603 @@ +{ + "__inputs": [ + { + "name": "DS_INFLUXDB2-NPMGRAFSTATS", + "label": "InfluxDB2-npmgrafstats", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, + { + "type": "panel", + "id": "geomap", + "name": "Geomap", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.2.2" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "npmGrafStats Map Dashboard with InfluxDB v2.4 powered by https://github.com/smilebasti/npmGrafStats.\n\nFor a Dashboard WITHOUT the filtering option use https://grafana.com/grafana/dashboards/20121.", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 18826, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 23, + "panels": [], + "title": "Real Connections (without monitoring services or internal calls)", + "type": "row" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "(without monitoring services or internal calls)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 17, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 11, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r[\"Domain\"] =~ /^${domainquery:regex}$/)\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "All real Accessed Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "_value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 0, + "y": 18 + }, + "id": 26, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 5, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Count" + } + ] + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "IP" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r[\"Domain\"] =~ /^${domainquery:regex}$/)\r\n |> filter(fn: (r) => r[\"_field\"] == \"IP\") \r\n |> group(columns: [\"IP\"])\r\n |> count()\r\n |> drop(columns: [\"_start\", \"_stop\"])\r\n |> yield(name: \"alias\")\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Hits per IP", + "transformations": [ + { + "id": "labelsToFields", + "options": { + "mode": "columns" + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "joinByField", + "options": { + "byField": "IP", + "mode": "outer" + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "(without monitoring services or internal calls)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 7, + "y": 18 + }, + "id": 25, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r[\"Domain\"] =~ /^${domainquery:regex}$/)\r\n |> filter(fn: (r) => r._field == \"IP\")\r\n |> group(columns: [\"_count\"])\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n |> count()", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "timeFrom": "5m", + "title": "Hit's in the last ...", + "type": "stat" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "(without monitoring services or internal calls)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 22, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 24, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "/.*/", + "limit": 220, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "alias": "", + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "name" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r[\"Domain\"] =~ /^${domainquery:regex}$/)\r\n |> filter(fn: (r) => r._field == \"Name\")\r\n |> group(columns: [\"Name\"])\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n |> count()", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "name" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [], + "tz": "" + } + ], + "title": "Hits per Nation", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 13, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "always", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green" + }, + { + "color": "yellow", + "value": 75 + }, + { + "color": "dark-red", + "value": 90 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "Domain" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 26 + }, + "id": 27, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "pluginVersion": "9.2.3", + "targets": [ + { + "alias": "", + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r[\"Domain\"] =~ /^${domainquery:regex}$/)\r\n |> filter(fn: (r) => r[\"_field\"] == \"Domain\")\r\n |> group(columns: [\"_measurement\", \"_field\", \"_time=1m\"])\r\n |> aggregateWindow(every: 1m, fn: count, createEmpty: false)\r\n |> yield(name: \"count\")\r\n\r\n\r\n", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + }, + { + "params": [ + "alias" + ], + "type": "alias" + } + ] + ], + "tags": [], + "tz": "" + } + ], + "title": "Hits per 1 min", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 31, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r[\"Domain\"] =~ /^${domainquery:regex}$/)\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Real Reverse Proxy Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Redirect Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 40 + }, + "id": 32, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\")\r\n |> filter(fn: (r) => r[\"Domain\"] =~ /^${domainquery:regex}$/)\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Real Redirection Domains", + "type": "bargauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 52 + }, + "id": 19, + "panels": [], + "title": "World Map", + "type": "row" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#c94141", + "mode": "thresholds" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "semi-dark-red" + }, + { + "color": "semi-dark-yellow", + "value": 4 + }, + { + "color": "#3ce126", + "value": 10 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "_value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 21, + "w": 24, + "x": 0, + "y": 53 + }, + "id": 33, + "maxDataPoints": 1, + "options": { + "basemap": { + "config": {}, + "name": "Layer 0", + "type": "default" + }, + "controls": { + "mouseWheelZoom": true, + "showAttribution": true, + "showDebug": false, + "showMeasure": false, + "showScale": false, + "showZoom": true + }, + "layers": [ + { + "config": { + "showLegend": true, + "style": { + "color": { + "field": "_value", + "fixed": "dark-green" + }, + "opacity": 0.6, + "rotation": { + "field": "_value", + "fixed": 0, + "max": 360, + "min": -360, + "mode": "mod" + }, + "size": { + "field": "_value", + "fixed": 5, + "max": 14, + "min": 2 + }, + "symbol": { + "fixed": "img/icons/marker/circle.svg", + "mode": "fixed" + }, + "text": { + "fixed": "", + "mode": "field" + }, + "textConfig": { + "fontSize": 12, + "offsetX": 0, + "offsetY": 0, + "textAlign": "center", + "textBaseline": "middle" + } + } + }, + "location": { + "mode": "auto" + }, + "name": "IP count", + "tooltip": true, + "type": "markers" + } + ], + "tooltip": { + "mode": "details" + }, + "view": { + "allLayers": true, + "id": "fit", + "lat": 0, + "lon": 0, + "zoom": 14.94 + } + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "latitude" + ], + "type": "tag" + }, + { + "params": [ + "longitude" + ], + "type": "tag" + }, + { + "params": [ + "IP" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r[\"Domain\"] =~ /^${domainquery:regex}$/)\r\n |> filter(fn: (r) => r._field == \"IP\") \r\n |> group(columns: [\"longitude\",\"latitude\",\"IP\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + }, + { + "params": [ + "counts" + ], + "type": "alias" + } + ] + ], + "tags": [] + } + ], + "title": "Real IPs Map Overview (without excluded IPs)", + "transformations": [ + { + "id": "labelsToFields", + "options": {} + }, + { + "id": "merge", + "options": {} + }, + { + "id": "joinByField", + "options": { + "byField": "IP", + "mode": "outer" + } + } + ], + "type": "geomap" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 74 + }, + "id": 37, + "panels": [], + "title": "ASN", + "type": "row" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "_value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 75 + }, + "id": 38, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Count" + } + ] + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\" or r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r[\"Domain\"] =~ /^${domainquery:regex}$/)\r\n |> filter(fn: (r) => r[\"_field\"] == \"Asn\") \r\n |> group(columns: [\"Asn\", \"IP\"])\r\n |> count()\r\n |> drop(columns: [\"_start\", \"_stop\"])\r\n |> yield(name: \"alias\")", + "refId": "A" + } + ], + "title": "ASN", + "transformations": [ + { + "id": "labelsToFields", + "options": {} + }, + { + "id": "merge", + "options": {} + } + ], + "type": "table" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 84 + }, + "id": 17, + "panels": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 17, + "w": 24, + "x": 0, + "y": 83 + }, + "id": 22, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "All Accessed Domains", + "type": "bargauge" + } + ], + "title": "All Accessed (with excluded IPs and internal calls)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 85 + }, + "id": 15, + "panels": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "_value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 0, + "y": 101 + }, + "id": 7, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 5, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Count" + } + ] + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "IP" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_field\"] == \"IP\") \r\n |> group(columns: [\"IP\"])\r\n |> count()\r\n |> drop(columns: [\"_start\", \"_stop\"])\r\n |> yield(name: \"alias\")\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Hits per IP", + "transformations": [ + { + "id": "labelsToFields", + "options": { + "mode": "columns" + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "joinByField", + "options": { + "byField": "IP", + "mode": "outer" + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 5, + "x": 7, + "y": 101 + }, + "id": 9, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._field == \"IP\")\r\n |> group(columns: [\"_count\"])\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n |> count()", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "timeFrom": "5m", + "title": "Hit's in the last ...", + "type": "stat" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 22, + "w": 12, + "x": 12, + "y": 101 + }, + "id": 5, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "/.*/", + "limit": 220, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "alias": "", + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "name" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._field == \"Name\")\r\n |> group(columns: [\"Name\"])\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n |> count()", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "name" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [], + "tz": "" + } + ], + "title": "Hits per Nation", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "yellow", + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 13, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "always", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green" + }, + { + "color": "yellow", + "value": 75 + }, + { + "color": "dark-red", + "value": 90 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 109 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "asc" + } + }, + "pluginVersion": "9.2.3", + "targets": [ + { + "alias": "", + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_field\"] == \"Domain\")\r\n |> group(columns: [\"_measurement\", \"_field\", \"_time=1m\"])\r\n |> aggregateWindow(every: 1m, fn: count, createEmpty: false)\r\n |> yield(name: \"count\")\r\n\r\n\r\n", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + }, + { + "params": [ + "alias" + ], + "type": "alias" + } + ] + ], + "tags": [], + "tz": "" + } + ], + "title": "Hits per 1 min", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-BlYlRd" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "_value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 123 + }, + "id": 34, + "maxDataPoints": 1, + "options": { + "basemap": { + "config": {}, + "name": "Layer 0", + "type": "default" + }, + "controls": { + "mouseWheelZoom": true, + "showAttribution": true, + "showDebug": false, + "showMeasure": false, + "showScale": false, + "showZoom": true + }, + "layers": [ + { + "config": { + "showLegend": true, + "style": { + "color": { + "field": "_value", + "fixed": "dark-green" + }, + "opacity": 0.6, + "rotation": { + "field": "_value", + "fixed": 0, + "max": 360, + "min": -360, + "mode": "mod" + }, + "size": { + "field": "_value", + "fixed": 5, + "max": 14, + "min": 2 + }, + "symbol": { + "fixed": "img/icons/marker/circle.svg", + "mode": "fixed" + }, + "text": { + "fixed": "", + "mode": "field" + }, + "textConfig": { + "fontSize": 12, + "offsetX": 0, + "offsetY": 0, + "textAlign": "center", + "textBaseline": "middle" + } + } + }, + "location": { + "mode": "auto" + }, + "name": "Monitoring IPs", + "tooltip": true, + "type": "markers" + } + ], + "tooltip": { + "mode": "details" + }, + "view": { + "allLayers": true, + "id": "fit", + "lat": 0, + "lon": 0, + "zoom": 14.94 + } + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "latitude" + ], + "type": "tag" + }, + { + "params": [ + "longitude" + ], + "type": "tag" + }, + { + "params": [ + "IP" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"MonitoringRedirIPs\" or r[\"_measurement\"] == \"MonitoringRProxyIPs\")\r\n |> filter(fn: (r) => r._field == \"IP\") \r\n |> group(columns: [\"longitude\",\"latitude\",\"IP\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "IP" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + }, + { + "params": [ + "counts" + ], + "type": "alias" + } + ] + ], + "tags": [] + } + ], + "title": "Only excluded IPs Map", + "transformations": [ + { + "id": "labelsToFields", + "options": {} + }, + { + "id": "merge", + "options": {} + }, + { + "id": "joinByField", + "options": { + "byField": "IP", + "mode": "outer" + } + } + ], + "type": "geomap" + } + ], + "title": "Detail overall (with excluded IPs and internal calls)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 86 + }, + "id": 21, + "panels": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 24, + "x": 0, + "y": 138 + }, + "id": 35, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"ReverseProxyConnections\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Real Reverse Proxy Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 151 + }, + "id": 12, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 40, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"InternalRProxyIPs\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Internal Reverse Proxy Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 151 + }, + "id": 13, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 40, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"MonitoringRProxyIPs\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Monitoring Reverse Proxy Domains", + "type": "bargauge" + } + ], + "title": "Reverse Proxy - Monitoring and Internal Domain calls", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 87 + }, + "id": 30, + "panels": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "noValue": "No Domain called", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 24, + "x": 0, + "y": 139 + }, + "id": 36, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 50, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Real Redirection Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 152 + }, + "id": 28, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 40, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"InternalRedirIPs\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Internal Redirection Domains", + "type": "bargauge" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "displayName": "${__field.labels.__values}", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 152 + }, + "id": 29, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "limit": 40, + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "groupBy": [ + { + "params": [ + "Domain" + ], + "type": "tag" + } + ], + "measurement": "ReverseProxyConnections", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: v.defaultBucket)\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Redirections\")\r\n |> filter(fn: (r) => r._field == \"Domain\")\r\n |> group(columns: [\"Domain\"])\r\n |> count()\r\n |> drop(columns: [\"host\", \"_field\", \"_measurement\", \"_start\", \"_stop\"])\r\n", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "Domain" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "Monitoring Redirection Domains", + "type": "bargauge" + } + ], + "title": "Redirections - Monitoring and Internal Domain calls", + "type": "row" + } + ], + "refresh": "15s", + "schemaVersion": 38, + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB2-NPMGRAFSTATS}" + }, + "definition": "import \"influxdata/influxdb/schema\"\r\nschema.tagValues(\r\n bucket: v.defaultBucket,\r\n tag: \"Domain\"\r\n)", + "hide": 0, + "includeAll": true, + "label": "Domain", + "multi": true, + "name": "domainquery", + "options": [], + "query": "import \"influxdata/influxdb/schema\"\r\nschema.tagValues(\r\n bucket: v.defaultBucket,\r\n tag: \"Domain\"\r\n)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "15s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "npmGrafStats Map Dashboard Influx v2.4 with filter", + "uid": "pvWDTV_MW", + "version": 18, + "weekStart": "" +} \ No newline at end of file diff --git a/sendips.sh b/sendips.sh index 4d50654..0b48172 100644 --- a/sendips.sh +++ b/sendips.sh @@ -14,6 +14,13 @@ then else monitorfile=false fi +# check if ASN DB exists +if [ -f "/geolite/GeoLite2-ASN.mmdb" ] +then + asndb=true +else + asndb=false +fi # gets all lines including an IP. # Grep finds the the IP addresses in the access.log @@ -53,10 +60,10 @@ do echo "An excluded monitoring service checked: $targetdomain" if [ "$MONITORING_LOGS" = "TRUE" ] then - python /root/.config/NPMGRAF/Getipinfo.py "$outsideip" "$targetdomain" "$length" "$targetip" "MonitoringRProxyIPs" "$measurementtime" + python /root/.config/NPMGRAF/Getipinfo.py "$outsideip" "$targetdomain" "$length" "$targetip" "MonitoringRProxyIPs" "$measurementtime" "$asndb" fi else - python /root/.config/NPMGRAF/Getipinfo.py "$outsideip" "$targetdomain" "$length" "$targetip" "ReverseProxyConnections" "$measurementtime" + python /root/.config/NPMGRAF/Getipinfo.py "$outsideip" "$targetdomain" "$length" "$targetip" "ReverseProxyConnections" "$measurementtime" "$asndb" fi done reboot diff --git a/sendredirectionips.sh b/sendredirectionips.sh index 5e481a1..99e1d58 100644 --- a/sendredirectionips.sh +++ b/sendredirectionips.sh @@ -14,6 +14,13 @@ then else monitorfile=false fi +# check if ASN DB exists +if [ -f "/geolite/GeoLite2-ASN.mmdb" ] +then + asndb=true +else + asndb=false +fi # gets all lines including an IP. # Grep finds the the IP addresses in the access.log @@ -46,10 +53,10 @@ do echo "An excluded monitoring service checked: $targetdomain" if [ "$MONITORING_LOGS" = "TRUE" ] then - python /root/.config/NPMGRAF/Getipinfo.py "$outsideip" "$targetdomain" "$length" "$targetip" "MonitoringRProxyIPs" "$measurementtime" + python /root/.config/NPMGRAF/Getipinfo.py "$outsideip" "$targetdomain" "$length" "$targetip" "MonitoringRProxyIPs" "$measurementtime" "$asndb" fi else - python /root/.config/NPMGRAF/Getipinfo.py "$outsideip" "$targetdomain" "0" "redirect" "Redirections" "$measurementtime" + python /root/.config/NPMGRAF/Getipinfo.py "$outsideip" "$targetdomain" "0" "redirect" "Redirections" "$measurementtime" "$asndb" fi done reboot diff --git a/start.sh b/start.sh index dadbd2c..9ce32ed 100644 --- a/start.sh +++ b/start.sh @@ -1,5 +1,5 @@ #!/bin/bash -echo "npmGrafStats: v2.3.2" +echo "npmGrafStats: v2.4.0-pre" echo "Startup: lets get the logs send them to influx"