February 2020
Intermediate to advanced
734 pages
38h 13m
English
Assume that we have a PostgreSQL server named pgha1. Follow these steps on the server to enable more enhanced metrics:
[[inputs.postgresql_extensible]] address = "host=pgha1 user=perf_mon dbname=postgres" outputaddress = "pgha1" max_lifetime = "0s" databases = ["pgbench"]
[[inputs.postgresql_extensible.query]] sqlquery=""" SELECT slot_name, pg_wal_lsn_diff( pg_current_wal_insert_lsn(), restart_lsn )::BIGINT as restart_lsn_lag, pg_wal_lsn_diff( pg_current_wal_insert_lsn(), confirmed_flush_lsn )::BIGINT as confirmed_flush_lag FROM pg_replication_slots ...
Read now
Unlock full access