@leverege/build-tools 2.99.1 → 2.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,943 @@
1
+ {
2
+ "annotations": {
3
+ "list": [
4
+ {
5
+ "builtIn": 1,
6
+ "datasource": {
7
+ "type": "datasource",
8
+ "uid": "grafana"
9
+ },
10
+ "enable": true,
11
+ "hide": true,
12
+ "iconColor": "rgba(0, 211, 255, 1)",
13
+ "limit": 100,
14
+ "name": "Annotations & Alerts",
15
+ "showIn": 0,
16
+ "type": "dashboard"
17
+ }
18
+ ]
19
+ },
20
+ "description": "Monitors all persistent volumes that exist within a Kubernetes cluster. Prometheus is used as datasource.",
21
+ "editable": true,
22
+ "fiscalYearStartMonth": 0,
23
+ "graphTooltip": 0,
24
+ "links": [
25
+ {
26
+ "asDropdown": false,
27
+ "icon": "doc",
28
+ "includeVars": false,
29
+ "keepTime": false,
30
+ "tags": [],
31
+ "targetBlank": true,
32
+ "title": "Storage Runbook",
33
+ "tooltip": "Open storage runbook",
34
+ "type": "link",
35
+ "url": "https://sla-runbook.leverege.com/pvc-storage"
36
+ }
37
+ ],
38
+ "panels": [
39
+ {
40
+ "collapsed": false,
41
+ "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
42
+ "id": 26,
43
+ "panels": [],
44
+ "title": "Alerts",
45
+ "type": "row"
46
+ },
47
+ {
48
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
49
+ "fieldConfig": {
50
+ "defaults": {
51
+ "color": { "mode": "thresholds" },
52
+ "decimals": 0,
53
+ "mappings": [],
54
+ "noValue": "--",
55
+ "thresholds": {
56
+ "mode": "absolute",
57
+ "steps": [
58
+ { "color": "light-green", "value": null },
59
+ { "color": "semi-dark-orange", "value": 1 }
60
+ ]
61
+ },
62
+ "unit": "none"
63
+ },
64
+ "overrides": []
65
+ },
66
+ "gridPos": { "h": 4, "w": 8, "x": 0, "y": 1 },
67
+ "id": 22,
68
+ "options": {
69
+ "colorMode": "background",
70
+ "graphMode": "area",
71
+ "justifyMode": "auto",
72
+ "orientation": "auto",
73
+ "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
74
+ "showPercentChange": false,
75
+ "textMode": "auto",
76
+ "wideLayout": true
77
+ },
78
+ "pluginVersion": "12.4.1",
79
+ "targets": [
80
+ {
81
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
82
+ "expr": "(\n count(\n (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"})\n and\n (predict_linear(kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"}[2d], 2 * 24 * 60 * 60) < 0)\n )\n)\nor vector(0)",
83
+ "instant": true,
84
+ "legendFormat": "",
85
+ "refId": "A"
86
+ }
87
+ ],
88
+ "title": "PVCs Full in 2 days",
89
+ "type": "stat"
90
+ },
91
+ {
92
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
93
+ "fieldConfig": {
94
+ "defaults": {
95
+ "color": { "mode": "thresholds" },
96
+ "decimals": 0,
97
+ "mappings": [],
98
+ "noValue": "--",
99
+ "thresholds": {
100
+ "mode": "absolute",
101
+ "steps": [
102
+ { "color": "light-green", "value": null },
103
+ { "color": "semi-dark-orange", "value": 1 }
104
+ ]
105
+ },
106
+ "unit": "none"
107
+ },
108
+ "overrides": []
109
+ },
110
+ "gridPos": { "h": 4, "w": 8, "x": 8, "y": 1 },
111
+ "id": 28,
112
+ "options": {
113
+ "colorMode": "background",
114
+ "graphMode": "area",
115
+ "justifyMode": "auto",
116
+ "orientation": "auto",
117
+ "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
118
+ "showPercentChange": false,
119
+ "textMode": "auto",
120
+ "wideLayout": true
121
+ },
122
+ "pluginVersion": "12.4.1",
123
+ "targets": [
124
+ {
125
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
126
+ "expr": "(\n count(\n (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"})\n and\n (predict_linear(kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"}[3d], 5 * 24 * 60 * 60) < 0)\n )\n)\nor vector(0)",
127
+ "instant": true,
128
+ "legendFormat": "",
129
+ "refId": "A"
130
+ }
131
+ ],
132
+ "title": "PVCs Full in 5 days",
133
+ "type": "stat"
134
+ },
135
+ {
136
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
137
+ "fieldConfig": {
138
+ "defaults": {
139
+ "color": { "mode": "thresholds" },
140
+ "decimals": 0,
141
+ "mappings": [],
142
+ "noValue": "--",
143
+ "thresholds": {
144
+ "mode": "absolute",
145
+ "steps": [
146
+ { "color": "light-green", "value": null },
147
+ { "color": "semi-dark-orange", "value": 1 }
148
+ ]
149
+ },
150
+ "unit": "none"
151
+ },
152
+ "overrides": []
153
+ },
154
+ "gridPos": { "h": 4, "w": 8, "x": 16, "y": 1 },
155
+ "id": 27,
156
+ "options": {
157
+ "colorMode": "background",
158
+ "graphMode": "area",
159
+ "justifyMode": "auto",
160
+ "orientation": "auto",
161
+ "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
162
+ "showPercentChange": false,
163
+ "textMode": "auto",
164
+ "wideLayout": true
165
+ },
166
+ "pluginVersion": "12.4.1",
167
+ "targets": [
168
+ {
169
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
170
+ "expr": "(\n count(\n (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"})\n and\n (predict_linear(kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"}[7d], 7 * 24 * 60 * 60) < 0)\n )\n)\nor vector(0)",
171
+ "instant": true,
172
+ "legendFormat": "",
173
+ "refId": "A"
174
+ }
175
+ ],
176
+ "title": "PVCs Full in 1 Week",
177
+ "type": "stat"
178
+ },
179
+ {
180
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
181
+ "fieldConfig": {
182
+ "defaults": {
183
+ "color": { "mode": "thresholds" },
184
+ "mappings": [],
185
+ "noValue": "--",
186
+ "thresholds": {
187
+ "mode": "absolute",
188
+ "steps": [
189
+ { "color": "light-green", "value": null },
190
+ { "color": "semi-dark-red", "value": 1 }
191
+ ]
192
+ },
193
+ "unit": "none"
194
+ },
195
+ "overrides": []
196
+ },
197
+ "gridPos": { "h": 4, "w": 8, "x": 0, "y": 5 },
198
+ "id": 21,
199
+ "options": {
200
+ "colorMode": "background",
201
+ "graphMode": "area",
202
+ "justifyMode": "auto",
203
+ "orientation": "auto",
204
+ "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
205
+ "showPercentChange": false,
206
+ "textMode": "auto",
207
+ "wideLayout": true
208
+ },
209
+ "pluginVersion": "12.4.1",
210
+ "targets": [
211
+ {
212
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
213
+ "expr": "count(\n (max by (persistentvolumeclaim, namespace) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}))\n /\n (max by (persistentvolumeclaim, namespace) (kubelet_volume_stats_capacity_bytes{namespace=~\"${k8s_namespace}\"}))\n * 100 >= ${warning_threshold}\n) or vector(0)",
214
+ "instant": true,
215
+ "legendFormat": "",
216
+ "refId": "A"
217
+ }
218
+ ],
219
+ "title": "PVCs Above Warning Threshold (${warning_threshold}%)",
220
+ "type": "stat"
221
+ },
222
+ {
223
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
224
+ "fieldConfig": {
225
+ "defaults": {
226
+ "color": { "mode": "thresholds" },
227
+ "decimals": 0,
228
+ "mappings": [],
229
+ "noValue": "--",
230
+ "thresholds": {
231
+ "mode": "absolute",
232
+ "steps": [
233
+ { "color": "light-green", "value": null },
234
+ { "color": "semi-dark-orange", "value": 1 }
235
+ ]
236
+ },
237
+ "unit": "none"
238
+ },
239
+ "overrides": []
240
+ },
241
+ "gridPos": { "h": 4, "w": 8, "x": 8, "y": 5 },
242
+ "id": 24,
243
+ "options": {
244
+ "colorMode": "background",
245
+ "graphMode": "area",
246
+ "justifyMode": "auto",
247
+ "orientation": "auto",
248
+ "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
249
+ "showPercentChange": false,
250
+ "textMode": "auto",
251
+ "wideLayout": true
252
+ },
253
+ "pluginVersion": "12.4.1",
254
+ "targets": [
255
+ {
256
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
257
+ "expr": "count(kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\", phase=\"Pending\"} == 1) or vector(0)",
258
+ "instant": true,
259
+ "legendFormat": "",
260
+ "refId": "A"
261
+ }
262
+ ],
263
+ "title": "PVCs in Pending State",
264
+ "type": "stat"
265
+ },
266
+ {
267
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
268
+ "fieldConfig": {
269
+ "defaults": {
270
+ "color": { "mode": "thresholds" },
271
+ "decimals": 0,
272
+ "mappings": [],
273
+ "noValue": "--",
274
+ "thresholds": {
275
+ "mode": "absolute",
276
+ "steps": [
277
+ { "color": "light-green", "value": null },
278
+ { "color": "semi-dark-red", "value": 1 }
279
+ ]
280
+ },
281
+ "unit": "none"
282
+ },
283
+ "overrides": []
284
+ },
285
+ "gridPos": { "h": 4, "w": 8, "x": 16, "y": 5 },
286
+ "id": 23,
287
+ "options": {
288
+ "colorMode": "background",
289
+ "graphMode": "area",
290
+ "justifyMode": "auto",
291
+ "orientation": "auto",
292
+ "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
293
+ "showPercentChange": false,
294
+ "textMode": "auto",
295
+ "wideLayout": true
296
+ },
297
+ "pluginVersion": "12.4.1",
298
+ "targets": [
299
+ {
300
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
301
+ "expr": "count(kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\", phase=\"Lost\"} == 1) or vector(0)",
302
+ "instant": true,
303
+ "legendFormat": "",
304
+ "refId": "A"
305
+ }
306
+ ],
307
+ "title": "PVCs in Lost State",
308
+ "type": "stat"
309
+ },
310
+ {
311
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
312
+ "fieldConfig": {
313
+ "defaults": {
314
+ "color": { "mode": "thresholds" },
315
+ "decimals": 0,
316
+ "mappings": [],
317
+ "noValue": "--",
318
+ "thresholds": {
319
+ "mode": "absolute",
320
+ "steps": [
321
+ { "color": "light-green", "value": null },
322
+ { "color": "semi-dark-orange", "value": 1 }
323
+ ]
324
+ },
325
+ "unit": "none"
326
+ },
327
+ "overrides": []
328
+ },
329
+ "gridPos": { "h": 4, "w": 8, "x": 0, "y": 9 },
330
+ "id": 30,
331
+ "options": {
332
+ "colorMode": "background",
333
+ "graphMode": "none",
334
+ "justifyMode": "auto",
335
+ "orientation": "auto",
336
+ "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
337
+ "showPercentChange": false,
338
+ "textMode": "auto",
339
+ "wideLayout": true
340
+ },
341
+ "pluginVersion": "12.4.1",
342
+ "targets": [
343
+ {
344
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
345
+ "expr": "count(\n kube_persistentvolumeclaim_info{namespace=~\"${k8s_namespace}\"}\n unless on(persistentvolumeclaim, namespace)\n kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}\n) or vector(0)",
346
+ "instant": true,
347
+ "legendFormat": "",
348
+ "refId": "A"
349
+ }
350
+ ],
351
+ "title": "PVCs with No Usage Data (Unmounted / Orphaned)",
352
+ "type": "stat"
353
+ },
354
+ {
355
+ "collapsed": false,
356
+ "gridPos": { "h": 1, "w": 24, "x": 0, "y": 13 },
357
+ "id": 17,
358
+ "panels": [],
359
+ "title": "Usage statistics",
360
+ "type": "row"
361
+ },
362
+ {
363
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
364
+ "fieldConfig": {
365
+ "defaults": {
366
+ "color": { "mode": "thresholds" },
367
+ "custom": {
368
+ "align": "auto",
369
+ "cellOptions": { "type": "auto" },
370
+ "filterable": true,
371
+ "inspect": false
372
+ },
373
+ "mappings": [],
374
+ "noValue": "--",
375
+ "thresholds": {
376
+ "mode": "absolute",
377
+ "steps": [{ "color": "light-green", "value": null }]
378
+ },
379
+ "unit": "none"
380
+ },
381
+ "overrides": [
382
+ {
383
+ "matcher": { "id": "byName", "options": "Used (%)" },
384
+ "properties": [
385
+ {
386
+ "id": "custom.cellOptions",
387
+ "value": { "mode": "gradient", "type": "gauge" }
388
+ },
389
+ {
390
+ "id": "thresholds",
391
+ "value": {
392
+ "mode": "absolute",
393
+ "steps": [
394
+ { "color": "light-green", "value": null },
395
+ { "color": "semi-dark-yellow", "value": 70 },
396
+ { "color": "dark-red", "value": 80 }
397
+ ]
398
+ }
399
+ },
400
+ { "id": "decimals", "value": 1 },
401
+ { "id": "custom.width", "value": 160 }
402
+ ]
403
+ },
404
+ {
405
+ "matcher": { "id": "byName", "options": "Status" },
406
+ "properties": [
407
+ {
408
+ "id": "custom.cellOptions",
409
+ "value": { "type": "color-background" }
410
+ },
411
+ {
412
+ "id": "mappings",
413
+ "value": [
414
+ {
415
+ "options": {
416
+ "Bound": { "color": "light-green", "index": 0 },
417
+ "Pending": { "color": "semi-dark-orange","index": 1 },
418
+ "Lost": { "color": "semi-dark-red", "index": 2 }
419
+ },
420
+ "type": "value"
421
+ }
422
+ ]
423
+ },
424
+ { "id": "custom.align", "value": "center" },
425
+ { "id": "custom.width", "value": 90 }
426
+ ]
427
+ },
428
+ {
429
+ "matcher": { "id": "byName", "options": "Namespace" },
430
+ "properties": [{ "id": "custom.width", "value": 130 }]
431
+ },
432
+ {
433
+ "matcher": { "id": "byName", "options": "Capacity (GiB)" },
434
+ "properties": [{ "id": "custom.width", "value": 120 }]
435
+ },
436
+ {
437
+ "matcher": { "id": "byName", "options": "Used (GiB)" },
438
+ "properties": [{ "id": "custom.width", "value": 110 }]
439
+ },
440
+ {
441
+ "matcher": { "id": "byName", "options": "Available (GiB)" },
442
+ "properties": [{ "id": "custom.width", "value": 120 }]
443
+ },
444
+ {
445
+ "matcher": { "id": "byName", "options": "StorageClass" },
446
+ "properties": [{ "id": "custom.width", "value": 160 }]
447
+ },
448
+ {
449
+ "matcher": { "id": "byName", "options": "PersistentVolumeClaim" },
450
+ "properties": [{ "id": "custom.width", "value": 340 }]
451
+ }
452
+ ]
453
+ },
454
+ "gridPos": { "h": 12, "w": 24, "x": 0, "y": 14 },
455
+ "id": 29,
456
+ "options": {
457
+ "cellHeight": "sm",
458
+ "frameIndex": 0,
459
+ "showHeader": true,
460
+ "sortBy": [
461
+ { "desc": true, "displayName": "Used (%)" }
462
+ ]
463
+ },
464
+ "pluginVersion": "12.4.1",
465
+ "targets": [
466
+ {
467
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
468
+ "expr": "sum by (persistentvolumeclaim, namespace, storageclass, volumename) (kube_persistentvolumeclaim_info{namespace=~\"${k8s_namespace}\"})",
469
+ "format": "table",
470
+ "instant": true,
471
+ "legendFormat": "",
472
+ "refId": "A"
473
+ },
474
+ {
475
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
476
+ "expr": "sum by (persistentvolumeclaim) (kubelet_volume_stats_capacity_bytes{namespace=~\"${k8s_namespace}\"} / 1024 / 1024 / 1024)",
477
+ "format": "table",
478
+ "instant": true,
479
+ "legendFormat": "",
480
+ "refId": "B"
481
+ },
482
+ {
483
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
484
+ "expr": "sum by (persistentvolumeclaim) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"} / 1024 / 1024 / 1024)",
485
+ "format": "table",
486
+ "instant": true,
487
+ "legendFormat": "",
488
+ "refId": "C"
489
+ },
490
+ {
491
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
492
+ "expr": "sum by (persistentvolumeclaim) (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"} / 1024 / 1024 / 1024)",
493
+ "format": "table",
494
+ "instant": true,
495
+ "legendFormat": "",
496
+ "refId": "D"
497
+ },
498
+ {
499
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
500
+ "expr": "max by (persistentvolumeclaim, namespace) (\n label_replace(kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\", phase=\"Bound\"}, \"status\", \"Bound\", \"\", \"\")\n or\n label_replace(kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\", phase=\"Pending\"}, \"status\", \"Pending\", \"\", \"\")\n or\n label_replace(kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\", phase=\"Lost\"}, \"status\", \"Lost\", \"\", \"\")\n)",
501
+ "format": "table",
502
+ "instant": true,
503
+ "legendFormat": "",
504
+ "refId": "E"
505
+ },
506
+ {
507
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
508
+ "expr": "sum by (persistentvolumeclaim) (\n kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}\n / kubelet_volume_stats_capacity_bytes{namespace=~\"${k8s_namespace}\"}\n * 100\n)",
509
+ "format": "table",
510
+ "instant": true,
511
+ "legendFormat": "",
512
+ "refId": "F"
513
+ }
514
+ ],
515
+ "title": "Persistent Volume Claims",
516
+ "transformations": [
517
+ {
518
+ "id": "seriesToColumns",
519
+ "options": { "byField": "persistentvolumeclaim" }
520
+ },
521
+ {
522
+ "id": "organize",
523
+ "options": {
524
+ "excludeByName": {
525
+ "Time": true, "Time 1": true, "Time 2": true,
526
+ "Time 3": true, "Time 4": true, "Time 5": true,
527
+ "Time 6": true, "Value #A": true, "Value #E": true,
528
+ "phase": true
529
+ },
530
+ "renameByName": {
531
+ "Value #B": "Capacity (GiB)",
532
+ "Value #C": "Used (GiB)",
533
+ "Value #D": "Available (GiB)",
534
+ "Value #F": "Used (%)",
535
+ "namespace": "Namespace",
536
+ "persistentvolumeclaim": "PersistentVolumeClaim",
537
+ "storageclass": "StorageClass",
538
+ "volumename": "PhysicalVolume",
539
+ "status": "Status"
540
+ }
541
+ }
542
+ }
543
+ ],
544
+ "type": "table"
545
+ },
546
+ {
547
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
548
+ "fieldConfig": {
549
+ "defaults": {
550
+ "custom": {
551
+ "align": "auto",
552
+ "cellOptions": { "type": "auto" },
553
+ "filterable": true,
554
+ "inspect": false
555
+ },
556
+ "mappings": [],
557
+ "thresholds": {
558
+ "mode": "absolute",
559
+ "steps": [{ "color": "green", "value": null }]
560
+ }
561
+ },
562
+ "overrides": []
563
+ },
564
+ "gridPos": { "h": 5, "w": 24, "x": 0, "y": 26 },
565
+ "id": 7,
566
+ "options": {
567
+ "cellHeight": "sm",
568
+ "showHeader": true,
569
+ "sortBy": [{ "desc": false, "displayName": "StorageClass" }]
570
+ },
571
+ "pluginVersion": "12.4.1",
572
+ "targets": [
573
+ {
574
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
575
+ "expr": "kube_storageclass_info",
576
+ "format": "table",
577
+ "legendFormat": "",
578
+ "refId": "A"
579
+ }
580
+ ],
581
+ "title": "Storage Classes",
582
+ "transformations": [
583
+ {
584
+ "id": "organize",
585
+ "options": {
586
+ "excludeByName": {
587
+ "Time": true, "Value": true, "__name__": true,
588
+ "app_kubernetes_io_instance": true, "app_kubernetes_io_name": true,
589
+ "instance": true, "job": true, "kubernetes_namespace": true,
590
+ "kubernetes_pod_name": true, "pod_template_hash": true
591
+ },
592
+ "renameByName": {
593
+ "provisioner": "Provisioner",
594
+ "reclaimPolicy": "ReclaimPolicy",
595
+ "storageclass": "StorageClass",
596
+ "volumeBindingMode": "VolumeBindingMode"
597
+ }
598
+ }
599
+ },
600
+ {
601
+ "id": "groupBy",
602
+ "options": {
603
+ "fields": {
604
+ "Provisioner": { "aggregations": [], "operation": "groupby" },
605
+ "ReclaimPolicy": { "aggregations": [], "operation": "groupby" },
606
+ "StorageClass": { "aggregations": [], "operation": "groupby" },
607
+ "VolumeBindingMode": { "aggregations": [], "operation": "groupby" }
608
+ }
609
+ }
610
+ }
611
+ ],
612
+ "type": "table"
613
+ },
614
+ {
615
+ "collapsed": false,
616
+ "gridPos": { "h": 1, "w": 24, "x": 0, "y": 31 },
617
+ "id": 15,
618
+ "panels": [],
619
+ "title": "Graphical usage data",
620
+ "type": "row"
621
+ },
622
+ {
623
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
624
+ "fieldConfig": {
625
+ "defaults": {
626
+ "color": { "mode": "palette-classic" },
627
+ "custom": {
628
+ "drawStyle": "line",
629
+ "fillOpacity": 0,
630
+ "lineWidth": 1,
631
+ "showPoints": "never",
632
+ "spanNulls": false,
633
+ "thresholdsStyle": { "mode": "line" }
634
+ },
635
+ "mappings": [],
636
+ "thresholds": {
637
+ "mode": "percentage",
638
+ "steps": [
639
+ { "color": "green", "value": null },
640
+ { "color": "semi-dark-yellow", "value": 70 },
641
+ { "color": "dark-red", "value": 80 }
642
+ ]
643
+ },
644
+ "unit": "percentunit",
645
+ "min": 0,
646
+ "max": 1
647
+ },
648
+ "overrides": []
649
+ },
650
+ "gridPos": { "h": 10, "w": 24, "x": 0, "y": 32 },
651
+ "id": 31,
652
+ "options": {
653
+ "alertThreshold": true,
654
+ "legend": {
655
+ "calcs": ["mean", "lastNotNull", "max"],
656
+ "displayMode": "table",
657
+ "placement": "right",
658
+ "showLegend": true
659
+ },
660
+ "tooltip": { "mode": "multi", "sort": "desc" }
661
+ },
662
+ "pluginVersion": "12.4.1",
663
+ "targets": [
664
+ {
665
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
666
+ "expr": "topk(${top_n},\n max by (persistentvolumeclaim, namespace) (\n kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}\n / kubelet_volume_stats_capacity_bytes{namespace=~\"${k8s_namespace}\"}\n )\n)",
667
+ "legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
668
+ "refId": "A"
669
+ }
670
+ ],
671
+ "title": "Top ${top_n} PVCs by % Capacity Used",
672
+ "type": "timeseries"
673
+ },
674
+ {
675
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
676
+ "fieldConfig": {
677
+ "defaults": {
678
+ "color": { "mode": "palette-classic" },
679
+ "custom": {
680
+ "drawStyle": "line",
681
+ "fillOpacity": 0,
682
+ "lineWidth": 1,
683
+ "showPoints": "never",
684
+ "spanNulls": false,
685
+ "thresholdsStyle": { "mode": "off" }
686
+ },
687
+ "mappings": [],
688
+ "thresholds": {
689
+ "mode": "absolute",
690
+ "steps": [
691
+ { "color": "green", "value": null },
692
+ { "color": "red", "value": 80 }
693
+ ]
694
+ },
695
+ "unit": "bytes"
696
+ },
697
+ "overrides": []
698
+ },
699
+ "gridPos": { "h": 10, "w": 24, "x": 0, "y": 42 },
700
+ "id": 9,
701
+ "options": {
702
+ "alertThreshold": true,
703
+ "legend": {
704
+ "calcs": ["mean", "lastNotNull", "max", "min"],
705
+ "displayMode": "table",
706
+ "placement": "right",
707
+ "showLegend": true
708
+ },
709
+ "tooltip": { "mode": "multi", "sort": "desc" }
710
+ },
711
+ "pluginVersion": "12.4.1",
712
+ "targets": [
713
+ {
714
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
715
+ "expr": "topk(${top_n},\n max by (persistentvolumeclaim, namespace) (\n kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}\n )\n)",
716
+ "legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
717
+ "refId": "A"
718
+ }
719
+ ],
720
+ "title": "Top ${top_n} PVCs by Used Bytes",
721
+ "type": "timeseries"
722
+ },
723
+ {
724
+ "collapsed": false,
725
+ "gridPos": { "h": 1, "w": 24, "x": 0, "y": 52 },
726
+ "id": 19,
727
+ "panels": [],
728
+ "title": "Usage Rate",
729
+ "type": "row"
730
+ },
731
+ {
732
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
733
+ "fieldConfig": {
734
+ "defaults": {
735
+ "color": { "mode": "palette-classic" },
736
+ "custom": {
737
+ "drawStyle": "line",
738
+ "fillOpacity": 0,
739
+ "lineWidth": 1,
740
+ "showPoints": "never",
741
+ "spanNulls": false,
742
+ "thresholdsStyle": { "mode": "off" }
743
+ },
744
+ "mappings": [],
745
+ "thresholds": {
746
+ "mode": "absolute",
747
+ "steps": [{ "color": "green", "value": null }]
748
+ },
749
+ "unit": "binBps"
750
+ },
751
+ "overrides": []
752
+ },
753
+ "gridPos": { "h": 7, "w": 24, "x": 0, "y": 53 },
754
+ "id": 11,
755
+ "options": {
756
+ "alertThreshold": true,
757
+ "legend": {
758
+ "calcs": ["mean"],
759
+ "displayMode": "table",
760
+ "placement": "right",
761
+ "showLegend": true
762
+ },
763
+ "tooltip": { "mode": "multi", "sort": "desc" }
764
+ },
765
+ "pluginVersion": "12.4.1",
766
+ "targets": [
767
+ {
768
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
769
+ "expr": "rate(kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}[1h])",
770
+ "legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
771
+ "refId": "A"
772
+ }
773
+ ],
774
+ "title": "Hourly Volume Usage Rate",
775
+ "type": "timeseries"
776
+ },
777
+ {
778
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
779
+ "fieldConfig": {
780
+ "defaults": {
781
+ "color": { "mode": "palette-classic" },
782
+ "custom": {
783
+ "drawStyle": "line",
784
+ "fillOpacity": 0,
785
+ "lineWidth": 1,
786
+ "showPoints": "never",
787
+ "spanNulls": false,
788
+ "thresholdsStyle": { "mode": "off" }
789
+ },
790
+ "mappings": [],
791
+ "thresholds": {
792
+ "mode": "absolute",
793
+ "steps": [{ "color": "green", "value": null }]
794
+ },
795
+ "unit": "binBps"
796
+ },
797
+ "overrides": []
798
+ },
799
+ "gridPos": { "h": 7, "w": 24, "x": 0, "y": 60 },
800
+ "id": 12,
801
+ "options": {
802
+ "alertThreshold": true,
803
+ "legend": {
804
+ "calcs": ["mean"],
805
+ "displayMode": "table",
806
+ "placement": "right",
807
+ "showLegend": true
808
+ },
809
+ "tooltip": { "mode": "multi", "sort": "desc" }
810
+ },
811
+ "pluginVersion": "12.4.1",
812
+ "targets": [
813
+ {
814
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
815
+ "expr": "rate(kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}[1d])",
816
+ "legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
817
+ "refId": "A"
818
+ }
819
+ ],
820
+ "title": "Daily Volume Usage Rate",
821
+ "type": "timeseries"
822
+ },
823
+ {
824
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
825
+ "fieldConfig": {
826
+ "defaults": {
827
+ "color": { "mode": "palette-classic" },
828
+ "custom": {
829
+ "drawStyle": "line",
830
+ "fillOpacity": 0,
831
+ "lineWidth": 1,
832
+ "showPoints": "never",
833
+ "spanNulls": false,
834
+ "thresholdsStyle": { "mode": "off" }
835
+ },
836
+ "mappings": [],
837
+ "thresholds": {
838
+ "mode": "absolute",
839
+ "steps": [{ "color": "green", "value": null }]
840
+ },
841
+ "unit": "binBps"
842
+ },
843
+ "overrides": []
844
+ },
845
+ "gridPos": { "h": 7, "w": 24, "x": 0, "y": 67 },
846
+ "id": 13,
847
+ "options": {
848
+ "alertThreshold": true,
849
+ "legend": {
850
+ "calcs": ["mean"],
851
+ "displayMode": "table",
852
+ "placement": "right",
853
+ "showLegend": true
854
+ },
855
+ "tooltip": { "mode": "multi", "sort": "desc" }
856
+ },
857
+ "pluginVersion": "12.4.1",
858
+ "targets": [
859
+ {
860
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
861
+ "expr": "rate(kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}[1w])",
862
+ "legendFormat": "{{namespace}} / {{persistentvolumeclaim}}",
863
+ "refId": "A"
864
+ }
865
+ ],
866
+ "title": "Weekly Volume Usage Rate",
867
+ "type": "timeseries"
868
+ }
869
+ ],
870
+ "preload": false,
871
+ "refresh": "1m",
872
+ "schemaVersion": 42,
873
+ "tags": ["kubernetes", "storage", "pvc", "prometheus"],
874
+ "templating": {
875
+ "list": [
876
+ {
877
+ "current": {},
878
+ "includeAll": false,
879
+ "label": "Datasource",
880
+ "name": "datasource",
881
+ "options": [],
882
+ "query": "prometheus",
883
+ "refresh": 1,
884
+ "regex": "",
885
+ "type": "datasource"
886
+ },
887
+ {
888
+ "allValue": ".*",
889
+ "current": {
890
+ "text": ["All"],
891
+ "value": ["$__all"]
892
+ },
893
+ "datasource": { "type": "prometheus", "uid": "${datasource}" },
894
+ "definition": "label_values(kube_persistentvolumeclaim_info, namespace)",
895
+ "includeAll": true,
896
+ "label": "Namespace",
897
+ "multi": true,
898
+ "name": "k8s_namespace",
899
+ "options": [],
900
+ "query": "label_values(kube_persistentvolumeclaim_info, namespace)",
901
+ "refresh": 2,
902
+ "regex": "",
903
+ "sort": 1,
904
+ "type": "query"
905
+ },
906
+ {
907
+ "current": { "text": "80", "value": "80" },
908
+ "hide": 0,
909
+ "label": "Warning Threshold (%)",
910
+ "name": "warning_threshold",
911
+ "options": [
912
+ { "selected": false, "text": "60", "value": "60" },
913
+ { "selected": false, "text": "70", "value": "70" },
914
+ { "selected": true, "text": "80", "value": "80" },
915
+ { "selected": false, "text": "90", "value": "90" }
916
+ ],
917
+ "query": "60,70,80,90",
918
+ "type": "custom"
919
+ },
920
+ {
921
+ "current": { "text": "10", "value": "10" },
922
+ "hide": 0,
923
+ "label": "Top N PVCs",
924
+ "name": "top_n",
925
+ "options": [
926
+ { "selected": false, "text": "5", "value": "5" },
927
+ { "selected": true, "text": "10", "value": "10" },
928
+ { "selected": false, "text": "20", "value": "20" },
929
+ { "selected": false, "text": "50", "value": "50" }
930
+ ],
931
+ "query": "5,10,20,50",
932
+ "type": "custom"
933
+ }
934
+ ]
935
+ },
936
+ "time": { "from": "now-24h", "to": "now" },
937
+ "timepicker": {},
938
+ "timezone": "browser",
939
+ "title": "PVC k8s - All Volumes V2",
940
+ "uid": "peR80gTGk",
941
+ "version": 2,
942
+ "weekStart": ""
943
+ }