diff --git a/grafana/dashboards/client.json b/grafana/dashboards/client.json index 6ddf551..f778b96 100644 --- a/grafana/dashboards/client.json +++ b/grafana/dashboards/client.json @@ -26,7 +26,7 @@ "fiscalYearStartMonth": 0, "gnetId": 21053, "graphTooltip": 0, - "id": 33, + "id": 29, "links": [], "liveNow": false, "panels": [ @@ -3520,7 +3520,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3649,7 +3650,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3778,7 +3780,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -3907,7 +3910,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -4036,7 +4040,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -4165,7 +4170,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -4294,7 +4300,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -4423,7 +4430,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -4532,7 +4540,7 @@ } }, "mappings": [], - "unit": "percentunit" + "unit": "bytes" }, "overrides": [] }, @@ -4575,9 +4583,9 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "sum(dragonfly_client_disk_usage_space_total{namespace=~\"$namespace\",container=\"client\"})/\nsum(dragonfly_client_disk_space_total{namespace=~\"$namespace\",container=\"client\"})", + "expr": "sum(dragonfly_client_disk_usage_space_total{namespace=~\"$namespace\"})", "instant": false, - "legendFormat": "Used Space", + "legendFormat": "Usage Space", "range": true, "refId": "A" }, @@ -4587,15 +4595,15 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "(sum(dragonfly_client_disk_space_total{namespace=~\"$namespace\",container=\"client\"}) -\nsum(dragonfly_client_disk_usage_space_total{namespace=~\"$namespace\",container=\"client\"})) / \nsum(dragonfly_client_disk_space_total{namespace=~\"$namespace\",container=\"client\"})", + "expr": "sum(dragonfly_client_disk_space_total{namespace=~\"$namespace\"}) -\nsum(dragonfly_client_disk_usage_space_total{namespace=~\"$namespace\"})", "hide": false, "instant": false, - "legendFormat": "Unused Space", + "legendFormat": "Free Space", "range": true, "refId": "B" } ], - "title": "Disk Usage Space Total", + "title": "Disk Usage Space", "type": "piechart" }, { @@ -4609,24 +4617,108 @@ "color": { "mode": "thresholds" }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, "mappings": [], - "max": 1, - "min": 0, "thresholds": { "mode": "absolute", "steps": [ { - "color": "green" - }, + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Space" + }, + "properties": [ { - "color": "red", - "value": 0.9 + "id": "unit", + "value": "bytes" } ] }, - "unit": "percentunit" - }, - "overrides": [] + { + "matcher": { + "id": "byName", + "options": "Usage Space" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Free Space" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Usage Percentage" + }, + "properties": [ + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "min", + "value": 0 + }, + { + "id": "max", + "value": 1 + }, + { + "id": "custom.cellOptions", + "value": { + "type": "gauge" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 0.7 + }, + { + "color": "red", + "value": 0.85 + } + ] + } + } + ] + } + ] }, "gridPos": { "h": 9, @@ -4636,23 +4728,17 @@ }, "id": 104, "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": false + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" + "showHeader": true, + "sortBy": [] }, "pluginVersion": "11.2.0", "targets": [ @@ -4663,16 +4749,104 @@ }, "editorMode": "code", "exemplar": false, - "expr": "topk(10,dragonfly_client_disk_usage_space_total{namespace=~\"$namespace\",container=\"client\"} /\ndragonfly_client_disk_space_total{namespace=~\"$namespace\",container=\"client\"})", - "format": "time_series", + "expr": "topk(10,dragonfly_client_disk_space_total{namespace=~\"$namespace\"})", + "format": "table", "instant": true, - "legendFormat": "{{instance}}-{{container}}", + "legendFormat": "{{instance}}", "range": false, "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk(10,dragonfly_client_disk_usage_space_total{namespace=~\"$namespace\"})", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "{{instance}}", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "topk(10, dragonfly_client_disk_space_total{namespace=~\"$namespace\"}) - topk(10, dragonfly_client_disk_usage_space_total{namespace=~\"$namespace\"})", + "format": "table", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{instance}}", + "range": false, + "refId": "C", + "useBackend": false + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "topk(10, dragonfly_client_disk_usage_space_total{namespace=~\"$namespace\"}) / topk(10, dragonfly_client_disk_space_total{namespace=~\"$namespace\"})", + "format": "table", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "{{instance}}", + "range": false, + "refId": "D", + "useBackend": false } ], "title": "Disk Usage Space Top 10", - "type": "bargauge" + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "Value #A", + "Value #B", + "Value #C", + "Value #D", + "instance" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": {}, + "renameByName": { + "Value #A": "Space", + "Value #B": "Usage Space", + "Value #C": "Free Space", + "Value #D": "Usage Percentage", + "instance": "Instance" + } + } + } + ], + "type": "table" }, { "collapsed": false, @@ -4697,11 +4871,13 @@ "fieldConfig": { "defaults": { "mappings": [], + "min": 0, "thresholds": { "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] }, @@ -4763,11 +4939,13 @@ "fieldConfig": { "defaults": { "mappings": [], + "min": 0, "thresholds": { "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] }, @@ -4886,7 +5064,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -4989,7 +5168,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -5345,8 +5525,8 @@ { "current": { "selected": false, - "text": "cluster-a", - "value": "cluster-a" + "text": "dragonfly-system", + "value": "dragonfly-system" }, "datasource": { "type": "prometheus", diff --git a/grafana/dashboards/seed-client.json b/grafana/dashboards/seed-client.json index 403ab50..d352498 100644 --- a/grafana/dashboards/seed-client.json +++ b/grafana/dashboards/seed-client.json @@ -26,7 +26,7 @@ "fiscalYearStartMonth": 0, "gnetId": 21054, "graphTooltip": 0, - "id": 31, + "id": 28, "links": [], "liveNow": false, "panels": [ @@ -4539,7 +4539,7 @@ } }, "mappings": [], - "unit": "percentunit" + "unit": "bytes" }, "overrides": [] }, @@ -4582,9 +4582,9 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "sum(dragonfly_client_disk_usage_space_total{container=\"seed-client\",namespace=~\"$namespace\"})/\nsum(dragonfly_client_disk_space_total{container=\"seed-client\",namespace=~\"$namespace\"})", + "expr": "sum(dragonfly_client_disk_usage_space_total{container=\"seed-client\",namespace=~\"$namespace\"})", "instant": false, - "legendFormat": "Used Space", + "legendFormat": "Usage Space", "range": true, "refId": "A" }, @@ -4594,15 +4594,15 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "(sum(dragonfly_client_disk_space_total{container=\"seed-client\",namespace=~\"$namespace\"}) -\nsum(dragonfly_client_disk_usage_space_total{container=\"seed-client\",namespace=~\"$namespace\"}))/ \nsum(dragonfly_client_disk_space_total{container=\"seed-client\",namespace=~\"$namespace\"})", + "expr": "sum(dragonfly_client_disk_space_total{container=\"seed-client\",namespace=~\"$namespace\"}) - \nsum(dragonfly_client_disk_usage_space_total{container=\"seed-client\",namespace=~\"$namespace\"})", "hide": false, "instant": false, - "legendFormat": "Unused Space", + "legendFormat": "Free Space", "range": true, "refId": "B" } ], - "title": "Disk Usage Space Total", + "title": "Disk Usage Space", "type": "piechart" }, { @@ -4616,25 +4616,113 @@ "color": { "mode": "thresholds" }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, "mappings": [], - "max": 1, - "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Usage Space" + }, + "properties": [ + { + "id": "custom.hidden" }, { - "color": "red", - "value": 0.9 + "id": "unit", + "value": "bytes" } ] }, - "unit": "percentunit" - }, - "overrides": [] + { + "matcher": { + "id": "byName", + "options": "Space" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Usage Percentage" + }, + "properties": [ + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "gauge", + "valueDisplayMode": "text" + } + }, + { + "id": "min", + "value": 0 + }, + { + "id": "max", + "value": 1 + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 0.7 + }, + { + "color": "red", + "value": 0.85 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Free Space" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + } + ] }, "gridPos": { "h": 9, @@ -4642,24 +4730,24 @@ "x": 4, "y": 142 }, - "id": 109, + "id": 110, "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": false + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "Value #A" + } + ] }, "pluginVersion": "11.2.0", "targets": [ @@ -4670,15 +4758,103 @@ }, "editorMode": "code", "exemplar": false, - "expr": "dragonfly_client_disk_usage_space_total{container=\"seed-client\",namespace=~\"$namespace\"} /\ndragonfly_client_disk_space_total{container=\"seed-client\",namespace=~\"$namespace\"}", + "expr": "dragonfly_client_disk_usage_space_total{container=\"seed-client\",namespace=~\"$namespace\"}", + "format": "table", "instant": true, - "legendFormat": "{{instance}}-{{container}}", + "legendFormat": "{{instance}}", "range": false, "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "dragonfly_client_disk_space_total{container=\"seed-client\",namespace=~\"$namespace\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "{{instance}}", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "dragonfly_client_disk_space_total{container=\"seed-client\",namespace=~\"$namespace\"} - \ndragonfly_client_disk_usage_space_total{container=\"seed-client\",namespace=~\"$namespace\"}", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "{{instance}}", + "range": false, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "dragonfly_client_disk_usage_space_total{container=\"seed-client\",namespace=~\"$namespace\"} /\ndragonfly_client_disk_space_total{container=\"seed-client\",namespace=~\"$namespace\"}", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "{{instance}}", + "range": false, + "refId": "C" } ], "title": "Disk Usage Space(Instance)", - "type": "bargauge" + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "instance", + "Value #A", + "Value #B", + "Value #D", + "Value #C" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": { + "Value #A": 2, + "Value #B": 1, + "Value #C": 4, + "Value #D": 3, + "instance": 0 + }, + "renameByName": { + "Value #A": "Usage Space", + "Value #B": "Space", + "Value #C": "Usage Percentage", + "Value #D": "Free Space", + "instance": "Instance" + } + } + } + ], + "type": "table" }, { "collapsed": false, @@ -4703,6 +4879,7 @@ "fieldConfig": { "defaults": { "mappings": [], + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -4770,6 +4947,7 @@ "fieldConfig": { "defaults": { "mappings": [], + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -5115,8 +5293,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -5219,8 +5396,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -5357,8 +5533,8 @@ { "current": { "selected": false, - "text": "cluster-a", - "value": "cluster-a" + "text": "dragonfly-system", + "value": "dragonfly-system" }, "datasource": { "type": "prometheus", @@ -5416,6 +5592,6 @@ "timezone": "", "title": "Seed Client", "uid": "HtXpCprnk", - "version": 23, + "version": 2, "weekStart": "" }