Skip to content

Commit 26b84b0

Browse files
committed
Add Top $n indexes by estimated bloat size panel to prom index overview dashboard
1 parent e17a58b commit 26b84b0

File tree

1 file changed

+109
-7
lines changed

1 file changed

+109
-7
lines changed

grafana/prometheus/v12/index-overview-prometheus.json

Lines changed: 109 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,8 @@
518518
"overrides": []
519519
},
520520
"gridPos": {
521-
"h": 9,
522-
"w": 24,
521+
"h": 8,
522+
"w": 12,
523523
"x": 0,
524524
"y": 19
525525
},
@@ -554,6 +554,108 @@
554554
"title": "Top 10 indexes by estimated bloat %",
555555
"type": "timeseries"
556556
},
557+
{
558+
"datasource": {
559+
"type": "prometheus",
560+
"uid": "pgwatch-prometheus"
561+
},
562+
"description": "The top 10 indexes by estimated bloat size among the top ~100 indexes by bloat % retrieved by the `btree_bloat` metric.",
563+
"fieldConfig": {
564+
"defaults": {
565+
"color": {
566+
"mode": "palette-classic"
567+
},
568+
"custom": {
569+
"axisBorderShow": false,
570+
"axisCenteredZero": false,
571+
"axisColorMode": "text",
572+
"axisLabel": "",
573+
"axisPlacement": "auto",
574+
"barAlignment": 0,
575+
"barWidthFactor": 0.6,
576+
"drawStyle": "line",
577+
"fillOpacity": 20,
578+
"gradientMode": "none",
579+
"hideFrom": {
580+
"legend": false,
581+
"tooltip": false,
582+
"viz": false
583+
},
584+
"insertNulls": false,
585+
"lineInterpolation": "linear",
586+
"lineWidth": 1,
587+
"pointSize": 5,
588+
"scaleDistribution": {
589+
"type": "linear"
590+
},
591+
"showPoints": "never",
592+
"showValues": false,
593+
"spanNulls": true,
594+
"stacking": {
595+
"group": "A",
596+
"mode": "none"
597+
},
598+
"thresholdsStyle": {
599+
"mode": "off"
600+
}
601+
},
602+
"decimals": 2,
603+
"mappings": [],
604+
"thresholds": {
605+
"mode": "absolute",
606+
"steps": [
607+
{
608+
"color": "green",
609+
"value": 0
610+
},
611+
{
612+
"color": "red",
613+
"value": 80
614+
}
615+
]
616+
},
617+
"unit": "bytes"
618+
},
619+
"overrides": []
620+
},
621+
"gridPos": {
622+
"h": 8,
623+
"w": 12,
624+
"x": 12,
625+
"y": 19
626+
},
627+
"id": 13,
628+
"options": {
629+
"legend": {
630+
"calcs": [
631+
"lastNotNull",
632+
"max"
633+
],
634+
"displayMode": "table",
635+
"placement": "bottom",
636+
"showLegend": true,
637+
"sortBy": "Max",
638+
"sortDesc": true
639+
},
640+
"tooltip": {
641+
"hideZeros": false,
642+
"mode": "single",
643+
"sort": "none"
644+
}
645+
},
646+
"pluginVersion": "12.3.1",
647+
"targets": [
648+
{
649+
"editorMode": "code",
650+
"expr": "topk(10, pgwatch_btree_bloat_bloat_size{dbname=\"$dbname\"})",
651+
"legendFormat": "{{dbname}}: {{schemaname}}.{{tblname}}.{{idxname}}",
652+
"range": true,
653+
"refId": "A"
654+
}
655+
],
656+
"title": "Top 10 indexes by estimated bloat size",
657+
"type": "timeseries"
658+
},
557659
{
558660
"datasource": {
559661
"type": "prometheus",
@@ -600,7 +702,7 @@
600702
"h": 8,
601703
"w": 12,
602704
"x": 0,
603-
"y": 28
705+
"y": 27
604706
},
605707
"id": 8,
606708
"options": {
@@ -699,7 +801,7 @@
699801
"h": 8,
700802
"w": 12,
701803
"x": 12,
702-
"y": 28
804+
"y": 27
703805
},
704806
"id": 9,
705807
"options": {
@@ -734,7 +836,7 @@
734836
"h": 1,
735837
"w": 24,
736838
"x": 0,
737-
"y": 36
839+
"y": 35
738840
},
739841
"id": 10,
740842
"panels": [],
@@ -770,7 +872,7 @@
770872
"h": 8,
771873
"w": 24,
772874
"x": 0,
773-
"y": 37
875+
"y": 36
774876
},
775877
"id": 11,
776878
"options": {
@@ -895,5 +997,5 @@
895997
"timezone": "",
896998
"title": "Index Overview (Prometheus)",
897999
"uid": "index-overview-prometheus",
898-
"version": 4
1000+
"version": 5
8991001
}

0 commit comments

Comments
 (0)