Skip to content

[+] add settings_num metric, closes #1247 - #1436

Open
pashagolub wants to merge 4 commits into
masterfrom
add-settings-num-metric
Open

[+] add settings_num metric, closes #1247#1436
pashagolub wants to merge 4 commits into
masterfrom
add-settings-num-metric

Conversation

@pashagolub

@pashagolub pashagolub commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Closes #1247.

Changes

  • Add settings_num metric: one row per numeric PostgreSQL setting (integer, real, bool→1/0, enum→1-based ordinal), setting name exported as the name tag. Eliminates the Prometheus label cardinality explosion caused by the legacy wide-column settings metric.
  • Deprecate settings and remove it from all built-in presets (replaced 1:1 by settings_num at the same intervals).
  • Port all provisioned Grafana v13 dashboards to settings_num: health-check, change-events, postgres-version-overview, recommendations, index-overview (postgres + prometheus variants where applicable).
  • Add new Settings Overview dashboards (v12 and v13 schemas, postgres and prometheus variants).

Breaking change

settings is no longer collected by any built-in preset. Custom dashboards or queries using the settings table or pgwatch_settings_* series must migrate to settings_num / pgwatch_settings_num_value{name="<guc>"}. The metric definition remains available (deprecated) for custom presets.

Notes

  • String GUCs (e.g. archive_command, shared_preload_libraries) are intentionally not covered by settings_num; change detection for them remains available via configuration_hashes.
  • Where a version string is displayed (recommendations, health-check), it is now derived from server_version_num.

@pashagolub pashagolub self-assigned this Jun 8, 2026
@pashagolub pashagolub added dashboards Grafana dashboards related metrics Metrics related issues labels Jun 8, 2026
@coveralls

coveralls commented Jun 8, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 31253920038

Coverage remained the same at 85.55%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 5896
Covered Lines: 5044
Line Coverage: 85.55%
Coverage Strength: 0.98 hits per line

💛 - Coveralls

- replace legacy 'settings' queries with settings_num equivalents in
  health-check, change-events, postgres-version-overview, recommendations,
  index-overview (postgres) and health-check (prometheus)
- add Settings Overview dashboards for postgres and prometheus
@pashagolub
pashagolub force-pushed the add-settings-num-metric branch from f723076 to abe03c9 Compare August 8, 2026 10:57
@pashagolub
pashagolub marked this pull request as ready for review August 8, 2026 12:43
@pashagolub pashagolub changed the title [+] add settings_num metric, closes #1247 [+] add settings_num metric, closes #1247 Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboards Grafana dashboards related metrics Metrics related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

settings metric should be rewritten with values casted to integer

2 participants