From 9701674959b6c853b08227c463baf05e11e3df3d Mon Sep 17 00:00:00 2001 From: luffynextgen <34096485+luffynextgen@users.noreply.github.com> Date: Wed, 15 Nov 2023 17:49:20 +0100 Subject: [PATCH] Update loaders.py --- elastalert/loaders.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elastalert/loaders.py b/elastalert/loaders.py index a94e9001..fc416088 100644 --- a/elastalert/loaders.py +++ b/elastalert/loaders.py @@ -332,9 +332,9 @@ def load_options(self, rule, conf, filename, args=None): if 'kibana_discover_to_timedelta' in rule: rule['kibana_discover_to_timedelta'] = datetime.timedelta(**rule['kibana_discover_to_timedelta']) if 'opensearch_discover_from_timedelta' in rule: - rule['opensearch_discover_from_timedelta'] = datetime.timedelta(**rule['kibana_discover_from_timedelta']) + rule['opensearch_discover_from_timedelta'] = datetime.timedelta(**rule['opensearch_discover_from_timedelta']) if 'opensearch_discover_to_timedelta' in rule: - rule['opensearch_discover_to_timedelta'] = datetime.timedelta(**rule['kibana_discover_to_timedelta']) + rule['opensearch_discover_to_timedelta'] = datetime.timedelta(**rule['opensearch_discover_to_timedelta']) except (KeyError, TypeError) as e: raise EAException('Invalid time format used: %s' % e)