-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathkube_pod.yaml
463 lines (463 loc) · 12 KB
/
kube_pod.yaml
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
rows:
panels:
- datasource:
uid: q5KtSq17z
fieldConfig:
defaults:
custom:
pointSize: 2
overrides:
- matcher:
id: byRegexp
options: /^Limit/
properties:
- id: color
value:
fixedColor: '#FF0000'
mode: fixed
- id: custom.hideFrom
value:
legend: true
tooltip: true
viz: false
- id: custom.pointSize
value: 0
- id: custom.spanNulls
value: true
- matcher:
id: byRegexp
options: /^Request/
properties:
- id: color
value:
fixedColor: '#00FF04'
mode: fixed
- id: custom.hideFrom
value:
legend: true
tooltip: true
viz: false
- id: custom.pointSize
value: 0
- id: custom.spanNulls
value: true
gridPos:
h: 8
w: 8
x: 0
y: 0
options:
legend:
calcs:
- lastNotNull
displayMode: table
placement: bottom
sortBy: Last *
sortDesc: true
tooltip:
mode: multi
sort: desc
targets:
- expr: sum by (pod, container) (irate(container_cpu_usage_seconds_total{dh_cluster="$dh_cluster",
namespace="$namespace", container!="POD", container!="", pod=~".*$app.*"}[$__rate_interval]))
legendFormat: '{{container}} in {{pod}}'
- expr: min by (container) (kube_pod_container_resource_limits{dh_cluster="$dh_cluster",
namespace="$namespace", resource="cpu", unit="core", pod=~".*$app.*"})
legendFormat: 'Limit: {{ container }}'
- expr: min by (container) (kube_pod_container_resource_requests{dh_cluster="$dh_cluster",
namespace="$namespace", resource="cpu", unit="core", pod=~".*$app.*"})
legendFormat: 'Request: {{ container }}'
title: CPU Usage
type: timeseries
- datasource:
uid: q5KtSq17z
fieldConfig:
defaults:
custom:
pointSize: 2
decimals: 2
max: 1
min: 0
unit: percentunit
gridPos:
h: 8
w: 8
x: 8
y: 0
options:
legend:
calcs:
- lastNotNull
displayMode: table
placement: bottom
sortBy: Last *
sortDesc: true
tooltip:
mode: multi
sort: desc
targets:
- expr: avg by (pod, container) (container_memory_working_set_bytes{dh_cluster="$dh_cluster",
namespace="$namespace", container!="POD", container!="", pod=~".*$app.*"})
/ avg by (pod, container) (container_spec_memory_limit_bytes{dh_cluster="$dh_cluster",
namespace="$namespace", container!="POD", container!="", pod=~".*$app.*"})
legendFormat: '{{container}} in {{pod}}'
title: Memory Limit Usage
type: timeseries
- datasource:
uid: q5KtSq17z
fieldConfig:
defaults:
custom:
pointSize: 2
unit: Bps
gridPos:
h: 8
w: 8
x: 16
y: 0
options:
legend:
calcs:
- lastNotNull
displayMode: table
placement: bottom
sortBy: Last *
sortDesc: true
tooltip:
mode: multi
sort: desc
targets:
- expr: sum by (pod) (irate(container_fs_writes_bytes_total{dh_cluster="$dh_cluster",
namespace="$namespace", container!="POD", container!="", pod=~".*$app.*"}[$__rate_interval]))
legendFormat: '{{ pod }} disk write'
- expr: -sum by (pod) (irate(container_fs_reads_bytes_total{dh_cluster="$dh_cluster",
namespace="$namespace", container!="POD", container!="", pod=~".*$app.*"}[$__rate_interval]))
legendFormat: '{{ pod }} disk read'
title: Disk IO
type: timeseries
- datasource:
uid: q5KtSq17z
fieldConfig:
defaults:
custom:
fillOpacity: 10
pointSize: 2
gridPos:
h: 8
w: 8
x: 0
y: 1
options:
legend:
calcs:
- lastNotNull
displayMode: table
placement: bottom
sortBy: Last *
sortDesc: true
tooltip:
mode: multi
sort: desc
targets:
- expr: sum by (pod) (delta(kube_pod_container_status_restarts_total{dh_cluster="$dh_cluster",
namespace="$namespace", pod=~".*$app.*"}[$__rate_interval]))
legendFormat: '{{ pod }}'
title: Pod Restarts
type: timeseries
- datasource:
uid: q5KtSq17z
fieldConfig:
defaults:
custom:
pointSize: 2
unit: Bps
gridPos:
h: 8
w: 8
x: 8
y: 1
options:
legend:
calcs:
- lastNotNull
displayMode: table
placement: bottom
sortBy: Last *
sortDesc: true
tooltip:
mode: multi
sort: desc
targets:
- expr: sum by (pod) (irate(container_network_receive_bytes_total{dh_cluster="$dh_cluster",
namespace="$namespace", pod=~".*$app.*"}[$__rate_interval]))
legendFormat: '{{pod}} network recv bytes'
- expr: -sum by (pod) (irate(container_network_transmit_bytes_total{dh_cluster="$dh_cluster",
namespace="$namespace", pod=~".*$app.*"}[$__rate_interval]))
legendFormat: '{{pod}} network sent bytes'
title: Network IO
type: timeseries
- datasource:
uid: q5KtSq17z
fieldConfig:
defaults:
custom:
axisLabel: CPU
pointSize: 2
min: 0
unit: percentunit
overrides:
- matcher:
id: byName
options: CPU request usage
properties:
- id: color
value:
fixedColor: '#C334EB'
mode: fixed
- matcher:
id: byName
options: Pods running
properties:
- id: color
value:
fixedColor: '#34EB4F'
mode: fixed
- id: custom.axisLabel
value: Pods
- id: unit
value: short
- id: min
value: 0
- matcher:
id: byName
options: HPA max replicas
properties:
- id: color
value:
fixedColor: rgba(112, 112, 112, 0.26)
mode: fixed
- id: custom.hideFrom
value:
legend: true
tooltip: true
viz: false
- id: custom.pointSize
value: 0
- id: custom.fillBelowTo
value: HPA min replicas
- id: custom.axisLabel
value: Pods
- id: unit
value: short
- id: min
value: 0
- matcher:
id: byName
options: HPA min replicas
properties:
- id: color
value:
fixedColor: rgba(112, 112, 112, 0.26)
mode: fixed
- id: custom.hideFrom
value:
legend: true
tooltip: true
viz: false
- id: custom.pointSize
value: 0
- id: custom.axisLabel
value: Pods
- id: unit
value: short
- id: min
value: 0
- matcher:
id: byName
options: HPA threshold
properties:
- id: color
value:
fixedColor: '#F2495C'
mode: fixed
- id: custom.lineStyle
value:
dash:
- 2
- 2
fill: dash
gridPos:
h: 8
w: 8
x: 16
y: 1
options:
legend:
calcs:
- lastNotNull
displayMode: table
placement: bottom
sortBy: Last *
sortDesc: true
tooltip:
mode: multi
sort: desc
targets:
- expr: kube_hpa_spec_target_metric{dh_cluster="$dh_cluster", hpa=~".*$app.*"}
legendFormat: HPA target
- expr: kube_hpa_spec_min_replicas{dh_cluster="$dh_cluster", hpa=~".*$app.*"}
legendFormat: HPA min replicas
- expr: kube_hpa_spec_max_replicas{dh_cluster="$dh_cluster", hpa=~".*$app.*"}
legendFormat: HPA max replicas
- expr: sum by (pod, namespace) (irate(container_cpu_usage_seconds_total{dh_cluster="$dh_cluster",
namespace="$namespace", pod=~".*$app.*"}[$__rate_interval])) / sum by (pod,
namespace) (kube_pod_container_resource_requests {dh_cluster="$dh_cluster",
namespace="$namespace", resource="cpu", unit="core", pod=~".*$app.*"})
legendFormat: CPU request usage - {{ pod }}
- expr: sum(kube_pod_status_phase{dh_cluster="$dh_cluster", namespace="$namespace",
pod=~".*$app.*", phase="Running"} > 0)
legendFormat: Pods running
title: HPA Status
type: timeseries
- datasource:
uid: q5KtSq17z
fieldConfig:
defaults:
custom:
fillOpacity: 10
pointSize: 2
min: 0
unit: short
gridPos:
h: 8
w: 8
x: 0
y: 2
options:
legend:
calcs:
- lastNotNull
displayMode: table
placement: bottom
sortBy: Last *
sortDesc: true
tooltip:
mode: multi
sort: desc
targets:
- expr: sum by (pod) (irate(container_network_transmit_errors_total{dh_cluster="$dh_cluster",
namespace="$namespace", pod=~".*$app.*"}[$__rate_interval]))
legendFormat: '{{pod}}'
title: Network Transmit Errors
type: timeseries
- datasource:
uid: q5KtSq17z
fieldConfig:
defaults:
custom:
fillOpacity: 10
pointSize: 2
unit: dtdurations
gridPos:
h: 8
w: 8
x: 8
y: 2
options:
legend:
calcs:
- lastNotNull
displayMode: table
placement: bottom
sortBy: Last *
sortDesc: true
tooltip:
mode: multi
sort: desc
targets:
- expr: sum by (pod, container) (rate(container_cpu_cfs_throttled_seconds_total{dh_cluster="$dh_cluster",
namespace="$namespace", container!="POD", container!="", pod=~".*$app.*"}[$__rate_interval]))
legendFormat: '{{pod}} - {{container}}'
title: CPU Throttle Seconds
type: timeseries
- datasource:
uid: q5KtSq17z
fieldConfig:
defaults:
custom:
fillOpacity: 10
pointSize: 2
overrides:
- matcher:
id: byRegexp
options: /true|false/
properties:
- id: custom.hideFrom
value:
legend: true
tooltip: false
viz: false
- matcher:
id: byName
options: 'true'
properties:
- id: color
value:
fixedColor: green
mode: fixed
- matcher:
id: byName
options: 'false'
properties:
- id: color
value:
fixedColor: red
mode: fixed
- matcher:
id: byRegexp
options: /^Not ready/
properties:
- id: custom.drawStyle
value: line
- id: custom.hideFrom
value:
legend: false
tooltip: true
viz: false
- id: custom.pointSize
value: 0
- id: custom.stacking
value:
mode: none
- id: custom.fillOpacity
value: 0
- id: custom.lineWidth
value: 0
gridPos:
h: 8
w: 8
x: 16
y: 2
options:
legend:
calcs: []
displayMode: table
placement: bottom
sortDesc: true
tooltip:
mode: multi
sort: desc
targets:
- expr: sum by (condition) (kube_pod_status_ready{dh_cluster="$dh_cluster", namespace="$namespace",
pod=~".*$app.*", condition="true"})
legendFormat: '{{ condition }}'
- expr: sum by (condition) (kube_pod_status_ready{dh_cluster="$dh_cluster", namespace="$namespace",
pod=~".*$app.*", condition="false"})
legendFormat: '{{ condition }}'
- expr: kube_pod_status_ready{dh_cluster="$dh_cluster", namespace="$namespace",
pod=~".*$app.*", condition="false"} > 0
legendFormat: 'Not ready: {{ pod }}'
title: Pod Ready
type: timeseries
title: Kubernetes Pod
type: row