From 9a6ac7bd208c1d565f97d715a7e0de587db77702 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 13 Jul 2021 12:30:45 -0400 Subject: [PATCH] change panels --- .../panels/cpu_usage_tasks_graph.json.jinja | 182 ++++++++---------- .../panels/load_averages_graph.json.jinja | 2 +- 2 files changed, 84 insertions(+), 100 deletions(-) diff --git a/salt/grafana/panels/cpu_usage_tasks_graph.json.jinja b/salt/grafana/panels/cpu_usage_tasks_graph.json.jinja index 5e3e43c03..17182c7b3 100644 --- a/salt/grafana/panels/cpu_usage_tasks_graph.json.jinja +++ b/salt/grafana/panels/cpu_usage_tasks_graph.json.jinja @@ -1,146 +1,130 @@ { - "aliasColors": {}, - "dashLength": 10, - "datasource": "InfluxDB", - "editable": true, - "fill": 1, - "grid": {}, - "gridPos": { + "type": "graph", + "title": "CPU Usage", + "gridPos": { "x": {{ PANELS.cpu_usage_tasks_graph.gridPos.x }}, "y": {{ PANELS.cpu_usage_tasks_graph.gridPos.y }}, "w": {{ PANELS.cpu_usage_tasks_graph.gridPos.w }}, "h": {{ PANELS.cpu_usage_tasks_graph.gridPos.h }} }, - "height": "300", - "id": 27, - "interval": "$inter", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "pointradius": 5, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, + "id": 61871, "targets": [ { - "alias": "$tag_host: $col", - "dsType": "influxdb", - "function": "mean", + "refId": "A", + "queryType": "randomWalk", + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [], "groupBy": [ { - "interval": "auto", + "type": "time", "params": [ - "auto" - ], - "type": "time" + "$__interval" + ] }, { - "key": "host", + "type": "fill", "params": [ - "tag" - ], - "type": "tag" + "null" + ] } ], - "hide": false, - "measurement": "cpu", - "policy": "default", - "query": "SELECT mean(usage_user) as \"user\", mean(usage_system) as \"system\", mean(usage_softirq) as \"softirq\", mean(usage_steal) as \"steal\", mean(usage_nice) as \"nice\", mean(usage_irq) as \"irq\", mean(usage_iowait) as \"iowait\", mean(usage_guest) as \"guest\", mean(usage_guest_nice) as \"guest_nice\" FROM \"cpu\" WHERE \"host\" =~ /^$servername$/ and cpu = 'cpu-total' AND $timeFilter GROUP BY time($interval), *", - "rawQuery": true, - "refId": "B", - "resultFormat": "time_series", "select": [ [ { + "type": "field", "params": [ "value" - ], - "type": "field" + ] }, { - "params": [], - "type": "mean" + "type": "mean", + "params": [] } ] ], - "tags": [], - "orderByTime": "ASC" + "query": "SELECT mean(usage_user) as \"user\", mean(usage_system) as \"system\", mean(usage_softirq) as \"softirq\", mean(usage_steal) as \"steal\", mean(usage_nice) as \"nice\", mean(usage_irq) as \"irq\", mean(usage_iowait) as \"iowait\", mean(usage_guest) as \"guest\", mean(usage_guest_nice) as \"guest_nice\" FROM \"cpu\" WHERE \"host\" =~ /^$servername$/ and cpu = 'cpu-total' AND $timeFilter GROUP BY time($interval), *", + "rawQuery": true, + "alias": "$tag_host: $col" } ], - "thresholds": [], - "timeRegions": [], - "title": "CPU usage", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" + "options": { + "alertThreshold": true }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": {}, + "overrides": [] }, + "pluginVersion": "7.5.4", + "renderer": "flot", "yaxes": [ { - "format": "percent", - "logBase": 1, - "max": 100, - "min": 0, + "label": null, "show": true, - "$$hashKey": "object:1007" + "logBase": 1, + "min": "0", + "max": "100", + "format": "percent", + "$$hashKey": "object:202", + "decimals": null }, { - "format": "short", - "logBase": 1, - "max": null, - "min": null, + "label": null, "show": true, - "$$hashKey": "object:1008" + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:203" } ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, "yaxis": { "align": false, "alignLevel": null }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] + "lines": true, + "fill": 1, + "linewidth": 1, + "dashLength": 10, + "spaceLength": 10, + "pointradius": 2, + "legend": { + "show": true, + "values": true, + "min": true, + "max": true, + "current": true, + "total": false, + "avg": true, + "alignAsTable": true, + "hideEmpty": true, + "hideZero": true }, - "pluginVersion": "7.5.4", - "bars": false, - "dashes": false, - "error": false, + "nullPointMode": "connected", + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 0 + }, + "aliasColors": {}, + "seriesOverrides": [], + "thresholds": [], + "timeRegions": [], "fillGradient": 0, - "percentage": false, + "dashes": false, + "hiddenSeries": false, "points": false, + "bars": false, "stack": false, - "steppedLine": false, - "timeFrom": null, - "timeShift": null, - "hiddenSeries": false + "percentage": false, + "steppedLine": false } diff --git a/salt/grafana/panels/load_averages_graph.json.jinja b/salt/grafana/panels/load_averages_graph.json.jinja index a338ee3dd..ffdf22d56 100644 --- a/salt/grafana/panels/load_averages_graph.json.jinja +++ b/salt/grafana/panels/load_averages_graph.json.jinja @@ -44,7 +44,7 @@ } ] ], - "query": "SELECT mean(load1) as \"1m\", mean(load5) as \"5m\", mean(load15) as \"15m\" FROM \"system\" WHERE host =~ /$servername$/ AND $timeFilter GROUP BY time($interval), * ORDER BY asc", + "query": "SELECT mean(load1) as \"1 minute\", mean(load5) as \"5 minutes\", mean(load15) as \"15 minutes\" FROM \"system\" WHERE host =~ /$servername$/ AND $timeFilter GROUP BY time($interval), * ORDER BY asc", "rawQuery": true, "alias": "$tag_host: $col" }