Skip to content

Commit 10c153e

Browse files
committed
docs: clarify pgwatch2 attribution — postgres.ai edition (fork of Cybertec's)
The 'pgwatch2 (gen2)' shorthand was ambiguous. The pattern we ported lives in gitlab.com/postgres-ai/pgwatch2 — postgres.ai's fork of Cybertec's pgwatch2 — which was the previous generation of our monitoring stack before postgresai. No code or SQL changes; comment/docstring wording only.
1 parent 2c966fc commit 10c153e

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

config/pgwatch-prometheus/metrics.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,7 +1552,9 @@ metrics:
15521552
- total_relation_size_bytes
15531553
statement_timeout_seconds: 15
15541554
pg_stat_all_indexes:
1555-
# Top-N + "other" bucket pattern ported from pgwatch2 (gen2). Reads
1555+
# Top-N + "other" bucket pattern ported from pgwatch2 postgres.ai edition
1556+
# (gitlab.com/postgres-ai/pgwatch2 — our fork of Cybertec's pgwatch2,
1557+
# used as gen2 of our monitoring stack before postgresai). Reads
15561558
# pg_stat_user_indexes so pg_catalog/information_schema/pg_toast are
15571559
# excluded by the Postgres view itself, no hand-curated nspname pattern.
15581560
# The "other" row aggregates the tail so totals stay correct under a
@@ -1599,7 +1601,8 @@ metrics:
15991601
- idx_tup_fetch
16001602
statement_timeout_seconds: 15
16011603
pg_stat_all_tables:
1602-
# Top-N + "other" bucket pattern ported from pgwatch2 (gen2). Ranks by
1604+
# Top-N + "other" bucket pattern ported from pgwatch2 postgres.ai edition
1605+
# (gitlab.com/postgres-ai/pgwatch2). Ranks by
16031606
# pg_total_relation_size — large tables are usually the interesting ones,
16041607
# which avoids starving big-but-static tables out of the top-N (the old
16051608
# n_live_tup+n_dead_tup ordering did exactly that).
@@ -2960,7 +2963,8 @@ metrics:
29602963
description: >
29612964
Retrieves table-level I/O statistics from `pg_statio_user_tables`, returning
29622965
block-level read and hit counters for heap, index, TOAST and TOAST-index pages.
2963-
Ports the pgwatch2 (gen2) top-N + `'other'` bucket pattern: ranks tables by
2966+
Ports the top-N + `'other'` bucket pattern from pgwatch2 postgres.ai
2967+
edition (gitlab.com/postgres-ai/pgwatch2): ranks tables by
29642968
heap_blks_read, keeps the top 100, and folds the tail into a single `'other'`
29652969
row so totals remain accurate while cardinality stays bounded. Drops rows
29662970
with no I/O activity at all (every counter zero).
@@ -3025,7 +3029,8 @@ metrics:
30253029
pg_statio_all_indexes:
30263030
description: >
30273031
Retrieves index-level I/O statistics from `pg_statio_user_indexes`, returning
3028-
block-level read and hit counters per index. Ports the pgwatch2 (gen2)
3032+
block-level read and hit counters per index. Ports the pgwatch2
3033+
postgres.ai edition (gitlab.com/postgres-ai/pgwatch2)
30293034
top-N + `'other'` bucket pattern: ranks indexes by idx_blks_read, keeps the
30303035
top 100, folds the tail into a single `'other'` row, and drops indexes with
30313036
no I/O activity. Filters temp schemas.

tests/compliance_vectors/test_mr219_monitoring_guards.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ def test_pgwatch_metrics_yml_pg_stat_statements_has_top_n_filter():
8181

8282

8383
def test_pgwatch_stat_views_use_topn_and_other_bucket():
84-
"""High-cardinality per-relation metrics must port the pgwatch2 (gen2)
85-
pattern: read pg_stat_user_*/pg_statio_user_* (so pg_catalog,
84+
"""High-cardinality per-relation metrics must port the pattern from
85+
pgwatch2 postgres.ai edition (gitlab.com/postgres-ai/pgwatch2, our
86+
fork of Cybertec's pgwatch2 used as the previous generation of our
87+
monitoring stack): read pg_stat_user_*/pg_statio_user_* (so pg_catalog,
8688
information_schema and pg_toast are excluded by the Postgres view
8789
itself, no hand-curated nspname pattern), keep the top 100 by relevance,
8890
and aggregate the tail into a single `'other'` tag row so dashboard

0 commit comments

Comments
 (0)