-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathstrimzi-kafka-test.yml
198 lines (193 loc) · 6.19 KB
/
strimzi-kafka-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
dashboard:
name: Kafka cluster
description: Staging Kafka dashboard
layout:
splitMode: row
fullScreen: true
header:
enable: false
size: 3
ratio: 1
body:
boxes:
left:
enable: true
size: 200
ratio: 1
split_mode: column
split:
left_a:
size: 25
ratio: 1
left_b:
size: 25
ratio: 1
left_c:
size: 0
ratio: 1
middle:
enable: false
size: 0
ratio: 1
split_mode: column
split:
middle_a:
size: 0
ratio: 1
middle_b:
size: 0
ratio: 1
middle_c:
size: 0
ratio: 1
right:
enable: true
size: 0
ratio: 1
split_mode: column
split:
right_a:
size: 0
ratio: 1
right_b:
size: 0
ratio: 1
variables:
- name: topic
default: .*
cliArgument:
enable: true
short: -t
required: false
description: "Kafka Topic Name"
- name: namespace
default: default
cliArgument:
enable: true
short: -n
required: false
- name: pod
default: .*
cliArgument:
enable: true
short: -po
required: false
visualization:
- name: Kafka Data In per second.
box: right_a
enable: true
type: asciiGraph
metricUnit: kb
asciiGraphMetric: >
sort_desc(sum(irate(kafka_server_brokertopicmetrics_bytesin_total{topic=~"$topic"}[5m])) by (strimzi_io_cluster, topic)) / 1024
customKey: "🍅 {{topic}}"
asciiGraphOptions:
height: 0
width: 80
maxHeight: 17
maxWidth: 45
updateIntervalSeconds: 2
- name: Kafka Data Out per second.
enable: true
box: right_b
type: asciiGraph
metricUnit: kb
asciiGraphMetric: >
sort_desc(sum(irate(kafka_server_brokertopicmetrics_bytesout_total{topic=~"$topic"}[5m])) by (strimzi_io_cluster, topic)) / 1024
customKey: "🥕 {{topic}}"
asciiGraphOptions:
height: 0
width: 80
maxHeight: 17
maxWidth: 45
updateIntervalSeconds: 2
- name: Kafka pods memory usage (Sorted by higher memory usage)
enable: true
box: left_a
type: progressBarList
metricUnit: mb
progressBarListMetrics:
totalValueMetric: |
# Memory limits
sum(container_spec_memory_limit_bytes{namespace=~"$namespace", pod=~"$pod"}) by (pod, topology_ebs_csi_aws_com_zone)
usageValueMetric: |
# memory usage sorted by higher usage
sort_desc(sum(container_memory_usage_bytes{namespace=~"$namespace", pod=~"$pod"}) by (pod, topology_ebs_csi_aws_com_zone))
customKey: "{{pod}}"
progressBarListOptions:
maxItemsCount: 10
lineBreak: true
showBarPercentage: true
barWidth: 25
updateIntervalSeconds: 5
- name: Kafka Pods memory usage (simpleTable example)
enable: true
box: left_b
type: simpleTable
metricUnit: byte
simpleTableMetric: |
sum(container_memory_usage_bytes{namespace=~"$namespace", pod=~"$pod"}) by (pod, namespace, karpenter_sh_capacity_type, topology_kubernetes_io_zone,node_kubernetes_io_instance_type)
customKey: "{{pod}}"
simpleTableOptions:
tableType: plain # https://github.com/astanin/python-tabulate?tab=readme-ov-file#table-format
showValue: true
headersUppercase: true
autoConvertValue: true
showTableIndex: true
updateIntervalSeconds: 5
- name: Kafka pods details (advancedTable example)
enable: true
box: left_c
type: advancedTable
advancedTableColumns:
- memory usage:
metric: |
sort_desc(sum(container_memory_usage_bytes{namespace=~"$namespace", pod=~"$pod"}) by (pod, topology_ebs_csi_aws_com_zone))
metricUnit: byte
autoConvertValue: true
- memory usage %:
metric: |
sort_desc(
(
sum(container_memory_usage_bytes{namespace=~"$namespace", pod=~"$pod"}) by (pod, topology_ebs_csi_aws_com_zone)
/
sum(container_spec_memory_limit_bytes{namespace=~"$namespace", pod=~"$pod"}) by (pod, topology_ebs_csi_aws_com_zone)
) * 100
)
metricUnit: percentage
autoConvertValue: true
- memory limit:
metric: |
sort_desc(sum(container_spec_memory_limit_bytes{namespace=~"$namespace", pod=~"$pod"}) by (pod, topology_ebs_csi_aws_com_zone))
metricUnit: byte
autoConvertValue: true
- memory cache:
metric: |
sort_desc(sum(container_memory_cache{namespace=~"$namespace", pod=~"$pod"}) by (pod, topology_ebs_csi_aws_com_zone))
metricUnit: byte
autoConvertValue: true
- memory swap:
metric: |
sum(container_memory_swap{namespace=~"$namespace", pod=~"$pod"}) by (pod, topology_ebs_csi_aws_com_zone)
metricUnit: byte
autoConvertValue: true
# - file descriptors:
# metric: |
# sort_desc(sum(container_file_descriptors{namespace=~"$namespace", pod=~"$pod"}) by (pod, topology_ebs_csi_aws_com_zone))
# metricUnit: None
- up time:
metric: |
sum(time() - kube_pod_start_time{namespace=~"$namespace", pod=~"$pod"}) by (pod)
metricUnit: seconds
autoConvertValue: true
- AWS AZ:
metric: |
sort_desc(sum(container_memory_usage_bytes{namespace=~"$namespace", pod=~"$pod"}) by (pod, topology_ebs_csi_aws_com_zone))
metricUnit: byte
valueFromLabel: topology_ebs_csi_aws_com_zone
customKey: "{{pod}}"
advancedTableOptions:
tableType: grid # https://github.com/astanin/python-tabulate?tab=readme-ov-file#table-format
headersUppercase: true
showTableIndex: true
updateIntervalSeconds: 3