Skip to content

Commit b9e4aeb

Browse files
author
Dementii Priadko
committed
Merge branch 'dashboard-unification-issue-73' into 'main'
feat(dashboards): unify panel titles and units across Grafana dashboards Closes #73 See merge request postgres-ai/postgres_ai!131
2 parents cd793b6 + 451afb3 commit b9e4aeb

5 files changed

Lines changed: 84 additions & 56 deletions

File tree

config/grafana/dashboards/Dashboard_10_Index health.json

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -500,39 +500,6 @@
500500
],
501501
"title": "Top $top_n indexes by tuples read",
502502
"type": "timeseries"
503-
},
504-
"options": {
505-
"legend": {
506-
"calcs": [
507-
"min",
508-
"max",
509-
"mean"
510-
],
511-
"displayMode": "table",
512-
"placement": "bottom",
513-
"showLegend": true,
514-
"sortBy": "Max",
515-
"sortDesc": true
516-
},
517-
"tooltip": {
518-
"hideZeros": false,
519-
"mode": "multi",
520-
"sort": "desc"
521-
}
522-
},
523-
"pluginVersion": "12.0.2",
524-
"targets": [
525-
{
526-
"editorMode": "code",
527-
"expr": "topk($top_n, irate(pgwatch_pg_stat_all_indexes_idx_tup_read{cluster='$cluster_name', node_name='$node_name', datname=\"$db_name\"}[$__rate_interval]))",
528-
"interval": "20",
529-
"legendFormat": "{{schemaname}}.{{relname}}.{{indexrelname}}",
530-
"range": true,
531-
"refId": "A"
532-
}
533-
],
534-
"title": "Top $top_n indexes by tuples read",
535-
"type": "timeseries"
536503
},
537504
{
538505
"datasource": {
@@ -705,7 +672,7 @@
705672
}
706673
]
707674
},
708-
"unit": "Bps"
675+
"unit": "binBps"
709676
},
710677
"overrides": []
711678
},
@@ -746,7 +713,7 @@
746713
"refId": "A"
747714
}
748715
],
749-
"title": "Top $top_n indexes by reads (bytes)",
716+
"title": "Top $top_n indexes by block reads",
750717
"type": "timeseries"
751718
},
752719
{
@@ -806,7 +773,7 @@
806773
}
807774
]
808775
},
809-
"unit": "Bps"
776+
"unit": "binBps"
810777
},
811778
"overrides": []
812779
},
@@ -847,7 +814,7 @@
847814
"refId": "A"
848815
}
849816
],
850-
"title": "Top $top_n indexes by hits (bytes)",
817+
"title": "Top $top_n indexes by block hits",
851818
"type": "timeseries"
852819
},
853820
{

config/grafana/dashboards/Dashboard_11_Single_index_analysis.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@
423423
}
424424
]
425425
},
426-
"unit": "Bps"
426+
"unit": "binBps"
427427
},
428428
"overrides": []
429429
},
@@ -470,7 +470,7 @@
470470
"refId": "B"
471471
}
472472
],
473-
"title": "Index reads and hits (bytes)",
473+
"title": "Shared block reads and hits",
474474
"type": "timeseries"
475475
},
476476
{
@@ -693,7 +693,7 @@
693693
"refId": "C"
694694
}
695695
],
696-
"title": "",
696+
"title": "Boguk ratio (index size / reltuples)",
697697
"transformations": [
698698
{
699699
"id": "calculateField",

config/grafana/dashboards/Dashboard_8_Table_Stats.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@
659659
"useBackend": false
660660
}
661661
],
662-
"title": "Top $top_n tables by size change rate (absolute)",
662+
"title": "Top $top_n tables by size growth /s",
663663
"type": "timeseries"
664664
},
665665
{
@@ -761,7 +761,7 @@
761761
"useBackend": false
762762
}
763763
],
764-
"title": "Top $top_n tables by table (w/o TOAST) size",
764+
"title": "Top $top_n tables by heap size (excl. TOAST)",
765765
"type": "timeseries"
766766
},
767767
{
@@ -863,7 +863,7 @@
863863
"useBackend": false
864864
}
865865
],
866-
"title": "Top $top_n tables by table (w/o TOAST) size change rate (absolute)",
866+
"title": "Top $top_n tables by heap size growth /s",
867867
"type": "timeseries"
868868
},
869869
{
@@ -1067,7 +1067,7 @@
10671067
"useBackend": false
10681068
}
10691069
],
1070-
"title": "Top $top_n tables by TOAST size change rate (absolute)",
1070+
"title": "Top $top_n tables by TOAST size growth /s",
10711071
"type": "timeseries"
10721072
},
10731073
{
@@ -1169,7 +1169,7 @@
11691169
"useBackend": false
11701170
}
11711171
],
1172-
"title": "Top $top_n tables by index size",
1172+
"title": "Top $top_n tables by indexes size",
11731173
"type": "timeseries"
11741174
},
11751175
{
@@ -1271,7 +1271,7 @@
12711271
"useBackend": false
12721272
}
12731273
],
1274-
"title": "Top $top_n tables by index size change rate (absolute)",
1274+
"title": "Top $top_n tables by indexes size growth /s",
12751275
"type": "timeseries"
12761276
},
12771277
{
@@ -1284,7 +1284,7 @@
12841284
},
12851285
"id": 11,
12861286
"panels": [],
1287-
"title": "Tuple stats",
1287+
"title": "Activity stats",
12881288
"type": "row"
12891289
},
12901290
{
@@ -2474,7 +2474,7 @@
24742474
"useBackend": false
24752475
}
24762476
],
2477-
"title": "Top $top_n tables by table (without TOAST) shared block hits",
2477+
"title": "Top $top_n tables by heap shared block hits",
24782478
"type": "timeseries"
24792479
},
24802480
{
@@ -2577,7 +2577,7 @@
25772577
"useBackend": false
25782578
}
25792579
],
2580-
"title": "Top $top_n tables by table (without TOAST) shared block reads",
2580+
"title": "Top $top_n tables by heap shared block reads",
25812581
"type": "timeseries"
25822582
},
25832583
{

config/grafana/dashboards/Dashboard_9_Single_table_analysis.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@
422422
"useBackend": false
423423
}
424424
],
425-
"title": "Table logical size distribution changes (absolute)",
425+
"title": "Size growth /s",
426426
"transformations": [
427427
{
428428
"id": "calculateField",
@@ -663,7 +663,7 @@
663663
},
664664
"id": 30,
665665
"panels": [],
666-
"title": "Tuple stats",
666+
"title": "Activity stats",
667667
"type": "row"
668668
},
669669
{
@@ -884,7 +884,7 @@
884884
"useBackend": false
885885
}
886886
],
887-
"title": "Tuple operations",
887+
"title": "Tuple operations /s",
888888
"transformations": [
889889
{
890890
"id": "calculateField",
@@ -1145,7 +1145,7 @@
11451145
"useBackend": false
11461146
}
11471147
],
1148-
"title": "Tuple operations (%)",
1148+
"title": "Tuple operations distribution (%)",
11491149
"transformations": [
11501150
{
11511151
"id": "calculateField",
@@ -1426,7 +1426,7 @@
14261426
"useBackend": false
14271427
}
14281428
],
1429-
"title": "Live tuples fetch distribution",
1429+
"title": "Tuple fetch methods /s",
14301430
"type": "timeseries"
14311431
},
14321432
{
@@ -1610,7 +1610,7 @@
16101610
"refId": "E"
16111611
}
16121612
],
1613-
"title": "Shared block hits",
1613+
"title": "Shared block hits /s",
16141614
"transformations": [
16151615
{
16161616
"id": "calculateField",
@@ -1787,7 +1787,7 @@
17871787
"refId": "E"
17881788
}
17891789
],
1790-
"title": "Shared block reads",
1790+
"title": "Shared block reads /s",
17911791
"transformations": [
17921792
{
17931793
"id": "calculateField",
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Grafana Dashboards Naming Conventions
2+
3+
This document outlines the naming principles used in PostgresAI Grafana dashboards.
4+
5+
## Terminology Rules
6+
7+
### Bloat Metrics
8+
Always use **"Estimated bloat"** when referring to bloat metrics. The bloat
9+
values shown in these dashboards are based on estimation queries that use
10+
pg_stat_user_tables statistics - they are not precise measurements like
11+
pgstattuple would provide.
12+
13+
**Correct:**
14+
- "Estimated bloat %"
15+
- "Estimated bloat size"
16+
- "Top $top_n tables by estimated bloat %"
17+
18+
**Incorrect:**
19+
- "Bloat %"
20+
- "Bloat size"
21+
22+
### Shared Block I/O
23+
Use **"Shared block reads"** and **"Shared block hits"** - these are the correct
24+
PostgreSQL terminology.
25+
26+
- **Shared block hits**: Data was found in PostgreSQL's shared buffer pool
27+
- **Shared block reads**: Data was read into the shared buffer pool from the OS
28+
page cache. Note: This does NOT necessarily mean a disk read occurred - the data
29+
may have been served from the OS file system cache.
30+
31+
**Correct:**
32+
- "Shared block reads"
33+
- "Shared block hits"
34+
- "Shared block hit ratio"
35+
36+
**Incorrect:**
37+
- "Block disk reads" (we don't know if actual disk I/O occurred)
38+
- "Block cache hits" (ambiguous - could mean OS cache or PG buffer pool)
39+
40+
### Rate Metrics
41+
For rate-based panels (showing per-second values), append `/s` to the title:
42+
43+
**Examples:**
44+
- "Tuple operations /s"
45+
- "Size growth /s"
46+
- "Shared block hits /s"
47+
48+
### Section (Row) Naming
49+
- **"Activity stats"**: For table dashboards showing tuple operations
50+
- **"Index usage stats"**: For index dashboards showing scan/fetch metrics
51+
- **"Estimated bloat stats"**: For bloat-related metrics (always include "Estimated")
52+
- **"IO stats"**: For shared buffer pool I/O metrics
53+
- **"Size stats"**: For size-related metrics
54+
55+
## Units
56+
57+
- **binBps**: Use binary bytes per second (KiB/s, MiB/s, GiB/s) for PostgreSQL
58+
block I/O rates, as PostgreSQL uses binary block sizes (typically 8 KiB)
59+
- **bytes**: Use for absolute size measurements
60+
- **percent**: Use for percentage values (0-100 scale)
61+
- **ops**: Use for operations per second

0 commit comments

Comments
 (0)