Skip to content

Commit a795e80

Browse files
authored
chore(grafana): update kubernetes_deployment_metrics add container cpu and memory usage
1 parent 55a9c3c commit a795e80

1 file changed

Lines changed: 120 additions & 23 deletions

File tree

grafana/rootfs/usr/share/grafana/api/dashboards/kubernetes_deployment_metrics.json

Lines changed: 120 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"showThresholdLabels": false,
9494
"showThresholdMarkers": true
9595
},
96-
"pluginVersion": "9.1.1",
96+
"pluginVersion": "9.5.3",
9797
"targets": [
9898
{
9999
"datasource": null,
@@ -173,7 +173,7 @@
173173
"showThresholdLabels": false,
174174
"showThresholdMarkers": true
175175
},
176-
"pluginVersion": "9.1.1",
176+
"pluginVersion": "9.5.3",
177177
"targets": [
178178
{
179179
"datasource": null,
@@ -248,7 +248,7 @@
248248
"showThresholdLabels": false,
249249
"showThresholdMarkers": true
250250
},
251-
"pluginVersion": "9.1.1",
251+
"pluginVersion": "9.5.3",
252252
"targets": [
253253
{
254254
"datasource": null,
@@ -321,7 +321,7 @@
321321
},
322322
"textMode": "auto"
323323
},
324-
"pluginVersion": "9.1.1",
324+
"pluginVersion": "9.5.3",
325325
"targets": [
326326
{
327327
"datasource": null,
@@ -339,7 +339,6 @@
339339
"type": "stat"
340340
},
341341
{
342-
"datasource": null,
343342
"fieldConfig": {
344343
"defaults": {
345344
"color": {
@@ -396,7 +395,7 @@
396395
},
397396
"textMode": "auto"
398397
},
399-
"pluginVersion": "9.1.1",
398+
"pluginVersion": "9.5.3",
400399
"targets": [
401400
{
402401
"datasource": null,
@@ -467,7 +466,7 @@
467466
},
468467
"textMode": "auto"
469468
},
470-
"pluginVersion": "9.1.1",
469+
"pluginVersion": "9.5.3",
471470
"targets": [
472471
{
473472
"datasource": null,
@@ -542,7 +541,7 @@
542541
},
543542
"textMode": "auto"
544543
},
545-
"pluginVersion": "9.1.1",
544+
"pluginVersion": "9.5.3",
546545
"targets": [
547546
{
548547
"datasource": null,
@@ -613,7 +612,7 @@
613612
},
614613
"textMode": "auto"
615614
},
616-
"pluginVersion": "9.1.1",
615+
"pluginVersion": "9.5.3",
617616
"targets": [
618617
{
619618
"datasource": null,
@@ -686,7 +685,7 @@
686685
},
687686
"textMode": "auto"
688687
},
689-
"pluginVersion": "9.1.1",
688+
"pluginVersion": "9.5.3",
690689
"targets": [
691690
{
692691
"datasource": null,
@@ -744,7 +743,7 @@
744743
"alertThreshold": true
745744
},
746745
"percentage": false,
747-
"pluginVersion": "9.1.1",
746+
"pluginVersion": "9.5.3",
748747
"pointradius": 5,
749748
"points": false,
750749
"renderer": "flot",
@@ -768,7 +767,7 @@
768767
],
769768
"thresholds": [],
770769
"timeRegions": [],
771-
"title": "Deployment CPU usage",
770+
"title": "Pod CPU usage",
772771
"tooltip": {
773772
"msResolution": true,
774773
"shared": true,
@@ -845,7 +844,7 @@
845844
"alertThreshold": true
846845
},
847846
"percentage": false,
848-
"pluginVersion": "9.1.1",
847+
"pluginVersion": "9.5.3",
849848
"pointradius": 5,
850849
"points": false,
851850
"renderer": "flot",
@@ -857,11 +856,11 @@
857856
{
858857
"datasource": null,
859858
"editorMode": "code",
860-
"expr": "sum (rate (container_cpu_usage_seconds_total{pod!=\"\",pod!=\"POD\",pod=~\"^$Deployment.*$\",pod=~\"^$Statefulset.*$\",namespace=\"$Namespace\"}[1m])) by (pod)",
859+
"expr": "sum (rate (container_cpu_usage_seconds_total{pod!=\"\",pod!=\"POD\",pod=~\"^$Deployment.*$\",pod=~\"^$Statefulset.*$\",namespace=\"$Namespace\"}[1m])) by (pod, container)",
861860
"hide": false,
862861
"interval": "10s",
863862
"intervalFactor": 1,
864-
"legendFormat": "pod: {{ pod }} ",
863+
"legendFormat": "container: {{ pod }}:{{ container }} ",
865864
"metric": "container_cpu",
866865
"range": true,
867866
"refId": "A",
@@ -945,7 +944,7 @@
945944
"alertThreshold": true
946945
},
947946
"percentage": false,
948-
"pluginVersion": "9.1.1",
947+
"pluginVersion": "9.5.3",
949948
"pointradius": 5,
950949
"points": false,
951950
"renderer": "flot",
@@ -969,7 +968,105 @@
969968
],
970969
"thresholds": [],
971970
"timeRegions": [],
972-
"title": "Deployment memory usage",
971+
"title": "Pod memory usage",
972+
"tooltip": {
973+
"msResolution": false,
974+
"shared": true,
975+
"sort": 2,
976+
"value_type": "cumulative"
977+
},
978+
"type": "graph",
979+
"xaxis": {
980+
"mode": "time",
981+
"show": true,
982+
"values": []
983+
},
984+
"yaxes": [
985+
{
986+
"$$hashKey": "object:920",
987+
"format": "bytes",
988+
"logBase": 1,
989+
"show": true
990+
},
991+
{
992+
"$$hashKey": "object:921",
993+
"format": "short",
994+
"logBase": 1,
995+
"show": false
996+
}
997+
],
998+
"yaxis": {
999+
"align": false
1000+
}
1001+
},
1002+
{
1003+
"aliasColors": {},
1004+
"bars": false,
1005+
"dashLength": 10,
1006+
"dashes": false,
1007+
"datasource": {},
1008+
"decimals": 2,
1009+
"editable": true,
1010+
"error": false,
1011+
"fill": 0,
1012+
"fillGradient": 0,
1013+
"grid": {},
1014+
"gridPos": {
1015+
"h": 7,
1016+
"w": 24,
1017+
"x": 0,
1018+
"y": 29
1019+
},
1020+
"hiddenSeries": false,
1021+
"id": 44,
1022+
"isNew": true,
1023+
"legend": {
1024+
"alignAsTable": true,
1025+
"avg": true,
1026+
"current": true,
1027+
"max": false,
1028+
"min": false,
1029+
"rightSide": true,
1030+
"show": true,
1031+
"sideWidth": 200,
1032+
"sort": "current",
1033+
"sortDesc": true,
1034+
"total": false,
1035+
"values": true
1036+
},
1037+
"lines": true,
1038+
"linewidth": 2,
1039+
"links": [],
1040+
"nullPointMode": "connected",
1041+
"options": {
1042+
"alertThreshold": true
1043+
},
1044+
"percentage": false,
1045+
"pluginVersion": "9.5.3",
1046+
"pointradius": 5,
1047+
"points": false,
1048+
"renderer": "flot",
1049+
"seriesOverrides": [],
1050+
"spaceLength": 10,
1051+
"stack": false,
1052+
"steppedLine": false,
1053+
"targets": [
1054+
{
1055+
"datasource": {},
1056+
"editorMode": "code",
1057+
"expr": "sum (container_memory_working_set_bytes{image!=\"\",pod!=\"\",pod=~\"^$Deployment.*$\",pod=~\"^$Statefulset.*$\",namespace=\"$Namespace\"}) by (pod, container)",
1058+
"interval": "10s",
1059+
"intervalFactor": 1,
1060+
"legendFormat": "{{ pod }}:{{ container }}",
1061+
"metric": "container_memory_usage:sort_desc",
1062+
"range": true,
1063+
"refId": "A",
1064+
"step": 10
1065+
}
1066+
],
1067+
"thresholds": [],
1068+
"timeRegions": [],
1069+
"title": "Container memory usage",
9731070
"tooltip": {
9741071
"msResolution": false,
9751072
"shared": true,
@@ -1016,7 +1113,7 @@
10161113
"h": 7,
10171114
"w": 24,
10181115
"x": 0,
1019-
"y": 29
1116+
"y": 36
10201117
},
10211118
"hiddenSeries": false,
10221119
"id": 16,
@@ -1043,7 +1140,7 @@
10431140
"alertThreshold": true
10441141
},
10451142
"percentage": false,
1046-
"pluginVersion": "9.1.1",
1143+
"pluginVersion": "9.5.3",
10471144
"pointradius": 5,
10481145
"points": false,
10491146
"renderer": "flot",
@@ -1079,7 +1176,7 @@
10791176
],
10801177
"thresholds": [],
10811178
"timeRegions": [],
1082-
"title": "Deployment network I/O",
1179+
"title": "Pod network I/O",
10831180
"tooltip": {
10841181
"msResolution": false,
10851182
"shared": true,
@@ -1130,11 +1227,11 @@
11301227
"hide": 0,
11311228
"includeAll": false,
11321229
"multi": false,
1133-
"name": "namespace",
1230+
"name": "Namespace",
11341231
"options": [],
11351232
"query": {
11361233
"query": "label_values(namespace)",
1137-
"refId": "PrometheusVariableQueryEditor-VariableQuery"
1234+
"refId": "StandardVariableQuery"
11381235
},
11391236
"refresh": 1,
11401237
"regex": "",
@@ -1261,7 +1358,7 @@
12611358
"timezone": "browser",
12621359
"title": "Kubernetes Deployment metrics",
12631360
"uid": "wdtm7Mc7z123",
1264-
"version": 13,
1361+
"version": 1,
12651362
"weekStart": ""
12661363
}
12671364
}

0 commit comments

Comments
 (0)