From: Paul Cuzner Date: Thu, 24 May 2018 22:56:08 +0000 (+1200) Subject: Fix templating declaration and health chart X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=79777dd4bc848fc878d8a7927684e4156e688ff4;p=cephmetrics.git Fix templating declaration and health chart Templating needed to have the data source defined  to prevent template init failures, the health  history chart's yaxis wasn't big enough i.e. when  the cluster is in an error state (err=2), the line  drawn by grafana was at the top of the graph and only just visible! --- diff --git a/dashboards/mgr-prometheus/ceph-health.json b/dashboards/mgr-prometheus/ceph-health.json index dd65412..88dfb38 100644 --- a/dashboards/mgr-prometheus/ceph-health.json +++ b/dashboards/mgr-prometheus/ceph-health.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": "datasource", @@ -36,7 +46,7 @@ "gnetId": null, "graphTooltip": 0, "id": null, - "iteration": 1526964924155, + "iteration": 1527129537463, "links": [ { "asDropdown": true, @@ -61,7 +71,7 @@ "rgba(255,165,0, 1)", "rgba(255, 0, 0, 1)" ], - "datasource": null, + "datasource": "${DS_LOCAL}", "description": "Shows the overall health of the ceph cluster.", "format": "none", "gauge": { @@ -140,7 +150,7 @@ "textEditor": true } ], - "thresholds": "1,5", + "thresholds": "0.5,1.5", "timeFrom": "1m", "timeShift": null, "title": "", @@ -276,7 +286,7 @@ "format": "short", "label": "", "logBase": 1, - "max": "2", + "max": "2.5", "min": "-0.5", "show": false }, @@ -288,7 +298,11 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "repeat": null, @@ -311,7 +325,7 @@ "h": 5, "w": 2, "x": 0, - "y": 5 + "y": 14 }, "id": 6, "links": [], @@ -343,7 +357,7 @@ "h": 2, "w": 3, "x": 2, - "y": 5 + "y": 14 }, "id": 28, "interval": null, @@ -378,8 +392,8 @@ "scopedVars": { "mon_servers": { "selected": false, - "text": "mon.rhs-cli-04", - "value": "mon.rhs-cli-04" + "text": "mon.mira055", + "value": "mon.mira055" } }, "sparkline": { @@ -428,7 +442,7 @@ "h": 3, "w": 2, "x": 8, - "y": 5 + "y": 14 }, "id": 31, "links": [], @@ -461,7 +475,7 @@ "h": 3, "w": 2, "x": 10, - "y": 5 + "y": 14 }, "height": "95", "hideTimeOverride": true, @@ -568,7 +582,7 @@ "h": 3, "w": 2, "x": 12, - "y": 5 + "y": 14 }, "height": "95", "hideTimeOverride": true, @@ -675,7 +689,7 @@ "h": 3, "w": 2, "x": 14, - "y": 5 + "y": 14 }, "height": "95", "hideTimeOverride": true, @@ -783,7 +797,7 @@ "h": 3, "w": 2, "x": 16, - "y": 5 + "y": 14 }, "height": "95", "hideTimeOverride": true, @@ -890,7 +904,7 @@ "h": 3, "w": 2, "x": 18, - "y": 5 + "y": 14 }, "height": "95", "hideTimeOverride": true, @@ -1002,7 +1016,7 @@ "h": 3, "w": 2, "x": 20, - "y": 5 + "y": 14 }, "height": "95", "hideTimeOverride": true, @@ -1109,7 +1123,7 @@ "h": 3, "w": 2, "x": 22, - "y": 5 + "y": 14 }, "height": "95", "hideTimeOverride": true, @@ -1215,7 +1229,7 @@ "h": 2, "w": 3, "x": 2, - "y": 7 + "y": 16 }, "id": 69, "interval": null, @@ -1247,13 +1261,13 @@ ], "repeat": null, "repeatDirection": "v", - "repeatIteration": 1526963039202, + "repeatIteration": 1527129537462, "repeatPanelId": 28, "scopedVars": { "mon_servers": { "selected": false, - "text": "mon.rhs-cli-05", - "value": "mon.rhs-cli-05" + "text": "mon.mira070", + "value": "mon.mira070" } }, "sparkline": { @@ -1302,7 +1316,7 @@ "h": 4, "w": 2, "x": 8, - "y": 8 + "y": 17 }, "id": 54, "links": [], @@ -1320,7 +1334,7 @@ "h": 4, "w": 10, "x": 10, - "y": 8 + "y": 17 }, "id": 58, "links": [], @@ -1420,7 +1434,7 @@ "h": 2, "w": 3, "x": 2, - "y": 9 + "y": 18 }, "id": 70, "interval": null, @@ -1452,13 +1466,421 @@ ], "repeat": null, "repeatDirection": "v", - "repeatIteration": 1526963039202, + "repeatIteration": 1527129537462, + "repeatPanelId": 28, + "scopedVars": { + "mon_servers": { + "selected": false, + "text": "mon.reesi001", + "value": "mon.reesi001" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "label_replace(ceph_mon_quorum_status{ceph_daemon=~\"[[mon_servers]]\"},\"mon_host\",\"$2\",\"ceph_daemon\",\"(.*)_(.*)\")", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "0.5,1", + "title": "$mon_servers", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + }, + { + "op": "=", + "text": "OK", + "value": "1" + }, + { + "op": "=", + "text": "DOWN", + "value": "0" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#299c46" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 2, + "y": 20 + }, + "id": 71, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeat": null, + "repeatDirection": "v", + "repeatIteration": 1527129537462, + "repeatPanelId": 28, + "scopedVars": { + "mon_servers": { + "selected": false, + "text": "mon.reesi002", + "value": "mon.reesi002" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "label_replace(ceph_mon_quorum_status{ceph_daemon=~\"[[mon_servers]]\"},\"mon_host\",\"$2\",\"ceph_daemon\",\"(.*)_(.*)\")", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "0.5,1", + "title": "$mon_servers", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + }, + { + "op": "=", + "text": "OK", + "value": "1" + }, + { + "op": "=", + "text": "DOWN", + "value": "0" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#299c46" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 2, + "y": 22 + }, + "id": 72, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeat": null, + "repeatDirection": "v", + "repeatIteration": 1527129537462, + "repeatPanelId": 28, + "scopedVars": { + "mon_servers": { + "selected": false, + "text": "mon.reesi003", + "value": "mon.reesi003" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "label_replace(ceph_mon_quorum_status{ceph_daemon=~\"[[mon_servers]]\"},\"mon_host\",\"$2\",\"ceph_daemon\",\"(.*)_(.*)\")", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "0.5,1", + "title": "$mon_servers", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + }, + { + "op": "=", + "text": "OK", + "value": "1" + }, + { + "op": "=", + "text": "DOWN", + "value": "0" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#299c46" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 2, + "y": 24 + }, + "id": 73, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeat": null, + "repeatDirection": "v", + "repeatIteration": 1527129537462, + "repeatPanelId": 28, + "scopedVars": { + "mon_servers": { + "selected": false, + "text": "mon.reesi004", + "value": "mon.reesi004" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "label_replace(ceph_mon_quorum_status{ceph_daemon=~\"[[mon_servers]]\"},\"mon_host\",\"$2\",\"ceph_daemon\",\"(.*)_(.*)\")", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "0.5,1", + "title": "$mon_servers", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + }, + { + "op": "=", + "text": "OK", + "value": "1" + }, + { + "op": "=", + "text": "DOWN", + "value": "0" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#299c46" + ], + "datasource": null, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 2, + "y": 26 + }, + "id": 74, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeat": null, + "repeatDirection": "v", + "repeatIteration": 1527129537462, "repeatPanelId": 28, "scopedVars": { "mon_servers": { "selected": false, - "text": "mon.rhs-cli-06", - "value": "mon.rhs-cli-06" + "text": "mon.reesi005", + "value": "mon.reesi005" } }, "sparkline": { @@ -1529,7 +1951,7 @@ "h": 7, "w": 5, "x": 0, - "y": 6 + "y": 15 }, "id": 18, "links": [], @@ -1675,7 +2097,7 @@ "h": 7, "w": 5, "x": 5, - "y": 6 + "y": 15 }, "id": 20, "links": [], @@ -1818,7 +2240,7 @@ "h": 7, "w": 3, "x": 0, - "y": 14 + "y": 16 }, "id": 14, "links": [], @@ -1910,7 +2332,7 @@ "h": 7, "w": 6, "x": 3, - "y": 14 + "y": 16 }, "hideTimeOverride": true, "id": 15, @@ -2017,7 +2439,7 @@ "h": 7, "w": 6, "x": 9, - "y": 14 + "y": 16 }, "hideTimeOverride": true, "id": 16, @@ -2117,7 +2539,7 @@ "h": 7, "w": 9, "x": 15, - "y": 14 + "y": 16 }, "id": 68, "links": [], @@ -2226,7 +2648,7 @@ "h": 7, "w": 2, "x": 6, - "y": 21 + "y": 23 }, "id": 17, "links": [], @@ -2242,7 +2664,7 @@ "h": 7, "w": 2, "x": 16, - "y": 21 + "y": 23 }, "id": 19, "links": [], @@ -2362,5 +2784,5 @@ }, "timezone": "browser", "title": "Ceph Health", - "version": 43 + "version": 31 }