[ZBX-19735] pgsql.replication.lag.sql Created: 2021 Jul 27 Updated: 2021 Dec 21 Resolved: 2021 Dec 21 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Templates (T) |
Affects Version/s: | 5.4.3 |
Fix Version/s: | None |
Type: | Patch request | Priority: | Trivial |
Reporter: | Alexey | Assignee: | Vyacheslav Khaliev |
Resolution: | Fixed | Votes: | 0 |
Labels: | PostgreSQL | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
/var/lib/zabbix/postgresql/pgsql.replication.lag.sql |
Issue Links: |
|
Description |
Hi! 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. 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. |
Comments |
Comment by Alexey [ 2021 Jul 27 ] |
I got Postgres 11, maybe you should change this for 10 version also. |
Comment by Oleksii Zagorskyi [ 2021 Jul 29 ] |
It's template "PostgreSQL" |
Comment by Alexey [ 2021 Jul 29 ] |
Exactly! Could you please correct it accordingly to my report? |
Comment by Vyacheslav Khaliev [ 2021 Dec 02 ] |
Resolved in |