prometheus: treat exim log file as binary (#50699)
This commit is contained in:
parent
cb3a3c28ab
commit
56c6a8b13b
|
@ -64,9 +64,9 @@ def etckeeper(ctn):
|
|||
|
||||
|
||||
def exim(ctn):
|
||||
with open('/var/log/exim4/mainlog') as fh:
|
||||
with open('/var/log/exim4/mainlog', 'rb') as fh:
|
||||
for line in fh.readlines():
|
||||
if " ** " in line:
|
||||
if b" ** " in line:
|
||||
eo_exim.labels(ctn, "errors").inc()
|
||||
deferred = int(run("exim -bpc"))
|
||||
eo_exim.labels(ctn, "deferred").set(deferred)
|
||||
|
|
Loading…
Reference in New Issue