Open dtyugaev opened 2 years ago
С мастера тянут данные одна реплика и barman
postgres=# select * from pg_stat_replication;
-[ RECORD 1 ]----+------------------------------ pid | 3255105 usesysid | 18178678 usename | replica application_name | 13/main client_addr | 10.0.0.32 client_hostname | client_port | 52592 backend_start | 2022-07-28 19:05:18.057825+03 backend_xmin | state | streaming sent_lsn | 1F5F/47DBE918 write_lsn | 1F5F/47DBD458 flush_lsn | 1F5F/47DB6420 replay_lsn | 1F5F/47DAF368 write_lag | 00:00:00.001176 flush_lag | 00:00:00.003943 replay_lag | 00:00:00.008699 sync_priority | 0 sync_state | async reply_time | 2022-08-01 13:31:01.832546+03 -[ RECORD 2 ]----+------------------------------ pid | 3234756 usesysid | 15653186 usename | streaming_barman application_name | barman_receive_wal client_addr | 127.0.0.1 client_hostname | client_port | 44164 backend_start | 2022-07-28 18:17:02.226355+03 backend_xmin | state | streaming sent_lsn | 1F5F/47DBE918 write_lsn | 1F5F/476C4308 flush_lsn | 1F5F/47000000 replay_lsn | write_lag | 00:00:00.000137 flush_lag | 00:00:00.024245 replay_lag | 91:13:53.423539 sync_priority | 0 sync_state | async reply_time | 2022-08-01 13:30:55.673696+03
Версия mamonsu 3.5.1 Собрано из исходников. bootstrap режим включен.
PostgreSQL 13
На мастер сервере в логах мамонсу возникает такая ошибка в модуле репликации.
[ERROR] 2022-08-01 13:17:49,743 - REPLICATION - plugin replication caught error: float() argument must be a string or a number, not 'NoneType' [DEBUG] 2022-08-01 13:17:49,743 - REPLICATION - Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mamonsu/lib/plugin.py", line 170, in _loop self.run(self.sender) File "/usr/lib/python3/dist-packages/mamonsu/plugins/pgsql/replication.py", line 65, in run zbx.send("pgsql.replication.total_lag[{0}]".format(info[0]), float(info[6])) TypeError: float() argument must be a string or a number, not 'NoneType'