From fcc6802f8637fc189fccbac52f4303b0f8054c4d Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 20 Jul 2021 08:51:53 -0400 Subject: [PATCH] convert all singlestat to stat --- salt/grafana/defaults.yaml | 16 +-- salt/grafana/panels/io_wait_stat.json.jinja | 122 ++++++++++++++++ ... => load_average_5_minute_stat.json.jinja} | 8 +- ...gstash_estimated_eps_singlestat.json.jinja | 120 ---------------- .../logstash_estimated_eps_stat.json.jinja | 112 +++++++++++++++ ...monitor_interface_traffic_stat.json.jinja} | 133 +++++++++--------- .../panels/old/io_wait_singlestat.json.jinja | 132 ----------------- .../pcap_packet_loss_singlestat.json.jinja | 125 ---------------- .../pcap_retention_singlestat.json.jinja | 133 ------------------ .../panels/pcap_retention_stat.json.jinja | 112 +++++++++++++++ .../panels/redis_queue_stat.json.jinja | 94 +++++++++++++ .../stenographer_packet_loss_stat.json.jinja | 114 +++++++++++++++ ...suricata_packet_loss_singlestat.json.jinja | 131 ----------------- .../suricata_packet_loss_stat.json.jinja | 120 ++++++++++++++++ .../zeek_packet_loss_singlestat.json.jinja | 131 ----------------- .../panels/zeek_packet_loss_stat.json.jinja | 120 ++++++++++++++++ 16 files changed, 870 insertions(+), 853 deletions(-) create mode 100644 salt/grafana/panels/io_wait_stat.json.jinja rename salt/grafana/panels/{load_average_5_minute_singlestat.json.jinja => load_average_5_minute_stat.json.jinja} (88%) delete mode 100644 salt/grafana/panels/logstash_estimated_eps_singlestat.json.jinja create mode 100644 salt/grafana/panels/logstash_estimated_eps_stat.json.jinja rename salt/grafana/panels/{monitor_traffic_singlestat.json.jinja => monitor_interface_traffic_stat.json.jinja} (51%) delete mode 100644 salt/grafana/panels/old/io_wait_singlestat.json.jinja delete mode 100644 salt/grafana/panels/pcap_packet_loss_singlestat.json.jinja delete mode 100644 salt/grafana/panels/pcap_retention_singlestat.json.jinja create mode 100644 salt/grafana/panels/pcap_retention_stat.json.jinja create mode 100644 salt/grafana/panels/redis_queue_stat.json.jinja create mode 100644 salt/grafana/panels/stenographer_packet_loss_stat.json.jinja delete mode 100644 salt/grafana/panels/suricata_packet_loss_singlestat.json.jinja create mode 100644 salt/grafana/panels/suricata_packet_loss_stat.json.jinja delete mode 100644 salt/grafana/panels/zeek_packet_loss_singlestat.json.jinja create mode 100644 salt/grafana/panels/zeek_packet_loss_stat.json.jinja diff --git a/salt/grafana/defaults.yaml b/salt/grafana/defaults.yaml index a97b2be96..89d56f1a2 100644 --- a/salt/grafana/defaults.yaml +++ b/salt/grafana/defaults.yaml @@ -47,43 +47,43 @@ grafana: y: 1 h: 4 w: 4 - load_average_5_minute_singlestat: + load_average_5_minute_stat: gridPos: x: 4 y: 1 h: 4 w: 4 - zeek_packet_loss_singlestat: + zeek_packet_loss_stat: gridPos: x: 8 y: 1 h: 4 w: 4 - suricata_packet_loss_singlestat: + suricata_packet_loss_stat: gridPos: x: 12 y: 1 h: 4 w: 4 - pcap_packet_loss_singlestat: + stenographer_packet_loss_stat: gridPos: x: 16 y: 1 h: 4 w: 4 - logstash_estimated_eps_singlestat: + logstash_estimated_eps_stat: gridPos: x: 20 y: 1 h: 4 w: 4 - io_wait_singlestat: + io_wait_stat: gridPos: x: 0 y: 5 h: 4 w: 4 - monitor_traffic_singlestat: + monitor_interface_traffic_stat: gridPos: x: 4 y: 5 @@ -119,7 +119,7 @@ grafana: y: 5 h: 4 w: 2 - pcap_retention_singlestat: + pcap_retention_stat: gridPos: x: 18 y: 5 diff --git a/salt/grafana/panels/io_wait_stat.json.jinja b/salt/grafana/panels/io_wait_stat.json.jinja new file mode 100644 index 000000000..5b816bdfd --- /dev/null +++ b/salt/grafana/panels/io_wait_stat.json.jinja @@ -0,0 +1,122 @@ +{ + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 40 + }, + { + "color": "dark-red", + "value": 50 + } + ] + }, + "mappings": [ + { + "op": "=", + "text": "N/A", + "value": "null", + "$$hashKey": "object:1217", + "id": 0, + "type": 1 + } + ], + "unit": "percent", + "decimals": 2, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + }, + "gridPos": { + "x": {{ PANELS.io_wait_stat.gridPos.x }}, + "y": {{ PANELS.io_wait_stat.gridPos.y }}, + "w": {{ PANELS.io_wait_stat.gridPos.w }}, + "h": {{ PANELS.io_wait_stat.gridPos.h }} + }, + "id": 61867, + "links": [], + "maxDataPoints": 100, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "cpu", + "policy": "default", + "query": "SELECT non_negative_derivative(mean(\"usage_iowait\"), 1s) FROM \"cpu\" WHERE \"host\" =~ /^$servername$/ AND \"cpu\" = 'cpu-total' AND $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "usage_iowait" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + }, + { + "condition": "AND", + "key": "cpu", + "operator": "=", + "value": "cpu-total" + } + ], + "orderByTime": "ASC" + } + ], + "title": "IOWait", + "type": "stat", + "options": { + "reduceOptions": { + "values": false, + "calcs": [ + "last" + ], + "fields": "" + }, + "orientation": "horizontal", + "text": {}, + "textMode": "auto", + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto" + }, + "cacheTimeout": null, + "interval": null, + "pluginVersion": "7.5.4" +} diff --git a/salt/grafana/panels/load_average_5_minute_singlestat.json.jinja b/salt/grafana/panels/load_average_5_minute_stat.json.jinja similarity index 88% rename from salt/grafana/panels/load_average_5_minute_singlestat.json.jinja rename to salt/grafana/panels/load_average_5_minute_stat.json.jinja index 1b8f9ae80..c4a75c35b 100644 --- a/salt/grafana/panels/load_average_5_minute_singlestat.json.jinja +++ b/salt/grafana/panels/load_average_5_minute_stat.json.jinja @@ -37,10 +37,10 @@ "overrides": [] }, "gridPos": { - "x": {{ PANELS.load_average_5_minute_singlestat.gridPos.x }}, - "y": {{ PANELS.load_average_5_minute_singlestat.gridPos.y }}, - "w": {{ PANELS.load_average_5_minute_singlestat.gridPos.w }}, - "h": {{ PANELS.load_average_5_minute_singlestat.gridPos.h }} + "x": {{ PANELS.load_average_5_minute_stat.gridPos.x }}, + "y": {{ PANELS.load_average_5_minute_stat.gridPos.y }}, + "w": {{ PANELS.load_average_5_minute_stat.gridPos.w }}, + "h": {{ PANELS.load_average_5_minute_stat.gridPos.h }} }, "id": 61859, "links": [], diff --git a/salt/grafana/panels/logstash_estimated_eps_singlestat.json.jinja b/salt/grafana/panels/logstash_estimated_eps_singlestat.json.jinja deleted file mode 100644 index 7532e63dc..000000000 --- a/salt/grafana/panels/logstash_estimated_eps_singlestat.json.jinja +++ /dev/null @@ -1,120 +0,0 @@ -{ - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "InfluxDB", - "decimals": 0, - "editable": true, - "error": false, - "format": "short", - "gauge": {}, - "gridPos": { - "x": {{ PANELS.logstash_estimated_eps_singlestat.gridPos.x }}, - "y": {{ PANELS.logstash_estimated_eps_singlestat.gridPos.y }}, - "w": {{ PANELS.logstash_estimated_eps_singlestat.gridPos.w }}, - "h": {{ PANELS.logstash_estimated_eps_singlestat.gridPos.h }} - }, - "height": "150", - "id": 23, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "consumptioneps", - "orderByTime": "ASC", - "policy": "default", - "queryType": "randomWalk", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "eps" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=", - "value": "$servername" - } - ] - } - ], - "thresholds": "", - "title": "Estimated EPS", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current", - "fieldConfig": { - "defaults": {}, - "overrides": [] - } -} diff --git a/salt/grafana/panels/logstash_estimated_eps_stat.json.jinja b/salt/grafana/panels/logstash_estimated_eps_stat.json.jinja new file mode 100644 index 000000000..49dc48a4a --- /dev/null +++ b/salt/grafana/panels/logstash_estimated_eps_stat.json.jinja @@ -0,0 +1,112 @@ +{ + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "value": 1, + "color": "dark-green" + } + ] + }, + "mappings": [ + { + "op": "=", + "text": "N/A", + "value": "null", + "$$hashKey": "object:730", + "id": 0, + "type": 1 + } + ], + "unit": "short", + "decimals": 0, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + }, + "gridPos": { + "x": {{ PANELS.logstash_estimated_eps_stat.gridPos.x }}, + "y": {{ PANELS.logstash_estimated_eps_stat.gridPos.y }}, + "w": {{ PANELS.logstash_estimated_eps_stat.gridPos.w }}, + "h": {{ PANELS.logstash_estimated_eps_stat.gridPos.h }} + }, + "id": 23, + "interval": "30s", + "links": [], + "maxDataPoints": 750, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "consumptioneps", + "orderByTime": "ASC", + "policy": "default", + "queryType": "randomWalk", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "eps" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=", + "value": "$servername" + } + ] + } + ], + "title": "Estimated EPS", + "type": "stat", + "options": { + "reduceOptions": { + "values": false, + "calcs": [ + "last" + ], + "fields": "" + }, + "orientation": "horizontal", + "text": {}, + "textMode": "value", + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto" + }, + "cacheTimeout": null, + "pluginVersion": "7.5.4", + "timeFrom": null +} diff --git a/salt/grafana/panels/monitor_traffic_singlestat.json.jinja b/salt/grafana/panels/monitor_interface_traffic_stat.json.jinja similarity index 51% rename from salt/grafana/panels/monitor_traffic_singlestat.json.jinja rename to salt/grafana/panels/monitor_interface_traffic_stat.json.jinja index 704095b7d..4d1c9dcc8 100644 --- a/salt/grafana/panels/monitor_traffic_singlestat.json.jinja +++ b/salt/grafana/panels/monitor_interface_traffic_stat.json.jinja @@ -1,60 +1,51 @@ { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], "datasource": "InfluxDB", - "decimals": 2, - "editable": true, - "error": false, - "format": "bps", - "gauge": {}, - "gridPos": { - "x": {{ PANELS.monitor_traffic_singlestat.gridPos.x }}, - "y": {{ PANELS.monitor_traffic_singlestat.gridPos.y }}, - "w": {{ PANELS.monitor_traffic_singlestat.gridPos.w }}, - "h": {{ PANELS.monitor_traffic_singlestat.gridPos.h }} - }, - "height": "150", - "id": 24, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.5 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 3 + } + ] + }, + "mappings": [ + { + "op": "=", + "text": "N/A", + "value": "null", + "$$hashKey": "object:645", + "id": 0, + "type": 1 + } + ], + "unit": "bps", + "decimals": 2, + "color": { + "mode": "thresholds" + } }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true + "overrides": [] }, - "tableColumn": "", + "gridPos": { + "x": {{ PANELS.monitor_interface_traffic_stat.gridPos.x }}, + "y": {{ PANELS.monitor_interface_traffic_stat.gridPos.y }}, + "w": {{ PANELS.monitor_interface_traffic_stat.gridPos.w }}, + "h": {{ PANELS.monitor_interface_traffic_stat.gridPos.h }} + }, + "id": 24, + "links": [], + "maxDataPoints": 100, "targets": [ { "dsType": "influxdb", @@ -118,20 +109,24 @@ ] } ], - "thresholds": ".5,3,5", - "title": "Monitor Traffic", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current", - "fieldConfig": { - "defaults": {}, - "overrides": [] - } + "title": "Monitor Traffic - $monint", + "type": "stat", + "options": { + "reduceOptions": { + "values": false, + "calcs": [ + "lastNotNull" + ], + "fields": "" + }, + "orientation": "horizontal", + "text": {}, + "textMode": "value", + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto" + }, + "cacheTimeout": null, + "interval": null, + "pluginVersion": "7.5.4" } diff --git a/salt/grafana/panels/old/io_wait_singlestat.json.jinja b/salt/grafana/panels/old/io_wait_singlestat.json.jinja deleted file mode 100644 index 3e35d0d02..000000000 --- a/salt/grafana/panels/old/io_wait_singlestat.json.jinja +++ /dev/null @@ -1,132 +0,0 @@ -{ - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "InfluxDB", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "x": {{ PANELS.io_wait_singlestat.gridPos.x }}, - "y": {{ PANELS.io_wait_singlestat.gridPos.y }}, - "w": {{ PANELS.io_wait_singlestat.gridPos.w }}, - "h": {{ PANELS.io_wait_singlestat.gridPos.h }} - }, - "height": "150", - "id": 61867, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "cpu", - "policy": "default", - "query": "SELECT non_negative_derivative(mean(\"usage_iowait\"), 1s) FROM \"cpu\" WHERE \"host\" =~ /^$servername$/ AND \"cpu\" = 'cpu-total' AND $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": false, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "usage_iowait" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=~", - "value": "/^$servername$/" - }, - { - "condition": "AND", - "key": "cpu", - "operator": "=", - "value": "cpu-total" - } - ] - } - ], - "thresholds": "30,40,50", - "title": "IOWait", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current", - "fieldConfig": { - "defaults": {}, - "overrides": [] - } -} diff --git a/salt/grafana/panels/pcap_packet_loss_singlestat.json.jinja b/salt/grafana/panels/pcap_packet_loss_singlestat.json.jinja deleted file mode 100644 index 8b1ada6c8..000000000 --- a/salt/grafana/panels/pcap_packet_loss_singlestat.json.jinja +++ /dev/null @@ -1,125 +0,0 @@ -{ - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "InfluxDB", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "x": {{ PANELS.pcap_packet_loss_singlestat.gridPos.x }}, - "y": {{ PANELS.pcap_packet_loss_singlestat.gridPos.y }}, - "w": {{ PANELS.pcap_packet_loss_singlestat.gridPos.w }}, - "h": {{ PANELS.pcap_packet_loss_singlestat.gridPos.h }} - }, - "height": "150", - "id": 22, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "stenodrop", - "orderByTime": "ASC", - "policy": "default", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "drop" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=", - "value": "$servername" - } - ] - } - ], - "thresholds": ".5,3,5", - "title": "PCAP Packet Loss", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current", - "fieldConfig": { - "defaults": {}, - "overrides": [] - } -} diff --git a/salt/grafana/panels/pcap_retention_singlestat.json.jinja b/salt/grafana/panels/pcap_retention_singlestat.json.jinja deleted file mode 100644 index 1d8a1ef89..000000000 --- a/salt/grafana/panels/pcap_retention_singlestat.json.jinja +++ /dev/null @@ -1,133 +0,0 @@ -{ - "colorValue": true, - "colors": [ - "rgba(255, 255, 255, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "InfluxDB", - "editable": true, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "x": {{ PANELS.pcap_retention_singlestat.gridPos.x }}, - "y": {{ PANELS.pcap_retention_singlestat.gridPos.y }}, - "w": {{ PANELS.pcap_retention_singlestat.gridPos.w }}, - "h": {{ PANELS.pcap_retention_singlestat.gridPos.h }} - }, - "height": "150", - "id": 26, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "postfix": " days", - "postfixFontSize": "50%", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "pcapage", - "orderByTime": "ASC", - "policy": "default", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "seconds" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - }, - { - "params": [ - "/86400" - ], - "type": "math" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=", - "value": "$servername" - } - ], - "orderByTime": "ASC" - } - ], - "thresholds": "", - "title": "PCAP Retention", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "cacheTimeout": null, - "colorBackground": false, - "decimals": 2, - "error": false, - "interval": null, - "nullText": null, - "postfix": "", - "prefix": "", - "tableColumn": "" -} diff --git a/salt/grafana/panels/pcap_retention_stat.json.jinja b/salt/grafana/panels/pcap_retention_stat.json.jinja new file mode 100644 index 000000000..1fa39dec2 --- /dev/null +++ b/salt/grafana/panels/pcap_retention_stat.json.jinja @@ -0,0 +1,112 @@ +{ + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "mappings": [ + { + "op": "=", + "text": "N/A", + "value": "null", + "$$hashKey": "object:1382", + "id": 0, + "type": 1 + } + ], + "unit": "d", + "decimals": 2, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + }, + "gridPos": { + "x": {{ PANELS.pcap_retention_stat.gridPos.x }}, + "y": {{ PANELS.pcap_retention_stat.gridPos.y }}, + "w": {{ PANELS.pcap_retention_stat.gridPos.w }}, + "h": {{ PANELS.pcap_retention_stat.gridPos.h }} + }, + "id": 26, + "links": [], + "maxDataPoints": 100, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pcapage", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "seconds" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "/86400" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=", + "value": "$servername" + } + ] + } + ], + "title": "PCAP Retention", + "type": "stat", + "options": { + "reduceOptions": { + "values": false, + "calcs": [ + "last" + ], + "fields": "" + }, + "orientation": "horizontal", + "text": {}, + "textMode": "value", + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto" + }, + "cacheTimeout": null, + "interval": null, + "pluginVersion": "7.5.4" +} diff --git a/salt/grafana/panels/redis_queue_stat.json.jinja b/salt/grafana/panels/redis_queue_stat.json.jinja new file mode 100644 index 000000000..631616e02 --- /dev/null +++ b/salt/grafana/panels/redis_queue_stat.json.jinja @@ -0,0 +1,94 @@ +{ + "type": "stat", + "title": "Redis Unparsed Queue", + "gridPos": { + "x": {{ PANELS.redis_queue_stat.gridPos.x }}, + "y": {{ PANELS.redis_queue_stat.gridPos.y }}, + "w": {{ PANELS.redis_queue_stat.gridPos.w }}, + "h": {{ PANELS.redis_queue_stat.gridPos.h }} + }, + "id": 68894, + "targets": [ + { + "refId": "A", + "queryType": "randomWalk", + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "unparsed" + ] + }, + { + "type": "mean", + "params": [] + } + ] + ], + "measurement": "redisqueue" + } + ], + "options": { + "reduceOptions": { + "values": false, + "calcs": [ + "last" + ], + "fields": "" + }, + "orientation": "auto", + "text": {}, + "textMode": "auto", + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto" + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "mappings": [], + "color": { + "mode": "thresholds" + }, + "unit": "short" + }, + "overrides": [] + }, + "pluginVersion": "7.5.4", + "datasource": "InfluxDB", + "timeFrom": null, + "timeShift": null +} diff --git a/salt/grafana/panels/stenographer_packet_loss_stat.json.jinja b/salt/grafana/panels/stenographer_packet_loss_stat.json.jinja new file mode 100644 index 000000000..0a4770c4b --- /dev/null +++ b/salt/grafana/panels/stenographer_packet_loss_stat.json.jinja @@ -0,0 +1,114 @@ +{ + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "dark-red", + "value": 5 + } + ] + }, + "mappings": [ + { + "op": "=", + "text": "N/A", + "value": "null", + "$$hashKey": "object:1120", + "id": 0, + "type": 1 + } + ], + "unit": "percent", + "decimals": 2, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + }, + "gridPos": { + "x": {{ PANELS.stenographer_packet_loss_stat.gridPos.x }}, + "y": {{ PANELS.stenographer_packet_loss_stat.gridPos.y }}, + "w": {{ PANELS.stenographer_packet_loss_stat.gridPos.w }}, + "h": {{ PANELS.stenographer_packet_loss_stat.gridPos.h }} + }, + "id": 22, + "links": [], + "maxDataPoints": 100, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "stenodrop", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "drop" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=", + "value": "$servername" + } + ] + } + ], + "title": "Stenographer Packet Loss", + "type": "stat", + "options": { + "reduceOptions": { + "values": false, + "calcs": [ + "last" + ], + "fields": "" + }, + "orientation": "horizontal", + "text": {}, + "textMode": "auto", + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto" + }, + "cacheTimeout": null, + "interval": null, + "pluginVersion": "7.5.4" +} diff --git a/salt/grafana/panels/suricata_packet_loss_singlestat.json.jinja b/salt/grafana/panels/suricata_packet_loss_singlestat.json.jinja deleted file mode 100644 index fa68557e4..000000000 --- a/salt/grafana/panels/suricata_packet_loss_singlestat.json.jinja +++ /dev/null @@ -1,131 +0,0 @@ -{ - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "InfluxDB", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "x": {{ PANELS.suricata_packet_loss_singlestat.gridPos.x }}, - "y": {{ PANELS.suricata_packet_loss_singlestat.gridPos.y }}, - "w": {{ PANELS.suricata_packet_loss_singlestat.gridPos.w }}, - "h": {{ PANELS.suricata_packet_loss_singlestat.gridPos.h }} - }, - "height": "150", - "id": 20, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "suridrop", - "orderByTime": "ASC", - "policy": "default", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "drop" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - }, - { - "params": [ - "* 100" - ], - "type": "math" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=", - "value": "$servername" - } - ] - } - ], - "thresholds": ".5,3,5", - "title": "Suricata Packet Loss", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current", - "fieldConfig": { - "defaults": {}, - "overrides": [] - } -} diff --git a/salt/grafana/panels/suricata_packet_loss_stat.json.jinja b/salt/grafana/panels/suricata_packet_loss_stat.json.jinja new file mode 100644 index 000000000..cd17c1c36 --- /dev/null +++ b/salt/grafana/panels/suricata_packet_loss_stat.json.jinja @@ -0,0 +1,120 @@ +{ + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "dark-red", + "value": 5 + } + ] + }, + "mappings": [ + { + "op": "=", + "text": "N/A", + "value": "null", + "$$hashKey": "object:949", + "id": 0, + "type": 1 + } + ], + "unit": "percent", + "decimals": 2, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + }, + "gridPos": { + "x": {{ PANELS.suricata_packet_loss_stat.gridPos.x }}, + "y": {{ PANELS.suricata_packet_loss_stat.gridPos.y }}, + "w": {{ PANELS.suricata_packet_loss_stat.gridPos.w }}, + "h": {{ PANELS.suricata_packet_loss_stat.gridPos.h }} + }, + "id": 20, + "links": [], + "maxDataPoints": 100, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "suridrop", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "drop" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "* 100" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=", + "value": "$servername" + } + ] + } + ], + "title": "Suricata Packet Loss", + "type": "stat", + "options": { + "reduceOptions": { + "values": false, + "calcs": [ + "last" + ], + "fields": "" + }, + "orientation": "horizontal", + "text": {}, + "textMode": "auto", + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto" + }, + "pluginVersion": "7.5.4", + "cacheTimeout": null, + "interval": null +} diff --git a/salt/grafana/panels/zeek_packet_loss_singlestat.json.jinja b/salt/grafana/panels/zeek_packet_loss_singlestat.json.jinja deleted file mode 100644 index 1b1fa2436..000000000 --- a/salt/grafana/panels/zeek_packet_loss_singlestat.json.jinja +++ /dev/null @@ -1,131 +0,0 @@ -{ - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "InfluxDB", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "x": {{ PANELS.zeek_packet_loss_singlestat.gridPos.x }}, - "y": {{ PANELS.zeek_packet_loss_singlestat.gridPos.y }}, - "w": {{ PANELS.zeek_packet_loss_singlestat.gridPos.w }}, - "h": {{ PANELS.zeek_packet_loss_singlestat.gridPos.h }} - }, - "height": "150", - "id": 2123, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "zeekdrop", - "orderByTime": "ASC", - "policy": "default", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "drop" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - }, - { - "params": [ - "* 100" - ], - "type": "math" - } - ] - ], - "tags": [ - { - "key": "host", - "operator": "=", - "value": "$servername" - } - ] - } - ], - "thresholds": ".5,3,5", - "title": "Zeek Packet Loss", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current", - "fieldConfig": { - "defaults": {}, - "overrides": [] - } -} diff --git a/salt/grafana/panels/zeek_packet_loss_stat.json.jinja b/salt/grafana/panels/zeek_packet_loss_stat.json.jinja new file mode 100644 index 000000000..e508485c7 --- /dev/null +++ b/salt/grafana/panels/zeek_packet_loss_stat.json.jinja @@ -0,0 +1,120 @@ +{ + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "dark-red", + "value": 5 + } + ] + }, + "mappings": [ + { + "op": "=", + "text": "N/A", + "value": "null", + "$$hashKey": "object:818", + "id": 0, + "type": 1 + } + ], + "unit": "percent", + "decimals": 2, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + }, + "gridPos": { + "x": {{ PANELS.zeek_packet_loss_stat.gridPos.x }}, + "y": {{ PANELS.zeek_packet_loss_stat.gridPos.y }}, + "w": {{ PANELS.zeek_packet_loss_stat.gridPos.w }}, + "h": {{ PANELS.zeek_packet_loss_stat.gridPos.h }} + }, + "id": 2123, + "links": [], + "maxDataPoints": 100, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "zeekdrop", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "drop" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "* 100" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=", + "value": "$servername" + } + ] + } + ], + "title": "Zeek Packet Loss", + "type": "stat", + "options": { + "reduceOptions": { + "values": false, + "calcs": [ + "last" + ], + "fields": "" + }, + "orientation": "horizontal", + "text": {}, + "textMode": "value", + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto" + }, + "pluginVersion": "7.5.4", + "cacheTimeout": null, + "interval": null +}