From b14988612896f75e65b63ea3a21bcac988f8b370 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 21 Jul 2022 13:40:40 +0100 Subject: [PATCH] Don't send to Logstash if it's disabled --- modules/monitor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitor.py b/modules/monitor.py index 7bdd662..1ada7e5 100644 --- a/modules/monitor.py +++ b/modules/monitor.py @@ -2,6 +2,7 @@ from core.logstash import sendLogstashNotification from core.relay import sendRelayNotification from modules import userinfo from utils.dedup import dedup +import main order = [ "type", @@ -74,5 +75,6 @@ def event(numName, c): # yes I'm using a short variable because otherwise it go del c["muser"] sortedKeys = {k: c[k] for k in order if k in c} # Sort dict keys according to order sortedKeys["src"] = "irc" - sendLogstashNotification(sortedKeys) + if main.config["Logstash"]["Enabled"]: + sendLogstashNotification(sortedKeys) sendRelayNotification(sortedKeys)