From 31f25eca57e44c15fb7306087cc1df72eab51deb Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Mon, 31 Aug 2020 15:56:58 -0400 Subject: [PATCH] fix grafana related issues. add redis to standalone --- salt/grafana/dashboards/eval/eval.json | 64 -- salt/grafana/dashboards/manager/manager.json | 8 +- .../managersearch/managersearch.json | 8 +- .../dashboards/sensor_nodes/sensor.json | 64 -- .../dashboards/standalone/standalone.json | 955 ++++++++++-------- salt/telegraf/scripts/broloss.sh | 6 +- salt/telegraf/scripts/influxdbsize.sh | 4 +- salt/top.sls | 2 +- 8 files changed, 572 insertions(+), 539 deletions(-) diff --git a/salt/grafana/dashboards/eval/eval.json b/salt/grafana/dashboards/eval/eval.json index 978ee9035..53d9ca643 100644 --- a/salt/grafana/dashboards/eval/eval.json +++ b/salt/grafana/dashboards/eval/eval.json @@ -3860,70 +3860,6 @@ "value": "{{ MONINT }}" } ] - }, - { - "alias": "Outbound", - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$Interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "net", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT 8 * derivative(mean(\"bytes_sent\"),1s) FROM \"net\" WHERE \"host\" = 'JumpHost' AND \"interface\" = 'eth0' AND $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": false, - "refId": "B", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "bytes_sent" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - }, - { - "params": [ - "1s" - ], - "type": "derivative" - }, - { - "params": [ - "*8" - ], - "type": "math" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=", - "value": "{{ SERVERNAME }}" - }, - { - "condition": "AND", - "key": "interface", - "operator": "=", - "value": "{{ MONINT }}" - } - ] } ], "thresholds": [], diff --git a/salt/grafana/dashboards/manager/manager.json b/salt/grafana/dashboards/manager/manager.json index bf2580d34..ddee7e016 100644 --- a/salt/grafana/dashboards/manager/manager.json +++ b/salt/grafana/dashboards/manager/manager.json @@ -583,7 +583,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS Unparsed Queue", + "title": "{{ SERVERNAME }} - Redis Queue", "tooltip": { "shared": true, "sort": 0, @@ -711,7 +711,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS Parsed Queue", + "title": "{{ SERVERNAME }} - Redis Parsed Queue", "tooltip": { "shared": true, "sort": 0, @@ -1351,7 +1351,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS CPU Usage", + "title": "{{ SERVERNAME }} - Redis CPU Usage", "tooltip": { "shared": true, "sort": 0, @@ -1485,7 +1485,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS Memory Usage", + "title": "{{ SERVERNAME }} - Redis Memory Usage", "tooltip": { "shared": true, "sort": 0, diff --git a/salt/grafana/dashboards/managersearch/managersearch.json b/salt/grafana/dashboards/managersearch/managersearch.json index 485509477..47f409586 100644 --- a/salt/grafana/dashboards/managersearch/managersearch.json +++ b/salt/grafana/dashboards/managersearch/managersearch.json @@ -588,7 +588,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS Unparsed Queue", + "title": "{{ SERVERNAME }} - Redis Queue", "tooltip": { "shared": true, "sort": 0, @@ -714,7 +714,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS Parsed Queue", + "title": "{{ SERVERNAME }} - Redis Parsed Queue", "tooltip": { "shared": true, "sort": 0, @@ -1352,7 +1352,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS CPU Usage", + "title": "{{ SERVERNAME }} - Redis CPU Usage", "tooltip": { "shared": true, "sort": 0, @@ -1485,7 +1485,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS Memory Usage", + "title": "{{ SERVERNAME }} - Redis Memory Usage", "tooltip": { "shared": true, "sort": 0, diff --git a/salt/grafana/dashboards/sensor_nodes/sensor.json b/salt/grafana/dashboards/sensor_nodes/sensor.json index 1b0ab33a4..835c8a86d 100644 --- a/salt/grafana/dashboards/sensor_nodes/sensor.json +++ b/salt/grafana/dashboards/sensor_nodes/sensor.json @@ -3420,70 +3420,6 @@ "value": "{{ MONINT }}" } ] - }, - { - "alias": "OutBound", - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$Interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "net", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT 8 * derivative(mean(\"bytes_sent\"),1s) FROM \"net\" WHERE \"host\" = 'JumpHost' AND \"interface\" = 'eth0' AND $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": false, - "refId": "B", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "bytes_sent" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - }, - { - "params": [ - "1s" - ], - "type": "derivative" - }, - { - "params": [ - "*8" - ], - "type": "math" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=", - "value": "{{ SERVERNAME }}" - }, - { - "condition": "AND", - "key": "interface", - "operator": "=", - "value": "{{ MONINT }}" - } - ] } ], "thresholds": [], diff --git a/salt/grafana/dashboards/standalone/standalone.json b/salt/grafana/dashboards/standalone/standalone.json index ea370d3f0..969c228fe 100644 --- a/salt/grafana/dashboards/standalone/standalone.json +++ b/salt/grafana/dashboards/standalone/standalone.json @@ -17,12 +17,48 @@ "editable": true, "gnetId": 2381, "graphTooltip": 0, - "iteration": 1591887115766, + "iteration": 1598897583091, "links": [], "panels": [ { "cacheTimeout": null, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "max": 100, + "min": 0, + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 60 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, "gridPos": { "h": 5, "w": 4, @@ -32,50 +68,18 @@ "id": 2, "links": [], "options": { - "fieldOptions": { + "orientation": "horizontal", + "reduceOptions": { "calcs": [ "lastNotNull" ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 100, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 60 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [], + "fields": "", "values": false }, - "orientation": "horizontal", "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "6.7.3", + "pluginVersion": "7.0.5", "targets": [ { "dsType": "influxdb", @@ -138,6 +142,24 @@ }, { "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, "gridPos": { "h": 5, "w": 4, @@ -147,32 +169,18 @@ "id": 39, "options": { "colorMode": "value", - "fieldOptions": { + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { "calcs": [ "lastNotNull" ], - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgb(255, 255, 255)", - "value": null - } - ] - }, - "unit": "s" - }, - "overrides": [], + "fields": "", "values": false - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto" + } }, - "pluginVersion": "6.7.3", + "pluginVersion": "7.0.5", "targets": [ { "groupBy": [ @@ -229,6 +237,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -300,7 +314,7 @@ }, { "params": [ - " /{{ CPUS }}" + " / {{ CPUS }}" ], "type": "math" } @@ -368,6 +382,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -436,7 +456,7 @@ }, { "params": [ - " /{{ CPUS }}" + " / {{ CPUS }}" ], "type": "math" } @@ -508,6 +528,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -641,6 +667,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -766,6 +798,42 @@ { "cacheTimeout": null, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "max": "{{ ROOTFS }}", + "min": 0, + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": "{{ ROOTFS * '.80'|float }}" + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": "{{ ROOTFS * '.90'|float }}" + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, "gridPos": { "h": 5, "w": 4, @@ -775,50 +843,18 @@ "id": 12, "links": [], "options": { - "fieldOptions": { + "orientation": "horizontal", + "reduceOptions": { "calcs": [ "lastNotNull" ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ ROOTFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ ROOTFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ ROOTFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" - }, - "overrides": [], + "fields": "", "values": false }, - "orientation": "horizontal", "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "6.7.3", + "pluginVersion": "7.0.5", "targets": [ { "dsType": "influxdb", @@ -876,6 +912,42 @@ { "cacheTimeout": null, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "max": "{{ NSMFS }}", + "min": 0, + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": "{{ ROOTFS * '.80'|float }}" + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": "{{ ROOTFS * '.90'|float }}" + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, "gridPos": { "h": 5, "w": 4, @@ -885,50 +957,18 @@ "id": 31, "links": [], "options": { - "fieldOptions": { + "orientation": "horizontal", + "reduceOptions": { "calcs": [ "lastNotNull" ], - "defaults": { - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": "{{ NSMFS }}", - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": "{{ NSMFS * '.80'|float }}" - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": "{{ NSMFS * '.90'|float }}" - } - ] - }, - "unit": "bytes" - }, - "overrides": [], + "fields": "", "values": false }, - "orientation": "horizontal", "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "6.7.3", + "pluginVersion": "7.0.5", "targets": [ { "dsType": "influxdb", @@ -989,6 +1029,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -1057,7 +1103,7 @@ }, { "params": [ - " /{{ CPUS }}" + " / {{ CPUS }}" ], "type": "math" } @@ -1128,6 +1174,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -1196,7 +1248,7 @@ }, { "params": [ - " /{{ CPUS }}" + " / {{ CPUS }}" ], "type": "math" } @@ -1268,6 +1320,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -1338,7 +1396,7 @@ }, { "params": [ - " /{{ CPUS }}" + " / {{ CPUS }}" ], "type": "math" } @@ -1407,6 +1465,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -1477,7 +1541,7 @@ }, { "params": [ - " /{{ CPUS }}" + " / {{ CPUS }}" ], "type": "math" } @@ -1556,6 +1620,12 @@ "datasource": "InfluxDB", "editable": true, "error": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 4, "fillGradient": 0, "grid": {}, @@ -1948,6 +2018,12 @@ "datasource": "InfluxDB", "editable": true, "error": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "grid": {}, @@ -2163,6 +2239,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -2296,6 +2378,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -2436,6 +2524,12 @@ "datasource": "InfluxDB", "editable": true, "error": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "grid": {}, @@ -2708,6 +2802,12 @@ "datasource": "InfluxDB", "editable": true, "error": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "grid": {}, @@ -2808,70 +2908,6 @@ "value": "{{ MONINT }}" } ] - }, - { - "alias": "Outbound", - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$Interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "net", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT 8 * derivative(mean(\"bytes_sent\"),1s) FROM \"net\" WHERE \"host\" = 'JumpHost' AND \"interface\" = 'eth0' AND $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": false, - "refId": "B", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "bytes_sent" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - }, - { - "params": [ - "1s" - ], - "type": "derivative" - }, - { - "params": [ - "*8" - ], - "type": "math" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=", - "value": "{{ SERVERNAME }}" - }, - { - "condition": "AND", - "key": "interface", - "operator": "=", - "value": "{{ MONINT }}" - } - ] } ], "thresholds": [], @@ -2918,6 +2954,26 @@ }, { "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, "gridPos": { "h": 5, "w": 4, @@ -2927,34 +2983,18 @@ "id": 37, "options": { "colorMode": "value", - "fieldOptions": { + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { "calcs": [ "sum" ], - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - } - }, - "overrides": [], + "fields": "", "values": false - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto" + } }, - "pluginVersion": "6.7.3", + "pluginVersion": "7.0.5", "targets": [ { "groupBy": [ @@ -3007,6 +3047,43 @@ { "cacheTimeout": null, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "max": 1209600, + "min": 0, + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 259200 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 432000 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, "gridPos": { "h": 5, "w": 4, @@ -3016,51 +3093,18 @@ "id": 22, "links": [], "options": { - "fieldOptions": { + "orientation": "horizontal", + "reduceOptions": { "calcs": [ "lastNotNull" ], - "defaults": { - "decimals": 2, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 1209600, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 259200 - }, - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 432000 - } - ] - }, - "unit": "s" - }, - "overrides": [], + "fields": "", "values": false }, - "orientation": "horizontal", "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "6.7.3", + "pluginVersion": "7.0.5", "targets": [ { "dsType": "influxdb", @@ -3122,6 +3166,12 @@ "datasource": "InfluxDB", "editable": true, "error": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 7, "fillGradient": 0, "grid": {}, @@ -3338,6 +3388,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -3546,6 +3602,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -3616,7 +3678,7 @@ }, { "params": [ - " /{{ CPUS }}" + " / {{ CPUS }}" ], "type": "math" } @@ -3685,6 +3747,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -3820,6 +3888,12 @@ "datasource": "InfluxDB", "editable": true, "error": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "grid": {}, @@ -3950,6 +4024,12 @@ "dashes": false, "datasource": "InfluxDB", "description": "", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -4154,10 +4234,15 @@ { "aliasColors": {}, "bars": false, - "cacheTimeout": null, "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -4167,6 +4252,139 @@ "y": 25 }, "hiddenSeries": false, + "id": 69, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "1s" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "influxsize", + "orderByTime": "ASC", + "policy": "autogen", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "bytes" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=", + "value": "{{ SERVERNAME }}" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "InfluxDB Size", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:340", + "format": "deckbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:341", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 4, + "x": 20, + "y": 25 + }, + "hiddenSeries": false, "id": 20, "legend": { "avg": false, @@ -4292,132 +4510,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 4, - "x": 20, - "y": 25 - }, - "hiddenSeries": false, - "id": 57, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "redisqueue", - "orderByTime": "ASC", - "policy": "default", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "parsed" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=", - "value": "{{ SERVERNAME }}" - } - ] - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS Parsed Queue", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2046", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "fieldConfig": { + "defaults": { + "custom": {} }, - { - "$$hashKey": "object:2047", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "InfluxDB", + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -4545,6 +4643,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -4753,6 +4857,12 @@ "dashes": false, "datasource": "InfluxDB", "description": "", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -4834,7 +4944,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS Unparsed Queue", + "title": "{{ SERVERNAME }} - Redis Queue", "tooltip": { "shared": true, "sort": 0, @@ -4881,6 +4991,12 @@ "datasource": "InfluxDB", "editable": true, "error": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "grid": {}, @@ -5068,6 +5184,12 @@ "datasource": "InfluxDB", "editable": true, "error": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "format": "none", "gauge": { "maxValue": 100, @@ -5182,6 +5304,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -5308,6 +5436,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -5395,7 +5529,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS Memory Usage", + "title": "{{ SERVERNAME }} - Redis Memory Usage", "tooltip": { "shared": true, "sort": 0, @@ -5441,6 +5575,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -5509,7 +5649,7 @@ }, { "params": [ - "/{{ CPUS }}" + "/ {{ CPUS }}" ], "type": "math" } @@ -5534,7 +5674,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "{{ SERVERNAME }} - REDIS CPU Usage", + "title": "{{ SERVERNAME }} - Redis CPU Usage", "tooltip": { "shared": true, "sort": 0, @@ -5588,6 +5728,12 @@ "decimals": null, "editable": true, "error": false, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 6, "fillGradient": 0, "grid": {}, @@ -5848,6 +5994,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -6018,6 +6170,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -6145,6 +6303,12 @@ "dashLength": 10, "dashes": false, "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -6267,7 +6431,7 @@ } ], "refresh": "30s", - "schemaVersion": 22, + "schemaVersion": 25, "style": "dark", "tags": [], "templating": { @@ -6384,9 +6548,6 @@ }, "timezone": "browser", "title": "Standalone Mode - {{ SERVERNAME }} Overview", - "uid": "{{ UID }}", - "variables": { - "list": [] - }, - "version": 1 + "uid": "so_overview", + "version": 4 } \ No newline at end of file diff --git a/salt/telegraf/scripts/broloss.sh b/salt/telegraf/scripts/broloss.sh index 9fcf2d527..6dc6cdeeb 100644 --- a/salt/telegraf/scripts/broloss.sh +++ b/salt/telegraf/scripts/broloss.sh @@ -4,14 +4,14 @@ ZEEKLOG=$(tac /host/nsm/zeek/logs/packetloss.log | head -2) declare RESULT=($ZEEKLOG) CURRENTDROP=${RESULT[3]} PASTDROP=${RESULT[9]} -DROPPED=$(($CURRENTDROP - $PASTDROP)) +DROPPED=$((CURRENTDROP - PASTDROP)) if [ $DROPPED == 0 ]; then LOSS=0 echo "brodrop drop=0" else CURRENTPACKETS=${RESULT[5]} PASTPACKETS=${RESULT[11]} - TOTAL=$(($CURRENTPACKETS - $PASTPACKETS)) + TOTAL=$((CURRENTPACKETS - PASTPACKETS)) LOSS=$(echo $DROPPED $TOTAL / p | dc) echo "brodrop drop=$LOSS" -fi +fi \ No newline at end of file diff --git a/salt/telegraf/scripts/influxdbsize.sh b/salt/telegraf/scripts/influxdbsize.sh index f3b3b2a3c..7060942ae 100644 --- a/salt/telegraf/scripts/influxdbsize.sh +++ b/salt/telegraf/scripts/influxdbsize.sh @@ -1,5 +1,5 @@ #!/bin/bash -INFLUXSIZE=$(du -s -B1 /host/nsm/influxdb | awk {'print $1'}) +INFLUXSIZE=$(du -s -k /host/nsm/influxdb | awk {'print $1'}) -echo "influxsize bytes=$INFLUXSIZE" +echo "influxsize kbytes=$INFLUXSIZE" diff --git a/salt/top.sls b/salt/top.sls index 795a89681..e091444f2 100644 --- a/salt/top.sls +++ b/salt/top.sls @@ -199,6 +199,7 @@ base: {%- endif %} - logstash - minio + - redis - kibana - pcap - suricata @@ -213,7 +214,6 @@ base: - elastalert {%- if FLEETMANAGER or FLEETNODE %} - fleet - - redis - fleet.install_package {%- endif %} - utility