diff --git a/salt/grafana/defaults.yaml b/salt/grafana/defaults.yaml index 0983f75f2..350ff94ea 100644 --- a/salt/grafana/defaults.yaml +++ b/salt/grafana/defaults.yaml @@ -129,12 +129,18 @@ grafana: y: 67 h: 1 w: 24 - management_interface_traffic_graph: + management_interface_traffic_inbound_graph: gridPos: x: 0 y: 68 h: 8 w: 24 + management_interface_traffic_outbound_graph: + gridPos: + x: 0 + y: 76 + h: 8 + w: 24 standalone: diff --git a/salt/grafana/panels/management_interface_traffic_inbound_graph.json.jinja b/salt/grafana/panels/management_interface_traffic_inbound_graph.json.jinja new file mode 100644 index 000000000..f6a396ea2 --- /dev/null +++ b/salt/grafana/panels/management_interface_traffic_inbound_graph.json.jinja @@ -0,0 +1,188 @@ +{ + "aliasColors": { + "InBound": "#629E51", + "OutBound": "#5195CE", + "net.non_negative_derivative": "super-light-blue" + }, + "dashLength": 10, + "datasource": "InfluxDB", + "editable": true, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "gridPos": { + "x": {{ PANELS.management_interface_traffic_inbound_graph.gridPos.x }}, + "y": {{ PANELS.management_interface_traffic_inbound_graph.gridPos.y }}, + "w": {{ PANELS.management_interface_traffic_inbound_graph.gridPos.w }}, + "h": {{ PANELS.management_interface_traffic_inbound_graph.gridPos.h }} + }, + "id": 18, + "interval": "30s", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxDataPoints": 750, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "pluginVersion": "7.5.4", + "pointradius": 5, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "targets": [ + { + "alias": "$tag_host $tag_role $manint", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "type": "tag", + "params": [ + "host" + ] + }, + { + "type": "tag", + "params": [ + "role" + ] + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "net", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "bytes_recv" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "1s" + ], + "type": "non_negative_derivative" + }, + { + "params": [ + "*8" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + }, + { + "condition": "AND", + "key": "interface", + "operator": "=~", + "value": "/^$manint$/" + }, + { + "condition": "AND", + "key": "role", + "operator": "=~", + "value": "/^$role$/" + } + ], + "query": "SELECT non_negative_derivative(mean(\"bytes_recv\"), 1s) *8 FROM \"net\" WHERE (\"host\" = '$servername' AND \"interface\" = '$manint') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": false + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Management Interface Traffic - Inbound", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "logBase": 1, + "max": null, + "min": 0, + "show": true, + "$$hashKey": "object:353", + "decimals": 1 + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true, + "$$hashKey": "object:354" + } + ], + "yaxis": { + "align": false, + "alignLevel": null + }, + "decimals": 1, + "bars": false, + "dashes": false, + "error": false, + "fill": 0, + "fillGradient": 0, + "hiddenSeries": false, + "percentage": false, + "points": false, + "stack": false, + "steppedLine": false, + "timeFrom": null, + "timeShift": null +} diff --git a/salt/grafana/panels/management_interface_traffic_outbound_graph.json.jinja b/salt/grafana/panels/management_interface_traffic_outbound_graph.json.jinja new file mode 100644 index 000000000..045c3e7a1 --- /dev/null +++ b/salt/grafana/panels/management_interface_traffic_outbound_graph.json.jinja @@ -0,0 +1,186 @@ +{ + "aliasColors": { + "InBound": "#629E51", + "OutBound": "#5195CE", + "net.non_negative_derivative": "super-light-blue" + }, + "dashLength": 10, + "datasource": "InfluxDB", + "editable": true, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "gridPos": { + "x": {{ PANELS.management_interface_traffic_outbound_graph.gridPos.x }}, + "y": {{ PANELS.management_interface_traffic_outbound_graph.gridPos.y }}, + "w": {{ PANELS.management_interface_traffic_outbound_graph.gridPos.w }}, + "h": {{ PANELS.management_interface_traffic_outbound_graph.gridPos.h }} + }, + "id": 69014, + "interval": "30s", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxDataPoints": 750, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "pluginVersion": "7.5.4", + "pointradius": 5, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "targets": [ + { + "alias": "$tag_host $tag_role $manint", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "type": "tag", + "params": [ + "host" + ] + }, + { + "type": "tag", + "params": [ + "role" + ] + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "net", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "bytes_sent" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "1s" + ], + "type": "non_negative_derivative" + }, + { + "params": [ + "*8" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + }, + { + "condition": "AND", + "key": "interface", + "operator": "=~", + "value": "/^$manint$/" + }, + { + "condition": "AND", + "key": "role", + "operator": "=~", + "value": "/^$role$/" + } + ] + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Management Interface Traffic - Outbound", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bps", + "logBase": 1, + "max": null, + "min": 0, + "show": true, + "$$hashKey": "object:353", + "decimals": 1 + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true, + "$$hashKey": "object:354" + } + ], + "yaxis": { + "align": false, + "alignLevel": null + }, + "decimals": 1, + "bars": false, + "dashes": false, + "error": false, + "fill": 0, + "fillGradient": 0, + "hiddenSeries": false, + "percentage": false, + "points": false, + "stack": false, + "steppedLine": false, + "timeFrom": null, + "timeShift": null +}