From 8164afc6c70aac9ec4938d617f890cf681462ec0 Mon Sep 17 00:00:00 2001 From: Paul Cuzner Date: Fri, 25 May 2018 10:59:17 +1200 Subject: [PATCH] =?utf8?q?Fixes=C2=A0to=C2=A0template=C2=A0variables,?= =?utf8?q?=C2=A0and=C2=A0mon=5Fservers?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit mon_servers query was hardcoded from testing - so  this uses the ceph_mon_metadata metric to find the names of the mons to allow mon network traffic to be split out (assumes mons aren't collocated  though!) --- .../mgr-prometheus/network-usage-by-node.json | 412 +++++++++--------- 1 file changed, 198 insertions(+), 214 deletions(-) diff --git a/dashboards/mgr-prometheus/network-usage-by-node.json b/dashboards/mgr-prometheus/network-usage-by-node.json index cd58e69..ba2a2c4 100644 --- a/dashboards/mgr-prometheus/network-usage-by-node.json +++ b/dashboards/mgr-prometheus/network-usage-by-node.json @@ -1,10 +1,20 @@ { + "__inputs": [ + { + "name": "DS_LOCAL", + "label": "Local", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "5.0.4" + "version": "5.1.3" }, { "type": "panel", @@ -36,7 +46,7 @@ "gnetId": null, "graphTooltip": 0, "id": null, - "iteration": 1525134169600, + "iteration": 1527117275612, "links": [], "panels": [ { @@ -138,10 +148,14 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { - "collapsed": true, + "collapsed": false, "gridPos": { "h": 1, "w": 24, @@ -149,186 +163,192 @@ "y": 9 }, "id": 5, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Local", - "fill": 1, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum (irate(node_network_receive_bytes{instance=~\"[[mon_servers]].*\", device=~\"[[interfaces]].*\"}[30s])) by (instance) + \nsum (irate(node_network_transmit_bytes{instance=~\"[[mon_servers]].*\", device=~\"[[interfaces]].*\"}[30s])) by (instance)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "MON Network Load", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - } - ], + "panels": [], "repeat": null, "title": "MON Hosts", "type": "row" }, { - "collapsed": true, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, "gridPos": { - "h": 1, + "h": 7, "w": 24, "x": 0, "y": 10 }, - "id": 6, - "panels": [ + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum (irate(node_network_receive_bytes{instance=~\"[[mon_servers]].*\", device=~\"[[interfaces]].*\"}[30s])) by (instance) + \nsum (irate(node_network_transmit_bytes{instance=~\"[[mon_servers]].*\", device=~\"[[interfaces]].*\"}[30s])) by (instance)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "MON Network Load", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Local", - "fill": 1, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum \n (irate(node_network_receive_bytes{instance=~\"[[osd_servers]]\", device=~\"[[interfaces]].*\"}[30s]) + \n irate(node_network_transmit_bytes{instance=~\"[[osd_servers]]\", device=~\"[[interfaces]].*\"}[30s])) by(instance)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}}", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "OSD Hosts Network Load", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true } ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 6, + "panels": [], "repeat": null, "title": "OSD Hosts", "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum \n (irate(node_network_receive_bytes{instance=~\"[[osd_servers]]\", device=~\"[[interfaces]].*\"}[30s]) + \n irate(node_network_transmit_bytes{instance=~\"[[osd_servers]]\", device=~\"[[interfaces]].*\"}[30s])) by(instance)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "OSD Hosts Network Load", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "refresh": "15s", @@ -340,7 +360,7 @@ { "allValue": null, "current": {}, - "datasource": null, + "datasource": "${DS_LOCAL}", "hide": 2, "includeAll": true, "label": null, @@ -359,54 +379,18 @@ }, { "allValue": null, - "current": { - "text": "All", - "value": "$__all" - }, + "current": {}, + "datasource": "${DS_LOCAL}", "hide": 2, "includeAll": true, "label": "", "multi": false, "name": "mon_servers", - "options": [ - { - "selected": true, - "text": "All", - "value": "$__all" - }, - { - "selected": false, - "text": "rhs-cli-04.ceph-dev.lab.eng.rdu2.redhat.com", - "value": "rhs-cli-04.ceph-dev.lab.eng.rdu2.redhat.com" - }, - { - "selected": false, - "text": "rhs-cli-05.ceph-dev.lab.eng.rdu2.redhat.com", - "value": "rhs-cli-05.ceph-dev.lab.eng.rdu2.redhat.com" - }, - { - "selected": false, - "text": "rhs-cli-06.ceph-dev.lab.eng.rdu2.redhat.com", - "value": "rhs-cli-06.ceph-dev.lab.eng.rdu2.redhat.com" - } - ], - "query": "rhs-cli-04.ceph-dev.lab.eng.rdu2.redhat.com,rhs-cli-05.ceph-dev.lab.eng.rdu2.redhat.com,rhs-cli-06.ceph-dev.lab.eng.rdu2.redhat.com", - "type": "custom" - }, - { - "allValue": null, - "current": {}, - "datasource": null, - "hide": 2, - "includeAll": true, - "label": null, - "multi": false, - "name": "only_osds", "options": [], - "query": "label_values(ceph_server_metadata{services=\"osd\"}, hostname)", + "query": "label_values(ceph_mon_metadata, hostname)", "refresh": 1, "regex": "", - "sort": 1, + "sort": 0, "tagValuesQuery": "", "tags": [], "tagsQuery": "", @@ -416,17 +400,17 @@ { "allValue": null, "current": {}, - "datasource": null, + "datasource": "${DS_LOCAL}", "hide": 2, "includeAll": true, "label": null, "multi": false, - "name": "copy_of_mon_servers", + "name": "only_osds", "options": [], - "query": "label_values(ceph_server_metadata{services=~\".*mon.*\"}, hostname)", + "query": "label_values(ceph_server_metadata{services=\"osd\"}, hostname)", "refresh": 1, "regex": "", - "sort": 0, + "sort": 1, "tagValuesQuery": "", "tags": [], "tagsQuery": "", @@ -488,5 +472,5 @@ }, "timezone": "", "title": "Network Usage by Server", - "version": 19 + "version": 30 } -- 2.47.3