prometheus: imporve exim errors detection

This commit is contained in:
Christophe Siraut 2020-11-28 10:36:43 +01:00
parent 66725414c7
commit 19517b5f6c
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ def etckeeper(ctn):
def exim(ctn):
with open('/var/log/exim4/mainlog') as fh:
for line in fh.readlines():
if "**" in line:
if " ** " in line:
eo_exim.labels(ctn, "errors").inc()
deferred = int(run("exim -bpc"))
eo_exim.labels(ctn, "deferred").set(deferred)