From 106e3e28903ff3e9f83f1e767347142295e7d28c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Revillard?= Date: Mon, 18 Oct 2021 22:21:10 +0200 Subject: [PATCH] fix: Mailer: more debug messages (#368) This will help to detect issues --- integrations/mailer/mailer.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/integrations/mailer/mailer.py b/integrations/mailer/mailer.py index 18a804d9..eaa33386 100755 --- a/integrations/mailer/mailer.py +++ b/integrations/mailer/mailer.py @@ -124,11 +124,14 @@ def on_message(self, body, message): LOG.warn(e) return + LOG.debug('Alert received from the queue (id: %s)', alertid) if alert.repeat: + LOG.debug('Ignored alert %s: repeat state', alertid) message.ack() return if alert.status not in ['open', 'closed']: + LOG.debug('Ignored alert %s: not in open or closed state', alertid) message.ack() return @@ -136,6 +139,8 @@ def on_message(self, body, message): alert.severity not in sevs and alert.previous_severity not in sevs ): + LOG.debug('Ignored alert %s: severity or previous_severity does not matche the severities configuration (%s)', + alertid, sevs) message.ack() return