diff --git a/salt/grafana/defaults.yaml b/salt/grafana/defaults.yaml index ec57e99e1..59d3f9444 100644 --- a/salt/grafana/defaults.yaml +++ b/salt/grafana/defaults.yaml @@ -179,29 +179,48 @@ grafana: gridPos: x: 0 y: 44 - h: 6 + h: 8 w: 12 management_interface_drops_graph: gridPos: x: 12 y: 44 - h: 6 + h: 8 w: 12 monitor_traffic_graph: gridPos: x: 0 - y: 50 + y: 52 h: 8 w: 24 monitor_interface_packets_graph: gridPos: x: 0 - y: 58 - h: 6 + y: 60 + h: 8 w: 12 monitor_interface_drops_graph: gridPos: x: 12 - y: 58 - h: 6 + y: 60 + h: 8 + w: 12 + + row_disk: + gridPos: + x: 0 + y: 68 + h: 1 + w: 24 + disk_usage_root_graph: + gridPos: + x: 0 + y: 69 + h: 8 + w: 12 + disk_usage_nsm_graph: + gridPos: + x: 12 + y: 69 + h: 8 w: 12 diff --git a/salt/grafana/panels/disk_usage_nsm_graph.json.jinja b/salt/grafana/panels/disk_usage_nsm_graph.json.jinja new file mode 100644 index 000000000..2d9522d4f --- /dev/null +++ b/salt/grafana/panels/disk_usage_nsm_graph.json.jinja @@ -0,0 +1,184 @@ +{ + "type": "graph", + "title": "Disk Usage /nsm", + "gridPos": { + "x": {{ PANELS.disk_usage_nsm_graph.gridPos.x }}, + "y": {{ PANELS.disk_usage_nsm_graph.gridPos.y }}, + "w": {{ PANELS.disk_usage_nsm_graph.gridPos.w }}, + "h": {{ PANELS.disk_usage_nsm_graph.gridPos.h }} + }, + "id": 68888, + "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(total) AS \"total\", mean(used) as \"used\" FROM \"disk\" WHERE \"host\" =~ /$servername$/ AND \"path\" = '/nsm' AND $timeFilter GROUP BY time($interval), \"host\", \"path\"", + "rawQuery": true, + "alias": "$tag_host: mountpoint $tag_path - $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_total) AS \"trend_total\", mean(mean_used) as \"trend_used\" FROM \"so_long_term\".\"disk\" WHERE \"host\" =~ /$servername$/ AND \"path\" = '/nsm' AND $timeFilter GROUP BY time($interval), \"host\", \"path\"", + "rawQuery": true, + "alias": "$tag_host: mountpoint $tag_path - $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:235" + }, + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:236" + } + ], + "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:486", + "alias": "/total/", + "fill": 0, + "linewidth": 2, + "color": "#C4162A", + "zindex": 3 + }, + { + "$$hashKey": "object:829", + "alias": "/trend/", + "fill": 0, + "linewidth": 4, + "dashes": true, + "dashLength": 4 + } + ], + "thresholds": [], + "timeRegions": [], + "steppedLine": true, + "fillGradient": 0, + "dashes": false, + "hiddenSeries": false, + "points": false, + "bars": false, + "stack": false, + "percentage": false +} diff --git a/salt/grafana/panels/disk_usage_root_graph.json.jinja b/salt/grafana/panels/disk_usage_root_graph.json.jinja new file mode 100644 index 000000000..82c56cb5c --- /dev/null +++ b/salt/grafana/panels/disk_usage_root_graph.json.jinja @@ -0,0 +1,184 @@ +{ + "type": "graph", + "title": "Disk Usage /", + "gridPos": { + "x": {{ PANELS.disk_usage_root_graph.gridPos.x }}, + "y": {{ PANELS.disk_usage_root_graph.gridPos.y }}, + "w": {{ PANELS.disk_usage_root_graph.gridPos.w }}, + "h": {{ PANELS.disk_usage_root_graph.gridPos.h }} + }, + "id": 61880, + "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(total) AS \"total\", mean(used) as \"used\" FROM \"disk\" WHERE \"host\" =~ /$servername$/ AND \"path\" = '/' AND $timeFilter GROUP BY time($interval), \"host\", \"path\"", + "rawQuery": true, + "alias": "$tag_host: mountpoint $tag_path - $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_total) AS \"trend_total\", mean(mean_used) as \"trend_used\" FROM \"so_long_term\".\"disk\" WHERE \"host\" =~ /$servername$/ AND \"path\" = '/' AND $timeFilter GROUP BY time($interval), \"host\", \"path\"", + "rawQuery": true, + "alias": "$tag_host: mountpoint $tag_path - $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:235" + }, + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:236" + } + ], + "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:486", + "alias": "/total/", + "fill": 0, + "linewidth": 2, + "color": "#C4162A", + "zindex": 3 + }, + { + "$$hashKey": "object:829", + "alias": "/trend/", + "fill": 0, + "linewidth": 4, + "dashes": true, + "dashLength": 4 + } + ], + "thresholds": [], + "timeRegions": [], + "steppedLine": true, + "fillGradient": 0, + "dashes": false, + "hiddenSeries": false, + "points": false, + "bars": false, + "stack": false, + "percentage": false +} diff --git a/salt/grafana/panels/row_disk.json.jinja b/salt/grafana/panels/row_disk.json.jinja new file mode 100644 index 000000000..3f6270ed9 --- /dev/null +++ b/salt/grafana/panels/row_disk.json.jinja @@ -0,0 +1,15 @@ +{ + "collapsed": false, + "datasource": null, + "gridPos": { + "x": {{ PANELS.row_disk.gridPos.x }}, + "y": {{ PANELS.row_disk.gridPos.y }}, + "w": {{ PANELS.row_disk.gridPos.w }}, + "h": {{ PANELS.row_disk.gridPos.h }} + }, + "id": 333, + "panels": [], + "repeat": null, + "title": "Disk", + "type": "row" + }