prometheus: compatibility with postgresql 9.6

This commit is contained in:
Christophe Siraut 2020-11-19 17:24:59 +01:00
parent c45f119966
commit c45149e01e
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ def postgresql(ctn):
eo_postgresql.labels(ctn, role, "replicators").set(0)
for p in psutil.process_iter():
cmd = p.cmdline()
if cmd and 'walsender' in cmd[0]:
if cmd and 'walsender' in cmd[0] or 'wal sender' in cmd[0]:
eo_postgresql.labels(ctn, role, "replicators").inc()
else:
role = "secondary"