Skip to content

Commit 7b3f0c0

Browse files
committed
fix: fixed WAL Count metric generation for native Zabbix agent
1 parent d3c57e3 commit 7b3f0c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mamonsu/plugins/pgsql/xlog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,15 @@ def keys_and_queries(self, template_zabbix):
263263
result = []
264264
if LooseVersion(self.VersionPG) < LooseVersion('10'):
265265
result.append(
266-
'{0},$2 $1 -c "{1}"'.format(self.key_count_wall.format('[*]'), Pooler.SQL['count_xlog_files'][0]))
266+
'{0},$2 $1 -c "{1}"'.format(self.key_count_wall.format('[*]'), Pooler.SQL['count_wal_files'][0].format('xlog')))
267267
result.append('{0},$2 $1 -c "{1}"'.format(self.key_wall.format('[*]'), self.query_xlog_lsn_diff))
268268
result.append(
269269
'{0},$2 $1 -c "{1}"'.format("pgsql.replication_lag.sec[*]", self.query_agent_replication_lag.format(self.plugin_config('interval'),
270270
'xlog_receive_location',
271271
'xlog_replay_location')))
272272
else:
273273
result.append(
274-
'{0},$2 $1 -c "{1}"'.format(self.key_count_wall.format('[*]'), Pooler.SQL['count_wal_files'][0]))
274+
'{0},$2 $1 -c "{1}"'.format(self.key_count_wall.format('[*]'), Pooler.SQL['count_wal_files'][0].format('wal')))
275275
result.append('{0},$2 $1 -c "{1}"'.format(self.key_wall.format('[*]'), self.query_wal_lsn_diff))
276276
result.append(
277277
'{0},$2 $1 -c "{1}"'.format("pgsql.replication_lag.sec[*]", self.query_agent_replication_lag.format(self.plugin_config('interval'),

0 commit comments

Comments
 (0)