Skip to content

Commit

Permalink
Merge pull request dalibo#1390 from bersace/discover
Browse files Browse the repository at this point in the history
Register all internal settings in discover
  • Loading branch information
bersace authored Jun 17, 2024
2 parents 5017efc + 64234ba commit 0bd5301
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 2 additions & 0 deletions agent/temboardagent/discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ def collect_postgres(data, conn):
pass
elif '8kB' == u:
v = v * 8 * 1024
elif 'MB' == u:
v = v * 1024 * 1024
else:
raise ValueError("Unsupported unit %s" % u)
data['postgres'][row['name']] = v
Expand Down
11 changes: 3 additions & 8 deletions agent/temboardagent/queries/discover-settings.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,18 @@ SELECT
"name", "vartype", "unit", "setting"
FROM pg_catalog.pg_settings
WHERE "name" IN (
'block_size'
,'config_file'
'config_file'
,'cluster_name'
,'data_checksums'
,'data_directory'
,'external_pid_file'
,'external_pid_file'
,'hba_file'
,'ident_file'
,'lc_collate'
,'lc_ctype'
,'listen_addresses'
,'max_connections'
,'port'
,'segment_size'
,'server_encoding'
,'syslog_ident'
,'unix_socket_directories'
,'wal_block_size'
,'wal_segment_size'
)
) OR context = 'internal';

0 comments on commit 0bd5301

Please sign in to comment.