This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
Replies: 2 comments 1 reply
-
Another idea is to use one metric with setting name and unit as label in it. Kind of: select (extract(epoch from now()) * 1e9)::int8 as epoch_ns,
name tag_name,
setting,
unit tag_unit,
vartype
from pg_settings
where name in
('server_version',
'server_version_num',
'block_size',
'max_connections',
'hot_standby',
'hot_standby_feedback',
'fsync',
'full_page_writes',
'synchronous_commit',
'wal_compression',
'wal_log_hints',
'synchronous_standby_names',
'shared_buffers',
'work_mem',
'maintenance_work_mem',
'effective_cache_size',
'default_statistics_target',
'random_page_cost',
'min_wal_size',
'max_wal_size',
'checkpoint_segments',
'checkpoint_timeout',
'checkpoint_completion_target',
'max_worker_processes',
'max_parallel_workers',
'max_parallel_workers_per_gather',
'jit',
'ssl',
'statement_timeout',
'deadlock_timeout',
'data_checksums',
'max_connections',
'max_wal_senders',
'max_replication_slots',
'max_prepared_transactions',
'lock_timeout',
'archive_mode',
'archive_command',
'archive_timeout',
'shared_preload_libraries',
'listen_addresses',
'ssl',
'autovacuum',
'autovacuum_max_workers',
'autovacuum_vacuum_scale_factor',
'autovacuum_vacuum_threshold',
'autovacuum_analyze_scale_factor',
'autovacuum_analyze_scale_factor')
where vartype in ('real', 'integer', 'bool'); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Would you please clarify what exactly metric is it and how do you want to use those values in dashboards. Thanks in advance |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a question about the way how numeric settings are collected. As of now for most of them current_settings function is used which converts the numbers to strings which does not allow to display the value on the dashboard or to use it in calculations.
Is there any reason to use current_settings results instead of the original value?
The query that shows the difference for some settings:
Thanks.
Mikhail
Beta Was this translation helpful? Give feedback.
All reactions