From 28e33b413cc80a4d4b975b35daba058c2d8151fd Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Mon, 12 Jul 2021 10:17:23 -0400 Subject: [PATCH] add more panels for overview --- salt/grafana/defaults.yaml | 75 +++++++++- .../grafana/panels/cpu_usage_guage.json.jinja | 135 ++++++++++++++++++ .../panels/estimate_eps_singlestat.json.jinja | 126 ++++++++++++++++ .../panels/io_wait_singlestat.json.jinja | 132 +++++++++++++++++ ...ad_average_5_minute_singlestat.json.jinja} | 10 +- .../panels/memory_usage_current.json.jinja | 2 +- salt/grafana/panels/nsm_used_guage.json.jinja | 131 +++++++++++++++++ .../pcap_pcap_loss_singlestat.json.jinja | 125 ++++++++++++++++ .../grafana/panels/ram_usage_guage.json.jinja | 123 ++++++++++++++++ .../panels/rootfs_used_guage.json.jinja | 131 +++++++++++++++++ ...suricata_packet_loss_singlestat.json.jinja | 131 +++++++++++++++++ .../panels/swap_usage_guage.json.jinja | 124 ++++++++++++++++ .../zeek_packet_loss_singlestat.json.jinja | 131 +++++++++++++++++ 13 files changed, 1364 insertions(+), 12 deletions(-) create mode 100644 salt/grafana/panels/cpu_usage_guage.json.jinja create mode 100644 salt/grafana/panels/estimate_eps_singlestat.json.jinja create mode 100644 salt/grafana/panels/io_wait_singlestat.json.jinja rename salt/grafana/panels/{load_average_5_minute.json.jinja => load_average_5_minute_singlestat.json.jinja} (87%) create mode 100644 salt/grafana/panels/nsm_used_guage.json.jinja create mode 100644 salt/grafana/panels/pcap_pcap_loss_singlestat.json.jinja create mode 100644 salt/grafana/panels/ram_usage_guage.json.jinja create mode 100644 salt/grafana/panels/rootfs_used_guage.json.jinja create mode 100644 salt/grafana/panels/suricata_packet_loss_singlestat.json.jinja create mode 100644 salt/grafana/panels/swap_usage_guage.json.jinja create mode 100644 salt/grafana/panels/zeek_packet_loss_singlestat.json.jinja diff --git a/salt/grafana/defaults.yaml b/salt/grafana/defaults.yaml index 4cc11fd56..785d17e7c 100644 --- a/salt/grafana/defaults.yaml +++ b/salt/grafana/defaults.yaml @@ -46,40 +46,103 @@ grafana: y: 1 h: 4 w: 4 - load_average_5_minute: + load_average_5_minute_singlestat: gridPos: x: 4 y: 1 h: 4 w: 4 - row_docker_details: + + zeek_packet_loss_singlestat: + gridPos: + x: 8 + y: 1 + h: 4 + w: 4 + suricata_packet_loss_singlestat: + gridPos: + x: 12 + y: 1 + h: 4 + w: 4 + pcap_packet_loss_singlestat: + gridPos: + x: 16 + y: 1 + h: 4 + w: 4 + estimated_eps_singlestat: + gridPos: + x: 20 + y: 1 + h: 4 + w: 4 + + io_wait_singlestat: gridPos: x: 0 y: 5 + h: 4 + w: 4 + cpu_usage_guage: + gridPos: + x: 8 + y: 5 + h: 4 + w: 2 + ram_usage_guage: + gridPos: + x: 10 + y: 5 + h: 4 + w: 2 + swap_usage_guage: + gridPos: + x: 12 + y: 1 + h: 4 + w: 2 + rootfs_used_guage: + gridPos: + x: 14 + y: 5 + h: 4 + w: 2 + nsm_used_guage: + gridPos: + x: 16 + y: 5 + h: 4 + w: 2 + + row_docker_details: + gridPos: + x: 0 + y: 9 h: 1 w: 24 cpu_docker_combined_current: gridPos: x: 0 - y: 6 + y: 10 h: 8 w: 24 cpu_docker_combined_trend: gridPos: x: 0 - y: 14 + y: 18 h: 8 w: 24 memory_used_docker_combined_current: gridPos: x: 0 - y: 22 + y: 26 h: 8 w: 24 memory_used_docker_combined_trend: gridPos: x: 0 - y: 30 + y: 34 h: 8 w: 24 # cpu_usage_idle: diff --git a/salt/grafana/panels/cpu_usage_guage.json.jinja b/salt/grafana/panels/cpu_usage_guage.json.jinja new file mode 100644 index 000000000..e6b691be8 --- /dev/null +++ b/salt/grafana/panels/cpu_usage_guage.json.jinja @@ -0,0 +1,135 @@ +{ + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "InfluxDB", + "editable": true, + "error": false, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "x": {{ PANELS.cpu_usage_guage.gridPos.x }}, + "y": {{ PANELS.cpu_usage_guage.gridPos.y }}, + "w": {{ PANELS.cpu_usage_guage.gridPos.w }}, + "h": {{ PANELS.cpu_usage_guage.gridPos.h }} + }, + "height": "150", + "id": 9, + "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": false + }, + "tableColumn": "", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "cpu", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "usage_idle" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "* -1 + 100" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + }, + { + "condition": "AND", + "key": "cpu", + "operator": "=", + "value": "cpu-total" + } + ] + } + ], + "thresholds": "70,80,90", + "title": "CPU usage", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current", + "fieldConfig": { + "defaults": {}, + "overrides": [] + } +} diff --git a/salt/grafana/panels/estimate_eps_singlestat.json.jinja b/salt/grafana/panels/estimate_eps_singlestat.json.jinja new file mode 100644 index 000000000..d4c13ecc1 --- /dev/null +++ b/salt/grafana/panels/estimate_eps_singlestat.json.jinja @@ -0,0 +1,126 @@ +{ + "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.estimated_eps_singlestat.gridPos.x }}, + "y": {{ PANELS.estimated_eps_singlestat.gridPos.y }}, + "w": {{ PANELS.estimated_eps_singlestat.gridPos.w }}, + "h": {{ PANELS.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/io_wait_singlestat.json.jinja b/salt/grafana/panels/io_wait_singlestat.json.jinja new file mode 100644 index 000000000..3e35d0d02 --- /dev/null +++ b/salt/grafana/panels/io_wait_singlestat.json.jinja @@ -0,0 +1,132 @@ +{ + "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/load_average_5_minute.json.jinja b/salt/grafana/panels/load_average_5_minute_singlestat.json.jinja similarity index 87% rename from salt/grafana/panels/load_average_5_minute.json.jinja rename to salt/grafana/panels/load_average_5_minute_singlestat.json.jinja index 380c7735f..082e114bc 100644 --- a/salt/grafana/panels/load_average_5_minute.json.jinja +++ b/salt/grafana/panels/load_average_5_minute_singlestat.json.jinja @@ -7,7 +7,7 @@ "steps": [ { "color": "rgba(50, 172, 45, 0.97)", - "value": "$cpucount" + "value": "$cpucount / 2" }, { "color": "rgba(237, 129, 40, 0.89)", @@ -37,10 +37,10 @@ "overrides": [] }, "gridPos": { - "x": {{ PANELS.load_average_5_minute.gridPos.x }}, - "y": {{ PANELS.load_average_5_minute.gridPos.y }}, - "w": {{ PANELS.load_average_5_minute.gridPos.w }}, - "h": {{ PANELS.load_average_5_minute.gridPos.h }} + "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 }} }, "id": 61859, "links": [], diff --git a/salt/grafana/panels/memory_usage_current.json.jinja b/salt/grafana/panels/memory_usage_current.json.jinja index b2d09ad59..7fce708ba 100644 --- a/salt/grafana/panels/memory_usage_current.json.jinja +++ b/salt/grafana/panels/memory_usage_current.json.jinja @@ -75,7 +75,7 @@ ], "measurement": "mem_inactive", "policy": "default", - "query": "SELECT mean(total) as total, mean(used) as used, mean(cached) as cached, mean(free) as free, mean(buffered) as buffered FROM \"mem\" WHERE host =~ /$server$/ AND $timeFilter GROUP BY time($interval), host ORDER BY asc", + "query": "SELECT mean(total) as total, mean(used) as used, mean(cached) as cached, mean(free) as free, mean(buffered) as buffered FROM \"mem\" WHERE host =~ /$servername$/ AND $timeFilter GROUP BY time($interval), host ORDER BY asc", "rawQuery": true, "refId": "A", "resultFormat": "time_series", diff --git a/salt/grafana/panels/nsm_used_guage.json.jinja b/salt/grafana/panels/nsm_used_guage.json.jinja new file mode 100644 index 000000000..5aabb921f --- /dev/null +++ b/salt/grafana/panels/nsm_used_guage.json.jinja @@ -0,0 +1,131 @@ +{ + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "InfluxDB", + "editable": true, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "x": {{ PANELS.nsm_used_guage.gridPos.x }}, + "y": {{ PANELS.nsm_used_guage.gridPos.y }}, + "w": {{ PANELS.nsm_used_guage.gridPos.w }}, + "h": {{ PANELS.nsm_used_guage.gridPos.h }} + }, + "height": "150", + "id": 12, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "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": "disk", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "used_percent" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + }, + { + "condition": "AND", + "key": "path", + "operator": "=", + "value": "/nsm" + } + ], + "orderByTime": "ASC" + } + ], + "thresholds": "70,80,90", + "title": "RootFS used", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "cacheTimeout": null, + "colorBackground": false, + "decimals": 0, + "error": false, + "interval": null, + "nullText": null, + "postfix": "", + "prefix": "", + "tableColumn": "" +} diff --git a/salt/grafana/panels/pcap_pcap_loss_singlestat.json.jinja b/salt/grafana/panels/pcap_pcap_loss_singlestat.json.jinja new file mode 100644 index 000000000..cafc5d628 --- /dev/null +++ b/salt/grafana/panels/pcap_pcap_loss_singlestat.json.jinja @@ -0,0 +1,125 @@ +{ + "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": 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": "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/ram_usage_guage.json.jinja b/salt/grafana/panels/ram_usage_guage.json.jinja new file mode 100644 index 000000000..c1d05ab5a --- /dev/null +++ b/salt/grafana/panels/ram_usage_guage.json.jinja @@ -0,0 +1,123 @@ +{ + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "InfluxDB", + "editable": true, + "error": false, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "x": {{ PANELS.ram_usage_guage.gridPos.x }}, + "y": {{ PANELS.ram_usage_guage.gridPos.y }}, + "w": {{ PANELS.ram_usage_guage.gridPos.w }}, + "h": {{ PANELS.ram_usage_guage.gridPos.h }} + }, + "height": "150", + "id": 61860, + "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": false + }, + "tableColumn": "", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "mem", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "used_percent" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + } + ] + } + ], + "thresholds": "70,80,90", + "title": "RAM usage", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current", + "fieldConfig": { + "defaults": {}, + "overrides": [] + } +} diff --git a/salt/grafana/panels/rootfs_used_guage.json.jinja b/salt/grafana/panels/rootfs_used_guage.json.jinja new file mode 100644 index 000000000..25968299c --- /dev/null +++ b/salt/grafana/panels/rootfs_used_guage.json.jinja @@ -0,0 +1,131 @@ +{ + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "InfluxDB", + "editable": true, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "x": {{ PANELS.rootfs_used_guage.gridPos.x }}, + "y": {{ PANELS.rootfs_used_guage.gridPos.y }}, + "w": {{ PANELS.rootfs_used_guage.gridPos.w }}, + "h": {{ PANELS.rootfs_used_guage.gridPos.h }} + }, + "height": "150", + "id": 61866, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "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": "disk", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "used_percent" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + }, + { + "condition": "AND", + "key": "path", + "operator": "=", + "value": "/" + } + ], + "orderByTime": "ASC" + } + ], + "thresholds": "70,80,90", + "title": "RootFS used", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "cacheTimeout": null, + "colorBackground": false, + "decimals": 0, + "error": false, + "interval": null, + "nullText": null, + "postfix": "", + "prefix": "", + "tableColumn": "" +} diff --git a/salt/grafana/panels/suricata_packet_loss_singlestat.json.jinja b/salt/grafana/panels/suricata_packet_loss_singlestat.json.jinja new file mode 100644 index 000000000..35c00939a --- /dev/null +++ b/salt/grafana/panels/suricata_packet_loss_singlestat.json.jinja @@ -0,0 +1,131 @@ +{ + "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": 21, + "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/swap_usage_guage.json.jinja b/salt/grafana/panels/swap_usage_guage.json.jinja new file mode 100644 index 000000000..6667a3445 --- /dev/null +++ b/salt/grafana/panels/swap_usage_guage.json.jinja @@ -0,0 +1,124 @@ +{ + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "InfluxDB", + "decimals": 0, + "editable": true, + "error": false, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "x": {{ PANELS.swap_usage_guage.gridPos.x }}, + "y": {{ PANELS.swap_usage_guage.gridPos.y }}, + "w": {{ PANELS.swap_usage_guage.gridPos.w }}, + "h": {{ PANELS.swap_usage_guage.gridPos.h }} + }, + "height": "150", + "id": 61863, + "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": false + }, + "tableColumn": "", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "swap", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "used_percent" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + } + ] + } + ], + "thresholds": "50,70,90", + "title": "Swap usage", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current", + "fieldConfig": { + "defaults": {}, + "overrides": [] + } +} diff --git a/salt/grafana/panels/zeek_packet_loss_singlestat.json.jinja b/salt/grafana/panels/zeek_packet_loss_singlestat.json.jinja new file mode 100644 index 000000000..cbea2b6f2 --- /dev/null +++ b/salt/grafana/panels/zeek_packet_loss_singlestat.json.jinja @@ -0,0 +1,131 @@ +{ + "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": 21, + "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": [] + } +}