Revise the versions on a few queries, improve query tests
* Add ability to specify the sslmode parameter when connecting to PostgreSQL * Fix min versions for replication queries * Add query-tests target to main Makefile
This commit is contained in:
@@ -11,7 +11,7 @@ metrics:
|
||||
discover_slots:
|
||||
type: set
|
||||
query:
|
||||
0: SELECT slot_name, plugin, slot_type, database, false as temporary, active FROM pg_replication_slots
|
||||
90400: SELECT slot_name, plugin, slot_type, database, false as temporary, active FROM pg_replication_slots
|
||||
100000: SELECT slot_name, plugin, slot_type, database, temporary, active FROM pg_replication_slots
|
||||
|
||||
# cluster-wide metrics
|
||||
@@ -20,9 +20,9 @@ metrics:
|
||||
query:
|
||||
0: SHOW server_version_num
|
||||
max_frozen_age:
|
||||
type: value
|
||||
type: row
|
||||
query:
|
||||
0: SELECT max(age(datfrozenxid)) FROM pg_database
|
||||
0: SELECT max(age(datfrozenxid)), max(mxid_age(datminmxid)) FROM pg_database
|
||||
|
||||
# Per-database metrics
|
||||
db_stats:
|
||||
@@ -43,7 +43,7 @@ metrics:
|
||||
rep_stats:
|
||||
type: row
|
||||
query:
|
||||
0: SELECT * FROM pg_stat_replication WHERE client_addr || '_' || regexp_replace(application_name, '[ ,]', '_', 'g') = '{repid}'
|
||||
90400: SELECT * FROM pg_stat_replication WHERE client_addr || '_' || regexp_replace(application_name, '[ ,]', '_', 'g') = '{repid}'
|
||||
test_args:
|
||||
repid: 127.0.0.1_test_rep
|
||||
|
||||
@@ -57,7 +57,7 @@ metrics:
|
||||
slot_stats:
|
||||
type: row
|
||||
query:
|
||||
0: SELECT active_pid, xmin, pg_xlog_location_diff(pg_current_xlog_location(), restart_lsn) AS restart_bytes, pg_xlog_location_diff(pg_current_xlog_location(), confirmed_flush_lsn) AS confirmed_flush_bytes FROM pg_replication_slots WHERE slot_name = '{slot}'
|
||||
90400: SELECT active_pid, xmin, pg_xlog_location_diff(pg_current_xlog_location(), restart_lsn) AS restart_bytes, pg_xlog_location_diff(pg_current_xlog_location(), confirmed_flush_lsn) AS confirmed_flush_bytes FROM pg_replication_slots WHERE slot_name = '{slot}'
|
||||
100000: SELECT active_pid, xmin, pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn) AS restart_bytes, pg_wal_lsn_diff(pg_current_wal_lsn(), confirmed_flush_lsn) AS confirmed_flush_bytes FROM pg_replication_slots WHERE slot_name = '{slot}'
|
||||
test_args:
|
||||
slot: test_slot
|
||||
|
||||
Reference in New Issue
Block a user