From 693a9b30ae500569e04bdd69cbb76dbb3b8c4d40 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Wed, 14 Jul 2021 15:33:28 -0400 Subject: [PATCH] add swap, adjust cords --- salt/grafana/defaults.yaml | 40 +++- .../panels/memory_usage_graph.json.jinja | 2 +- salt/grafana/panels/row_swap.json.jinja | 15 ++ .../panels/swap_io_bytes_graph.json.jinja | 178 +++++++++++++++++ .../panels/swap_usage_bytes.json.jinja | 182 ++++++++++++++++++ 5 files changed, 406 insertions(+), 11 deletions(-) create mode 100644 salt/grafana/panels/row_swap.json.jinja create mode 100644 salt/grafana/panels/swap_io_bytes_graph.json.jinja create mode 100644 salt/grafana/panels/swap_usage_bytes.json.jinja diff --git a/salt/grafana/defaults.yaml b/salt/grafana/defaults.yaml index 59d3f9444..3e1c88e74 100644 --- a/salt/grafana/defaults.yaml +++ b/salt/grafana/defaults.yaml @@ -163,64 +163,84 @@ grafana: h: 8 w: 24 - row_network: + row_swap: gridPos: x: 0 y: 35 h: 1 w: 24 - management_traffic_graph: + swap_io_bytes_graph: gridPos: x: 0 y: 36 h: 8 + w: 12 + swap_usage_bytes_graph: + gridPos: + x: 12 + y: 36 + h: 8 + w: 12 + + + row_network: + gridPos: + x: 0 + y: 44 + h: 1 + w: 24 + management_traffic_graph: + gridPos: + x: 0 + y: 45 + h: 8 w: 24 management_interface_packets_graph: gridPos: x: 0 - y: 44 + y: 53 h: 8 w: 12 management_interface_drops_graph: gridPos: x: 12 - y: 44 + y: 53 h: 8 w: 12 monitor_traffic_graph: gridPos: x: 0 - y: 52 + y: 61 h: 8 w: 24 monitor_interface_packets_graph: gridPos: x: 0 - y: 60 + y: 69 h: 8 w: 12 monitor_interface_drops_graph: gridPos: x: 12 - y: 60 + y: 69 h: 8 w: 12 row_disk: gridPos: x: 0 - y: 68 + y: 77 h: 1 w: 24 disk_usage_root_graph: gridPos: x: 0 - y: 69 + y: 78 h: 8 w: 12 disk_usage_nsm_graph: gridPos: x: 12 - y: 69 + y: 78 h: 8 w: 12 diff --git a/salt/grafana/panels/memory_usage_graph.json.jinja b/salt/grafana/panels/memory_usage_graph.json.jinja index 945796153..040ad017b 100644 --- a/salt/grafana/panels/memory_usage_graph.json.jinja +++ b/salt/grafana/panels/memory_usage_graph.json.jinja @@ -108,7 +108,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT mean(mean_total) as trend_total, mean(mean_used) as trend_used, mean(mean_cached) as trean_cached, mean(mean_free) as trend_free, mean(mean_buffered) as trend_buffered FROM \"so_long_term\".\"mem\" WHERE host =~ /$servername$/ AND $timeFilter GROUP BY time($__interval), host ORDER BY asc", + "query": "SELECT mean(mean_total) as trend_total, mean(mean_used) as trend_used, mean(mean_cached) as trend_cached, mean(mean_free) as trend_free, mean(mean_buffered) as trend_buffered FROM \"so_long_term\".\"mem\" WHERE host =~ /$servername$/ AND $timeFilter GROUP BY time($__interval), host ORDER BY asc", "queryType": "randomWalk", "rawQuery": true, "refId": "B", diff --git a/salt/grafana/panels/row_swap.json.jinja b/salt/grafana/panels/row_swap.json.jinja new file mode 100644 index 000000000..518dfda25 --- /dev/null +++ b/salt/grafana/panels/row_swap.json.jinja @@ -0,0 +1,15 @@ +{ + "collapsed": false, + "datasource": null, + "gridPos": { + "x": {{ PANELS.row_swap.gridPos.x }}, + "y": {{ PANELS.row_swap.gridPos.y }}, + "w": {{ PANELS.row_swap.gridPos.w }}, + "h": {{ PANELS.row_swap.gridPos.h }} + }, + "id": 444, + "panels": [], + "repeat": null, + "title": "Memory", + "type": "row" + } diff --git a/salt/grafana/panels/swap_io_bytes_graph.json.jinja b/salt/grafana/panels/swap_io_bytes_graph.json.jinja new file mode 100644 index 000000000..55aa504ed --- /dev/null +++ b/salt/grafana/panels/swap_io_bytes_graph.json.jinja @@ -0,0 +1,178 @@ +{ + "type": "graph", + "title": "Swap I/O Bytes", + "gridPos": { + "x": {{ PANELS.swap_io_bytes_graph.gridPos.x }}, + "y": {{ PANELS.swap_io_bytes_graph.gridPos.y }}, + "w": {{ PANELS.swap_io_bytes_graph.gridPos.w }}, + "h": {{ PANELS.swap_io_bytes_graph.gridPos.h }} + }, + "id": 68890, + "targets": [ + { + "refId": "A", + "queryType": "randomWalk", + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "value" + ] + }, + { + "type": "mean", + "params": [] + } + ] + ], + "query": "SELECT non_negative_derivative(mean(\"in\")) as \"in\", non_negative_derivative(mean(\"out\")) as \"out\" FROM \"swap\" WHERE host =~ /$servername$/ AND $timeFilter GROUP BY time($__interval), host ORDER BY asc", + "rawQuery": true, + "alias": "$tag_host: $col" + }, + { + "refId": "B", + "queryType": "randomWalk", + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "value" + ] + }, + { + "type": "mean", + "params": [] + } + ] + ], + "query": "SELECT non_negative_derivative(mean(\"mean_in\")) as \"trend_in\", non_negative_derivative(mean(\"mean_out\")) as \"trend_out\" FROM \"so_long_term\".\"swap\" WHERE host =~ /$servername$/ AND $timeFilter GROUP BY time($__interval), host ORDER BY asc", + "rawQuery": true, + "alias": "$tag_host: $col", + "hide": false + } + ], + "options": { + "alertThreshold": true + }, + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "pluginVersion": "7.5.4", + "renderer": "flot", + "yaxes": [ + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "bytes", + "$$hashKey": "object:156" + }, + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:157" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "fill": 1, + "linewidth": 1, + "dashLength": 10, + "spaceLength": 10, + "pointradius": 2, + "legend": { + "show": true, + "values": true, + "min": false, + "max": true, + "current": true, + "total": false, + "avg": true, + "alignAsTable": true + }, + "nullPointMode": "connected", + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, + "aliasColors": {}, + "seriesOverrides": [ + { + "$$hashKey": "object:322", + "alias": "/trend/", + "fill": 0, + "linewidth": 4, + "dashes": true, + "dashLength": 4 + } + ], + "thresholds": [], + "timeRegions": [], + "fillGradient": 0, + "dashes": false, + "hiddenSeries": false, + "points": false, + "bars": false, + "stack": false, + "percentage": false, + "steppedLine": false, + "timeFrom": null, + "timeShift": null +} diff --git a/salt/grafana/panels/swap_usage_bytes.json.jinja b/salt/grafana/panels/swap_usage_bytes.json.jinja new file mode 100644 index 000000000..528d53d9b --- /dev/null +++ b/salt/grafana/panels/swap_usage_bytes.json.jinja @@ -0,0 +1,182 @@ +{ + "type": "graph", + "title": "Swap Usage - bytes", + "gridPos": { + "x": {{ PANELS.swap_usage_bytes_graph.gridPos.x }}, + "y": {{ PANELS.swap_usage_bytes_graph.gridPos.y }}, + "w": {{ PANELS.swap_usage_bytes_graph.gridPos.w }}, + "h": {{ PANELS.swap_usage_bytes_graph.gridPos.h }} + }, + "id": 68892, + "targets": [ + { + "refId": "A", + "queryType": "randomWalk", + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "value" + ] + }, + { + "type": "mean", + "params": [] + } + ] + ], + "query": "SELECT mean(used) as \"used\", mean(total) as \"total\" FROM \"swap\" WHERE host =~ /$servername$/ AND $timeFilter GROUP BY time($__interval), host ORDER BY asc", + "rawQuery": true, + "alias": "$tag_host: $col" + }, + { + "refId": "B", + "queryType": "randomWalk", + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "value" + ] + }, + { + "type": "mean", + "params": [] + } + ] + ], + "query": "SELECT mean(mean_used) as \"trend_used\", mean(mean_total) as \"trend_total\" FROM \"so_long_term\".\"swap\" WHERE host =~ /$servername$/ AND $timeFilter GROUP BY time($__interval), host ORDER BY asc", + "rawQuery": true, + "alias": "$tag_host: $col", + "hide": false + } + ], + "options": { + "alertThreshold": true + }, + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "pluginVersion": "7.5.4", + "renderer": "flot", + "yaxes": [ + { + "label": null, + "show": true, + "logBase": 1, + "min": "0", + "max": null, + "format": "bytes", + "$$hashKey": "object:515" + }, + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:516" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "fill": 1, + "linewidth": 1, + "dashLength": 10, + "spaceLength": 10, + "pointradius": 2, + "legend": { + "show": true, + "values": true, + "min": false, + "max": true, + "current": true, + "total": false, + "avg": true, + "alignAsTable": true + }, + "nullPointMode": "connected", + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, + "aliasColors": {}, + "seriesOverrides": [ + { + "$$hashKey": "object:575", + "alias": "/total/", + "fill": 0, + "color": "#C4162A" + }, + { + "$$hashKey": "object:596", + "alias": "/trend/", + "fill": 0, + "linewidth": 4, + "dashes": true, + "dashLength": 4 + } + ], + "thresholds": [], + "timeRegions": [], + "fillGradient": 0, + "dashes": false, + "hiddenSeries": false, + "points": false, + "bars": false, + "stack": false, + "percentage": false, + "steppedLine": false +}