prometheus: ignore benj/gmail errors

This commit is contained in:
Frédéric Péters 2021-07-12 07:43:18 +02:00
parent b5dc0b101a
commit 3920f115c3
1 changed files with 3 additions and 1 deletions

View File

@ -73,7 +73,9 @@ def etckeeper(ctn):
def exim(ctn):
with open('/var/log/exim4/mainlog', 'rb') as fh:
for line in fh.readlines():
if b" ** " in line:
if b" ** " in line and not (
b'benjamin.dauvergne+eo@gmail.com' in line and b'support.google.com' in line
):
eo_exim.labels(ctn, "errors").inc()
deferred = int(run("exim -bpc"))
eo_exim.labels(ctn, "deferred").set(deferred)