-
Patch request
-
Resolution: Fixed
-
Trivial
-
None
-
5.4.3
-
/var/lib/zabbix/postgresql/pgsql.replication.lag.sql
Hi!
I have recovered from backup pgsql server (Point in time recovery).
postgres=# select pg_last_xact_replay_timestamp(); pg_last_xact_replay_timestamp ------------------------------- 2021-06-26 22:11:23.259069+03
Item "Replication: lag in seconds":
pgsql.replication.lag.sec["{$PG.HOST}","{$PG.PORT}","{$PG.USER}","{$PG.DB}"]
And looks like trigger not working correctly for me.
I got errors event like
PostgreSQL: Streaming lag with {#MASTER} is too high (over {$PG.REPL_LAG.MAX.WARN} in 5m)
In my case I change user parameter SQL from
CASE WHEN pg_last_wal_receive_lsn() = pg_last_wal_replay_lsn()
to
CASE WHEN pg_last_wal_receive_lsn() is NULL or pg_last_wal_receive_lsn() = pg_last_wal_replay_lsn()
And it corrects the issue.
Hope you can update this script.
Thank you!
- depends on
-
ZBX-19897 Bug in template PostgreSQL by agent2 dependent item
- Closed