Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pg_settings metrics have different short descriptions in different pg versions #770

Open
khkhalifa opened this issue Mar 13, 2023 · 0 comments

Comments

@khkhalifa
Copy link
Contributor

khkhalifa commented Mar 13, 2023

What did you do?

Configured postgres exporter with multiple targets having different versions (13.9.0 & 14.6.0)
and running the /metrics endpoint

What did you expect to see?

To get the metrics

What did you see instead? Under which circumstances?

Multiple errors

  • postgres_exporter version:

    v0.12.0-rc.0

  • postgres_exporter flags:

--auto-discover-databases
--web.listen-address=:9187

  • PostgreSQL version:

    13.9.0 & 14.6.0

  • Logs:

insert logs relevant to the issue here

The response from the metrics endpoint

An error has occurred while serving metrics:

11 error(s) occurred:

  • collected metric pg_settings_check_function_bodies label:<name:"server" value:":5432" > gauge:<value: 0> has help "Check function bodies during CREATE FUNCTION." but should have "Check routine bodies during CREATE FUNCTION and CREATE PROCEDURE."
  • collected metric pg_settings_data_directory_mode label:<name:"server" value:":5432" > gauge:<value: 0> has help "Mode of the data directory." but should have "Shows the mode of the data directory."
  • collected metric pg_settings_enable_partition_pruning label:<name:"server" value:":5432" > gauge:<value: 0> has help "Enables plan-time and run-time partition pruning." but should have "Enables plan-time and execution-time partition pruning."
  • collected metric pg_settings_idle_in_transaction_session_timeout_seconds label:<name:"server" value:":5432" > gauge:<value: 0> has help "Sets the maximum allowed duration of any idling transaction. [Units converted to seconds.]" but should have "Sets the maximum allowed idle time between queries, when in a transaction. [Units converted to seconds.]"
  • collected metric pg_settings_integer_datetimes label:<name:"server" value:":5432" > gauge:<value: 0> has help "Datetimes are integer based." but should have "Shows whether datetimes are integer based."
  • collected metric pg_settings_jit_debugging_support label:<name:"server" value:":5432" > gauge:<value: 0> has help "Register JIT compiled function with debugger." but should have "Register JIT-compiled functions with debugger."
  • collected metric pg_settings_jit_optimize_above_cost label:<name:"server" value:":5432" > gauge:<value: 0> has help "Optimize JITed functions if query is more expensive." but should have "Optimize JIT-compiled functions if query is more expensive."
  • collected metric pg_settings_jit_profiling_support label:<name:"server" value:":5432" > gauge:<value: 0> has help "Register JIT compiled function with perf profiler." but should have "Register JIT-compiled functions with perf profiler."
  • collected metric pg_settings_log_transaction_sample_rate label:<name:"server" value:":5432" > gauge:<value: 0> has help "Set the fraction of transactions to log for new transactions." but should have "Sets the fraction of transactions from which to log all statements."
  • collected metric pg_settings_parallel_tuple_cost label:<name:"server" value:":5432" > gauge:<value: 0> has help "Sets the planner's estimate of the cost of passing each tuple (row) from worker to master backend." but should have "Sets the planner's estimate of the cost of passing each tuple (row) from worker to leader backend."
  • collected metric pg_settings_wal_skip_threshold_bytes label:<name:"server" value:":5432" > gauge:<value: 0> has help "Size of new file to fsync instead of writing WAL. [Units converted to bytes.]" but should have "Minimum size of new file to fsync instead of writing WAL. [Units converted to bytes.]"

The issue is raised by prometheus go client since the short description is different from the family metric help.

https://github.com/prometheus/client_golang/blob/release-1.14/prometheus/registry.go#L640

The help should be unique for the metric family

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant