diff --git a/salt/grafana/defaults.yaml b/salt/grafana/defaults.yaml index 97e04f63d..3a0b11719 100644 --- a/salt/grafana/defaults.yaml +++ b/salt/grafana/defaults.yaml @@ -97,6 +97,19 @@ grafana: h: 8 w: 12 + row_memory: + gridPos: + x: 0 + y: 49 + h: 1 + w: 24 + memory_usage_percent_graph: + gridPos: + x: 0 + y: 50 + h: 8 + w: 24 + diff --git a/salt/grafana/panels/memory_usage_percent_graph.json.jinja b/salt/grafana/panels/memory_usage_percent_graph.json.jinja new file mode 100644 index 000000000..dddfd73d6 --- /dev/null +++ b/salt/grafana/panels/memory_usage_percent_graph.json.jinja @@ -0,0 +1,155 @@ +{ + "type": "graph", + "title": "Memory Usage", + "gridPos": { + "x": {{ PANELS.memory_usage_percent_graph.gridPos.x }}, + "y": {{ PANELS.memory_usage_percent_graph.gridPos.y }}, + "w": {{ PANELS.memory_usage_percent_graph.gridPos.w }}, + "h": {{ PANELS.memory_usage_percent_graph.gridPos.h }} + }, + "id": 69013, + "targets": [ + { + "refId": "A", + "queryType": "randomWalk", + "policy": "default", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + }, + { + "condition": "AND", + "key": "role", + "operator": "=~", + "value": "/^$role$/" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "tag", + "params": [ + "host" + ] + }, + { + "type": "tag", + "params": [ + "role" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "used_percent" + ] + }, + { + "type": "mean", + "params": [] + } + ] + ], + "measurement": "mem", + "alias": "$tag_host $tag_role" + } + ], + "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": "percent", + "$$hashKey": "object:504" + }, + { + "label": null, + "show": true, + "logBase": 1, + "min": null, + "max": null, + "format": "short", + "$$hashKey": "object:505" + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "yaxis": { + "align": false, + "alignLevel": null + }, + "lines": true, + "linewidth": 1, + "dashLength": 10, + "spaceLength": 10, + "pointradius": 2, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "nullPointMode": "connected", + "tooltip": { + "value_type": "individual", + "shared": true, + "sort": 2 + }, + "aliasColors": {}, + "seriesOverrides": [], + "thresholds": [], + "timeRegions": [], + "decimals": 1, + "fill": 0, + "fillGradient": 0, + "dashes": false, + "hiddenSeries": false, + "points": false, + "bars": false, + "stack": false, + "percentage": false, + "steppedLine": false, + "description": "" +}