title => 'PostgreSQL replication delay',
info => 'Replication delay',
vlabel => 'Seconds',
- basequery =>
- "SELECT
- CASE
- WHEN pg_last_xlog_receive_location() = pg_last_xlog_replay_location() THEN 0::int
- ELSE (extract(epoch FROM now()) - extract(epoch FROM pg_last_xact_replay_timestamp()))::int
- END AS delay",
+ basequery => "SELECT (extract(epoch FROM now()) - extract(epoch FROM pg_last_xact_replay_timestamp()))::int AS delay",
pivotquery => 1,
configquery =>
"VALUES ('delay','Replication delay')"