From 561f86eac8ac9b025310e208013a75faf2084717 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 2 Nov 2021 11:06:29 -0400 Subject: [PATCH] change eps graphs to use logstash data and not consumptioneps script --- ...logstash_estimated_eps_in_graph.json.jinja | 230 ++++++++++++++++++ .../logstash_estimated_eps_in_stat.json.jinja | 136 +++++++++++ ...timated_eps_in_total_graph.json copy.jinja | 156 ++++++++++++ ...ogstash_estimated_eps_out_graph.json.jinja | 230 ++++++++++++++++++ ...ash_estimated_eps_out_stat.json copy.jinja | 136 +++++++++++ ...h_estimated_eps_out_total_graph.json.jinja | 156 ++++++++++++ 6 files changed, 1044 insertions(+) create mode 100644 salt/grafana/panels/logstash_estimated_eps_in_graph.json.jinja create mode 100644 salt/grafana/panels/logstash_estimated_eps_in_stat.json.jinja create mode 100644 salt/grafana/panels/logstash_estimated_eps_in_total_graph.json copy.jinja create mode 100644 salt/grafana/panels/logstash_estimated_eps_out_graph.json.jinja create mode 100644 salt/grafana/panels/logstash_estimated_eps_out_stat.json copy.jinja create mode 100644 salt/grafana/panels/logstash_estimated_eps_out_total_graph.json.jinja diff --git a/salt/grafana/panels/logstash_estimated_eps_in_graph.json.jinja b/salt/grafana/panels/logstash_estimated_eps_in_graph.json.jinja new file mode 100644 index 000000000..c1c9ed39a --- /dev/null +++ b/salt/grafana/panels/logstash_estimated_eps_in_graph.json.jinja @@ -0,0 +1,230 @@ +{ + "id": 76, + "gridPos": { + "x": {{ PANELS.logstash_estimated_eps_in_graph.gridPos.x }}, + "y": {{ PANELS.logstash_estimated_eps_in_graph.gridPos.y }}, + "w": {{ PANELS.logstash_estimated_eps_in_graph.gridPos.w }}, + "h": {{ PANELS.logstash_estimated_eps_in_graph.gridPos.h }} + }, + "type": "timeseries", + "title": "Estimated EPS In", + "datasource": "InfluxDB", + "pluginVersion": "8.2.1", + "interval": "30s", + "fieldConfig": { + "defaults": { + "custom": { + "drawStyle": "line", + "lineInterpolation": "linear", + "barAlignment": 0, + "lineWidth": 1, + "fillOpacity": 10, + "gradientMode": "none", + "spanNulls": false, + "showPoints": "never", + "pointSize": 5, + "stacking": { + "mode": "none", + "group": "A" + }, + "axisPlacement": "auto", + "axisLabel": "EPS", + "scaleDistribution": { + "type": "linear" + }, + "hideFrom": { + "tooltip": false, + "viz": false, + "legend": false + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "color": { + "mode": "palette-classic" + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "mappings": [], + "unit": "short", + "decimals": 1 + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/trend/" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.lineWidth", + "value": 4 + }, + { + "id": "custom.lineStyle", + "value": { + "fill": "dash", + "dash": [ + 4, + 10 + ] + } + } + ] + } + ] + }, + "options": { + "tooltip": { + "mode": "single" + }, + "legend": { + "displayMode": "table", + "placement": "right", + "calcs": [ + "max", + "mean", + "lastNotNull" + ] + } + }, + "targets": [ + { + "refId": "A", + "hide": false, + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [ + { + "key": "host", + "value": "/^$servername$/", + "operator": "=~" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "tag", + "params": [ + "host" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "in" + ] + }, + { + "type": "mean", + "params": [] + }, + { + "type": "non_negative_derivative", + "params": [ + "1s" + ] + } + ] + ], + "measurement": "logstash_events", + "alias": "$tag_host: $col", + "query": "SELECT non_negative_derivative(mean(\"in\"), 1s) as \"current_in\" FROM \"logstash_events\" WHERE (\"host\" =~ /^$servername$/) AND $timeFilter GROUP BY time($__interval), \"host\" fill(null)", + "rawQuery": true + }, + { + "refId": "B", + "hide": false, + "policy": "so_long_term", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [ + { + "key": "host", + "value": "/^$servername$/", + "operator": "=~" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "tag", + "params": [ + "host" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "mean_in" + ] + }, + { + "type": "mean", + "params": [] + }, + { + "type": "non_negative_derivative", + "params": [ + "1s" + ] + } + ] + ], + "measurement": "logstash_events", + "alias": "$tag_host: $col", + "query": "SELECT non_negative_derivative(mean(\"mean_in\"), 1s) as \"trend_in\" FROM \"so_long_term\".\"logstash_events\" WHERE (\"host\" =~ /^$servername$/) AND $timeFilter GROUP BY time($__interval), \"host\" fill(null)", + "rawQuery": true + } + ], + "maxDataPoints": null, + "description": "", + "timeFrom": null, + "timeShift": null, + "transformations": [] +} diff --git a/salt/grafana/panels/logstash_estimated_eps_in_stat.json.jinja b/salt/grafana/panels/logstash_estimated_eps_in_stat.json.jinja new file mode 100644 index 000000000..f492dd4b9 --- /dev/null +++ b/salt/grafana/panels/logstash_estimated_eps_in_stat.json.jinja @@ -0,0 +1,136 @@ +{ + "id": 23, + "gridPos": { + "x": {{ PANELS.logstash_estimated_eps_in_stat.gridPos.x }}, + "y": {{ PANELS.logstash_estimated_eps_in_stat.gridPos.y }}, + "w": {{ PANELS.logstash_estimated_eps_in_stat.gridPos.w }}, + "h": {{ PANELS.logstash_estimated_eps_in_stat.gridPos.h }} + }, + "type": "stat", + "title": "Estimated EPS In - Selected Total", + "datasource": "InfluxDB", + "pluginVersion": "8.2.1", + "interval": "30s", + "links": [], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-green", + "value": 1 + } + ] + }, + "mappings": [ + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "N/A" + } + } + } + ], + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "unit": "short" + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "values": false, + "calcs": [ + "lastNotNull" + ], + "fields": "" + }, + "orientation": "horizontal", + "text": {}, + "textMode": "value", + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto" + }, + "targets": [ + { + "refId": "A", + "hide": false, + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [ + { + "key": "host", + "value": "/^$servername$/", + "operator": "=~" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "tag", + "params": [ + "host" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "in" + ] + }, + { + "type": "mean", + "params": [] + }, + { + "type": "non_negative_derivative", + "params": [ + "1s" + ] + } + ] + ], + "measurement": "logstash_events" + } + ], + "transformations": [ + { + "id": "calculateField", + "options": { + "mode": "reduceRow", + "reduce": { + "reducer": "sum" + }, + "replaceFields": true + } + } + ], + "maxDataPoints": null, + "cacheTimeout": null, + "timeFrom": null +} diff --git a/salt/grafana/panels/logstash_estimated_eps_in_total_graph.json copy.jinja b/salt/grafana/panels/logstash_estimated_eps_in_total_graph.json copy.jinja new file mode 100644 index 000000000..42399b5ca --- /dev/null +++ b/salt/grafana/panels/logstash_estimated_eps_in_total_graph.json copy.jinja @@ -0,0 +1,156 @@ +{ + "id": 69001, + "gridPos": { + "x": {{ PANELS.logstash_estimated_eps_in_total_graph.gridPos.x }}, + "y": {{ PANELS.logstash_estimated_eps_in_total_graph.gridPos.y }}, + "w": {{ PANELS.logstash_estimated_eps_in_total_graph.gridPos.w }}, + "h": {{ PANELS.logstash_estimated_eps_in_total_graph.gridPos.h }} + }, + "type": "timeseries", + "title": "Estimated EPS In - Selected Total", + "transformations": [ + { + "id": "calculateField", + "options": { + "mode": "reduceRow", + "reduce": { + "reducer": "sum" + }, + "replaceFields": true, + "alias": "Total EPS" + } + } + ], + "datasource": "InfluxDB", + "pluginVersion": "8.2.1", + "interval": "30s", + "fieldConfig": { + "defaults": { + "custom": { + "drawStyle": "line", + "lineInterpolation": "linear", + "barAlignment": 0, + "lineWidth": 1, + "fillOpacity": 10, + "gradientMode": "none", + "spanNulls": false, + "showPoints": "never", + "pointSize": 5, + "stacking": { + "mode": "none", + "group": "A" + }, + "axisPlacement": "auto", + "axisLabel": "EPS", + "scaleDistribution": { + "type": "linear" + }, + "hideFrom": { + "tooltip": false, + "viz": false, + "legend": false + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "color": { + "mode": "palette-classic" + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "mappings": [], + "unit": "short", + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "tooltip": { + "mode": "single" + }, + "legend": { + "displayMode": "table", + "placement": "right", + "calcs": [ + "max", + "mean", + "lastNotNull" + ] + } + }, + "targets": [ + { + "refId": "A", + "hide": false, + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [ + { + "key": "host", + "value": "/^$servername$/", + "operator": "=~" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "tag", + "params": [ + "host" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "in" + ] + }, + { + "type": "mean", + "params": [] + }, + { + "type": "non_negative_derivative", + "params": [ + "1s" + ] + } + ] + ], + "measurement": "logstash_events", + "query": "SELECT non_negative_derivative(mean(\"in\"), 1s) FROM \"logstash_events\" WHERE (\"host\" =~ /^$servername$/) AND $timeFilter GROUP BY time($__interval), \"host\" fill(null)", + "rawQuery": false + } + ], + "maxDataPoints": null, + "description": "", + "timeFrom": null, + "timeShift": null +} diff --git a/salt/grafana/panels/logstash_estimated_eps_out_graph.json.jinja b/salt/grafana/panels/logstash_estimated_eps_out_graph.json.jinja new file mode 100644 index 000000000..16878ee6e --- /dev/null +++ b/salt/grafana/panels/logstash_estimated_eps_out_graph.json.jinja @@ -0,0 +1,230 @@ +{ + "id": 69000, + "gridPos": { + "x": {{ PANELS.logstash_estimated_eps_out_graph.gridPos.x }}, + "y": {{ PANELS.logstash_estimated_eps_out_graph.gridPos.y }}, + "w": {{ PANELS.logstash_estimated_eps_out_graph.gridPos.w }}, + "h": {{ PANELS.logstash_estimated_eps_out_graph.gridPos.h }} + }, + "type": "timeseries", + "title": "Estimated EPS Out", + "transformations": [], + "datasource": "InfluxDB", + "pluginVersion": "8.2.1", + "interval": "30s", + "fieldConfig": { + "defaults": { + "custom": { + "drawStyle": "line", + "lineInterpolation": "linear", + "barAlignment": 0, + "lineWidth": 1, + "fillOpacity": 10, + "gradientMode": "none", + "spanNulls": false, + "showPoints": "never", + "pointSize": 5, + "stacking": { + "mode": "none", + "group": "A" + }, + "axisPlacement": "auto", + "axisLabel": "EPS", + "scaleDistribution": { + "type": "linear" + }, + "hideFrom": { + "tooltip": false, + "viz": false, + "legend": false + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "color": { + "mode": "palette-classic" + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "mappings": [], + "unit": "short", + "decimals": 1 + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/trend/" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.lineWidth", + "value": 4 + }, + { + "id": "custom.lineStyle", + "value": { + "fill": "dash", + "dash": [ + 4, + 10 + ] + } + } + ] + } + ] + }, + "options": { + "tooltip": { + "mode": "single" + }, + "legend": { + "displayMode": "table", + "placement": "right", + "calcs": [ + "max", + "mean", + "lastNotNull" + ] + } + }, + "targets": [ + { + "refId": "A", + "hide": false, + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [ + { + "key": "host", + "value": "/^$servername$/", + "operator": "=~" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "tag", + "params": [ + "host" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "in" + ] + }, + { + "type": "mean", + "params": [] + }, + { + "type": "non_negative_derivative", + "params": [ + "1s" + ] + } + ] + ], + "measurement": "logstash_events", + "alias": "$tag_host: $col", + "query": "SELECT non_negative_derivative(mean(\"out\"), 1s) as \"current_out\" FROM \"logstash_events\" WHERE (\"host\" =~ /^$servername$/) AND $timeFilter GROUP BY time($__interval), \"host\" fill(null)", + "rawQuery": true + }, + { + "refId": "B", + "hide": false, + "policy": "so_long_term", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [ + { + "key": "host", + "value": "/^$servername$/", + "operator": "=~" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "tag", + "params": [ + "host" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "mean_in" + ] + }, + { + "type": "mean", + "params": [] + }, + { + "type": "non_negative_derivative", + "params": [ + "1s" + ] + } + ] + ], + "measurement": "logstash_events", + "alias": "$tag_host: $col", + "query": "SELECT non_negative_derivative(mean(\"mean_out\"), 1s) as \"trend_out\" FROM \"so_long_term\".\"logstash_events\" WHERE (\"host\" =~ /^$servername$/) AND $timeFilter GROUP BY time($__interval), \"host\" fill(null)", + "rawQuery": true + } + ], + "maxDataPoints": null, + "description": "", + "timeFrom": null, + "timeShift": null +} diff --git a/salt/grafana/panels/logstash_estimated_eps_out_stat.json copy.jinja b/salt/grafana/panels/logstash_estimated_eps_out_stat.json copy.jinja new file mode 100644 index 000000000..dc87661f5 --- /dev/null +++ b/salt/grafana/panels/logstash_estimated_eps_out_stat.json copy.jinja @@ -0,0 +1,136 @@ +{ + "id": 22323, + "gridPos": { + "x": {{ PANELS.logstash_estimated_eps_out_stat.gridPos.x }}, + "y": {{ PANELS.logstash_estimated_eps_out_stat.gridPos.y }}, + "w": {{ PANELS.logstash_estimated_eps_out_stat.gridPos.w }}, + "h": {{ PANELS.logstash_estimated_eps_out_stat.gridPos.h }} + }, + "type": "stat", + "title": "Estimated EPS Out - Selected Total", + "datasource": "InfluxDB", + "pluginVersion": "8.2.1", + "interval": "30s", + "links": [], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-green", + "value": 1 + } + ] + }, + "mappings": [ + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "N/A" + } + } + } + ], + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "unit": "short" + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "values": false, + "calcs": [ + "lastNotNull" + ], + "fields": "" + }, + "orientation": "horizontal", + "text": {}, + "textMode": "value", + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto" + }, + "targets": [ + { + "refId": "A", + "hide": false, + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [ + { + "key": "host", + "value": "/^$servername$/", + "operator": "=~" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "tag", + "params": [ + "host" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "out" + ] + }, + { + "type": "mean", + "params": [] + }, + { + "type": "non_negative_derivative", + "params": [ + "1s" + ] + } + ] + ], + "measurement": "logstash_events" + } + ], + "transformations": [ + { + "id": "calculateField", + "options": { + "mode": "reduceRow", + "reduce": { + "reducer": "sum" + }, + "replaceFields": true + } + } + ], + "maxDataPoints": null, + "cacheTimeout": null, + "timeFrom": null +} diff --git a/salt/grafana/panels/logstash_estimated_eps_out_total_graph.json.jinja b/salt/grafana/panels/logstash_estimated_eps_out_total_graph.json.jinja new file mode 100644 index 000000000..3d1600c39 --- /dev/null +++ b/salt/grafana/panels/logstash_estimated_eps_out_total_graph.json.jinja @@ -0,0 +1,156 @@ +{ + "id": 69002, + "gridPos": { + "x": {{ PANELS.logstash_estimated_eps_out_total_graph.gridPos.x }}, + "y": {{ PANELS.logstash_estimated_eps_out_total_graph.gridPos.y }}, + "w": {{ PANELS.logstash_estimated_eps_out_total_graph.gridPos.w }}, + "h": {{ PANELS.logstash_estimated_eps_out_total_graph.gridPos.h }} + }, + "type": "timeseries", + "title": "Estimated EPS Out - Selected Total", + "transformations": [ + { + "id": "calculateField", + "options": { + "mode": "reduceRow", + "reduce": { + "reducer": "sum" + }, + "replaceFields": true, + "alias": "Total EPS" + } + } + ], + "datasource": "InfluxDB", + "pluginVersion": "8.2.1", + "interval": "30s", + "fieldConfig": { + "defaults": { + "custom": { + "drawStyle": "line", + "lineInterpolation": "linear", + "barAlignment": 0, + "lineWidth": 1, + "fillOpacity": 10, + "gradientMode": "none", + "spanNulls": false, + "showPoints": "never", + "pointSize": 5, + "stacking": { + "mode": "none", + "group": "A" + }, + "axisPlacement": "auto", + "axisLabel": "EPS", + "scaleDistribution": { + "type": "linear" + }, + "hideFrom": { + "tooltip": false, + "viz": false, + "legend": false + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "color": { + "mode": "palette-classic" + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "mappings": [], + "unit": "short", + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "tooltip": { + "mode": "single" + }, + "legend": { + "displayMode": "table", + "placement": "right", + "calcs": [ + "max", + "mean", + "lastNotNull" + ] + } + }, + "targets": [ + { + "refId": "A", + "hide": false, + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [ + { + "key": "host", + "value": "/^$servername$/", + "operator": "=~" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "tag", + "params": [ + "host" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "out" + ] + }, + { + "type": "mean", + "params": [] + }, + { + "type": "non_negative_derivative", + "params": [ + "1s" + ] + } + ] + ], + "measurement": "logstash_events", + "query": "SELECT non_negative_derivative(mean(\"in\"), 1s) FROM \"logstash_events\" WHERE (\"host\" =~ /^$servername$/) AND $timeFilter GROUP BY time($__interval), \"host\" fill(null)", + "rawQuery": false + } + ], + "maxDataPoints": null, + "description": "", + "timeFrom": null, + "timeShift": null +}