prometheus: ignore openvpn "Connection reset, restarting" error messages
This commit is contained in:
parent
3920f115c3
commit
5a091076c0
|
@ -25,6 +25,9 @@ JOURNALD_IGNORED_ERRORS = {
|
|||
'dovecot.service': [
|
||||
'Connection lost to LDAP server, reconnecting',
|
||||
],
|
||||
'': [ # match all services (useful for ovpn*)
|
||||
'Connection reset, restarting [0]',
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
|
@ -101,7 +104,10 @@ def journald(ctn):
|
|||
for e in j:
|
||||
msg = e["MESSAGE"]
|
||||
ignored_message = False
|
||||
for ignored_string in JOURNALD_IGNORED_ERRORS.get(e.get('_SYSTEMD_UNIT')) or []:
|
||||
ignored_strings = (
|
||||
JOURNALD_IGNORED_ERRORS.get(e.get('_SYSTEMD_UNIT'), []) + JOURNALD_IGNORED_ERRORS['']
|
||||
)
|
||||
for ignored_string in ignored_strings:
|
||||
if ignored_string in msg:
|
||||
ignored_message = True
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue