diff --git a/grafana/dashboards/swarmprom-nodes-dash.json b/grafana/dashboards/swarmprom-nodes-dash.json index 1b142ec..522052d 100644 --- a/grafana/dashboards/swarmprom-nodes-dash.json +++ b/grafana/dashboards/swarmprom-nodes-dash.json @@ -2,7 +2,6 @@ "annotations": { "list": [ { - "$$hashKey": "object:157", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, @@ -17,7 +16,7 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "iteration": 1520585531240, + "iteration": 1547535746076, "links": [], "panels": [ { @@ -445,7 +444,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -531,7 +534,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "cacheTimeout": null, @@ -554,7 +561,7 @@ }, "gridPos": { "h": 4, - "w": 6, + "w": 3, "x": 0, "y": 11 }, @@ -639,8 +646,8 @@ }, "gridPos": { "h": 4, - "w": 6, - "x": 6, + "w": 4, + "x": 3, "y": 11 }, "id": 8, @@ -722,8 +729,258 @@ }, "gridPos": { "h": 4, - "w": 6, - "x": 12, + "w": 3, + "x": 7, + "y": 11 + }, + "hideTimeOverride": true, + "id": 22, + "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" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum((node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes) * on(instance) group_left(node_name) node_meta{node_id=~\"$node_id\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 20 + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Total swap memory used", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": null, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 10, + "y": 11 + }, + "id": 23, + "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" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(((node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes) / node_memory_SwapTotal_bytes) * on(instance) group_left(node_name) node_meta{node_id=~\"$node_id\"} * 100) / count(node_meta * on(instance) group_left(node_name) node_meta{node_id=~\"$node_id\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 20 + } + ], + "thresholds": "5,10,100", + "title": "Used swap memory", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": null, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 14, + "y": 11 + }, + "id": 24, + "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" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(((node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes) / node_memory_MemTotal_bytes) * on(instance) group_left(node_name) node_meta{node_id=~\"$node_id\"} * 100) / count(node_meta * on(instance) group_left(node_name) node_meta{node_id=~\"$node_id\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 20 + } + ], + "thresholds": "5,10,100", + "title": "Swap used / total RAM memory ratio", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": null, + "decimals": 1, + "format": "decbytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 17, "y": 11 }, "hideTimeOverride": true, @@ -807,8 +1064,8 @@ }, "gridPos": { "h": 4, - "w": 6, - "x": 18, + "w": 4, + "x": 20, "y": 11 }, "id": 10, @@ -958,7 +1215,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -966,7 +1227,6 @@ "dashLength": 10, "dashes": false, "datasource": null, - "decimals": 2, "fill": 1, "gridPos": { "h": 7, @@ -974,6 +1234,94 @@ "x": 0, "y": 22 }, + "id": 21, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "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((node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes) * on(instance) group_left(node_name) node_meta{node_id=~\"$node_id\"}) by (node_name)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Used {{node_name}}", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Swap memory usage by Node", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decbytes", + "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 + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "decimals": 2, + "fill": 1, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 29 + }, "id": 16, "legend": { "alignAsTable": true, @@ -1050,7 +1398,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1064,7 +1416,7 @@ "h": 7, "w": 12, "x": 0, - "y": 29 + "y": 36 }, "id": 18, "legend": { @@ -1142,7 +1494,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1156,7 +1512,7 @@ "h": 7, "w": 12, "x": 12, - "y": 29 + "y": 36 }, "id": 19, "legend": { @@ -1228,7 +1584,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1242,7 +1602,7 @@ "h": 7, "w": 18, "x": 0, - "y": 36 + "y": 43 }, "id": 12, "legend": { @@ -1316,7 +1676,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "cacheTimeout": null, @@ -1340,7 +1704,7 @@ "h": 7, "w": 6, "x": 18, - "y": 36 + "y": 43 }, "id": 7, "interval": null, @@ -1410,7 +1774,7 @@ "h": 7, "w": 24, "x": 0, - "y": 43 + "y": 50 }, "id": 17, "legend": { @@ -1490,7 +1854,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "columns": [], @@ -1500,7 +1868,7 @@ "h": 7, "w": 24, "x": 0, - "y": 50 + "y": 57 }, "hideTimeOverride": true, "id": 20, @@ -1545,7 +1913,7 @@ ], "timeFrom": "1s", "title": "Cluster members", - "transform": "timeseries_to_rows", + "transform": "table", "type": "table" } ], @@ -1573,6 +1941,7 @@ "query": "node_meta", "refresh": 1, "regex": "/node_id=\"([^\"]+)\"/", + "skipUrlSync": false, "sort": 0, "tagValuesQuery": "label_values({node_id=\"$tag\"},node_name)", "tags": [ @@ -1653,6 +2022,7 @@ ], "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", "refresh": 2, + "skipUrlSync": false, "type": "interval" } ] @@ -1689,5 +2059,5 @@ "timezone": "", "title": "Docker Swarm Nodes", "uid": "BPlb-Sgik", - "version": 2 + "version": 3 }