Skip to content

Commit 25fa9d0

Browse files
aggregator dashboard (#3462) (#3463)
Co-authored-by: Jesse Goodier <31039225+jessegoodier@users.noreply.github.com>
1 parent 4926756 commit 25fa9d0

File tree

1 file changed

+134
-39
lines changed

1 file changed

+134
-39
lines changed

cost-analyzer/grafana-dashboards/workload-metrics-aggregator.json

Lines changed: 134 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"editable": true,
2020
"fiscalYearStartMonth": 0,
2121
"graphTooltip": 0,
22-
"id": 15,
22+
"id": 7,
2323
"links": [],
2424
"liveNow": false,
2525
"panels": [
@@ -110,7 +110,7 @@
110110
"uid": "${datasource}"
111111
},
112112
"editorMode": "code",
113-
"expr": "topk(5,sum(container_memory_working_set_bytes{container=~\"$container\",pod=~\".+-aggregator-0\",container!=\"\",namespace=~\"$namespace\"} ) by (namespace,pod,container))",
113+
"expr": "topk(5,sum(container_memory_working_set_bytes{container=\"aggregator\",namespace=~\"$namespace\"} ) by (namespace,pod,container))",
114114
"instant": false,
115115
"legendFormat": "{{namespace}}/{{container}}",
116116
"range": true,
@@ -207,7 +207,7 @@
207207
"uid": "${datasource}"
208208
},
209209
"editorMode": "code",
210-
"expr": "topk(5, (\r\n sum(rate(container_cpu_usage_seconds_total{image!=\"\",namespace=~\"$namespace\",pod=~\".+-aggregator-0\",container=~\"$container\"}[10m])) by (namespace,pod,container)\r\n )\r\n)",
210+
"expr": "topk(5, (\r\n sum(rate(container_cpu_usage_seconds_total{image!=\"\",namespace=~\"$namespace\",container=\"aggregator\"}[$__rate_interval])) by (namespace,pod,container)\r\n )\r\n)",
211211
"instant": false,
212212
"legendFormat": "{{namespace}}/{{container}}",
213213
"range": true,
@@ -424,7 +424,7 @@
424424
"uid": "${datasource}"
425425
},
426426
"editorMode": "code",
427-
"expr": "sum(topk(5,rate(container_network_receive_bytes_total{pod=~\".+-aggregator-0\",namespace=~\"$namespace\"}[$__rate_interval]))) by (namespace,pod) ",
427+
"expr": "sum(topk(5,rate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval]))) by (namespace,pod) ",
428428
"hide": false,
429429
"instant": false,
430430
"legendFormat": "{{namespace}}/{{pod}}",
@@ -437,12 +437,25 @@
437437
"uid": "${datasource}"
438438
},
439439
"editorMode": "code",
440-
"expr": "-sum(topk(5,rate(container_network_transmit_bytes_total{pod=~\".+-aggregator-0\",namespace=~\"$namespace\"}[$__rate_interval]))) by (namespace,pod) ",
440+
"expr": "-sum(topk(5,rate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval]))) by (namespace,pod) ",
441441
"hide": false,
442442
"instant": false,
443443
"legendFormat": "{{namespace}}/{{pod}}",
444444
"range": true,
445445
"refId": "transmit"
446+
},
447+
{
448+
"datasource": {
449+
"type": "prometheus",
450+
"uid": "${datasource}"
451+
},
452+
"editorMode": "code",
453+
"expr": "container_network_transmit_bytes_total{}",
454+
"hide": false,
455+
"instant": false,
456+
"legendFormat": "__auto",
457+
"range": true,
458+
"refId": "A"
446459
}
447460
],
448461
"title": "Top Network (transmit is negative)",
@@ -535,7 +548,7 @@
535548
"uid": "${datasource}"
536549
},
537550
"editorMode": "code",
538-
"expr": "\n sum(rate(container_fs_writes_bytes_total\n {pod=~\".+-aggregator-0\",namespace=~\"$namespace\",image!=\"\"}\n [$__rate_interval]))\n by (namespace,pod,container)\n>0 ",
551+
"expr": "\n sum(rate(container_fs_writes_bytes_total\n {container=\"aggregator\",namespace=~\"$namespace\",image!=\"\"}\n [$__rate_interval]))\n by (namespace,pod,container)\n>0 ",
539552
"hide": false,
540553
"instant": false,
541554
"legendFormat": "{{namespace}}/{{container}}",
@@ -548,7 +561,7 @@
548561
"uid": "${datasource}"
549562
},
550563
"editorMode": "code",
551-
"expr": "-(sum\r\n (rate(container_fs_reads_bytes_total\r\n {pod=~\".+-aggregator-0\",namespace=~\"$namespace\",image!=\"\"}\r\n [$__rate_interval])) \r\nby (namespace,pod,container) \r\n) <0",
564+
"expr": "-(sum\r\n (rate(container_fs_reads_bytes_total\r\n {container=\"aggregator\",namespace=~\"$namespace\",image!=\"\"}\r\n [$__rate_interval])) \r\nby (namespace,pod,container) \r\n) <0",
552565
"hide": false,
553566
"instant": false,
554567
"legendFormat": "{{namespace}}/{{container}}",
@@ -660,7 +673,7 @@
660673
},
661674
"editorMode": "code",
662675
"expr": "sum(kube_persistentvolume_capacity_bytes) by (persistentvolume)",
663-
"hide": true,
676+
"hide": false,
664677
"instant": false,
665678
"legendFormat": "__auto",
666679
"range": true,
@@ -768,6 +781,115 @@
768781
],
769782
"title": "Pod restarts per hour",
770783
"type": "timeseries"
784+
},
785+
{
786+
"datasource": {
787+
"type": "prometheus",
788+
"uid": "${datasource}"
789+
},
790+
"fieldConfig": {
791+
"defaults": {
792+
"color": {
793+
"mode": "palette-classic"
794+
},
795+
"custom": {
796+
"axisBorderShow": false,
797+
"axisCenteredZero": false,
798+
"axisColorMode": "text",
799+
"axisLabel": "",
800+
"axisPlacement": "auto",
801+
"barAlignment": 0,
802+
"drawStyle": "line",
803+
"fillOpacity": 0,
804+
"gradientMode": "none",
805+
"hideFrom": {
806+
"legend": false,
807+
"tooltip": false,
808+
"viz": false
809+
},
810+
"insertNulls": false,
811+
"lineInterpolation": "linear",
812+
"lineWidth": 1,
813+
"pointSize": 5,
814+
"scaleDistribution": {
815+
"type": "linear"
816+
},
817+
"showPoints": "auto",
818+
"spanNulls": false,
819+
"stacking": {
820+
"group": "A",
821+
"mode": "none"
822+
},
823+
"thresholdsStyle": {
824+
"mode": "off"
825+
}
826+
},
827+
"mappings": [],
828+
"thresholds": {
829+
"mode": "absolute",
830+
"steps": [
831+
{
832+
"color": "green",
833+
"value": null
834+
},
835+
{
836+
"color": "red",
837+
"value": 80
838+
}
839+
]
840+
},
841+
"unit": "bytes"
842+
},
843+
"overrides": []
844+
},
845+
"gridPos": {
846+
"h": 8,
847+
"w": 12,
848+
"x": 12,
849+
"y": 24
850+
},
851+
"id": 11,
852+
"options": {
853+
"legend": {
854+
"calcs": [],
855+
"displayMode": "list",
856+
"placement": "bottom",
857+
"showLegend": true
858+
},
859+
"tooltip": {
860+
"mode": "single",
861+
"sort": "none"
862+
}
863+
},
864+
"targets": [
865+
{
866+
"datasource": {
867+
"type": "prometheus",
868+
"uid": "PBFA97CFB590B2093"
869+
},
870+
"editorMode": "code",
871+
"expr": "kubecost_read_db_size",
872+
"instant": false,
873+
"legendFormat": "__auto",
874+
"range": true,
875+
"refId": "kubecost_read_db_size"
876+
},
877+
{
878+
"datasource": {
879+
"type": "prometheus",
880+
"uid": "${datasource}"
881+
},
882+
"editorMode": "code",
883+
"expr": "sum(kubecost_write_db_size)",
884+
"hide": false,
885+
"instant": false,
886+
"legendFormat": "__auto",
887+
"range": true,
888+
"refId": "kubecost_write_db_size"
889+
}
890+
],
891+
"title": "Aggregator DB Size",
892+
"type": "timeseries"
771893
}
772894
],
773895
"refresh": "5s",
@@ -799,9 +921,9 @@
799921
},
800922
{
801923
"current": {
802-
"selected": false,
803-
"text": "aggregator",
804-
"value": "aggregator"
924+
"selected": true,
925+
"text": "kubecost",
926+
"value": "kubecost"
805927
},
806928
"datasource": {
807929
"type": "prometheus",
@@ -850,38 +972,11 @@
850972
"skipUrlSync": false,
851973
"sort": 5,
852974
"type": "query"
853-
},
854-
{
855-
"current": {
856-
"selected": false,
857-
"text": "All",
858-
"value": "$__all"
859-
},
860-
"datasource": {
861-
"type": "prometheus",
862-
"uid": "PBFA97CFB590B2093"
863-
},
864-
"definition": "label_values({namespace=~\"$namespace\", pod=~\".+-aggregator-0\"},container)",
865-
"hide": 0,
866-
"includeAll": true,
867-
"multi": false,
868-
"name": "container",
869-
"options": [],
870-
"query": {
871-
"qryType": 1,
872-
"query": "label_values({namespace=~\"$namespace\", pod=~\".+-aggregator-0\"},container)",
873-
"refId": "PrometheusVariableQueryEditor-VariableQuery"
874-
},
875-
"refresh": 1,
876-
"regex": "",
877-
"skipUrlSync": false,
878-
"sort": 5,
879-
"type": "query"
880975
}
881976
]
882977
},
883978
"time": {
884-
"from": "now-6h",
979+
"from": "now-3h",
885980
"to": "now"
886981
},
887982
"timepicker": {},

0 commit comments

Comments
 (0)