Skip to content

Commit

Permalink
Update loaders.py
Browse files Browse the repository at this point in the history
  • Loading branch information
luffynextgen authored Nov 15, 2023
1 parent a21862e commit 01a882c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions elastalert/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ def load_options(self, rule, conf, filename, args=None):
rule['kibana_discover_from_timedelta'] = datetime.timedelta(**rule['kibana_discover_from_timedelta'])
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'])
if 'opensearch_discover_to_timedelta' in rule:
rule['opensearch_discover_to_timedelta'] = datetime.timedelta(**rule['kibana_discover_to_timedelta'])
except (KeyError, TypeError) as e:
raise EAException('Invalid time format used: %s' % e)

Expand Down

0 comments on commit 01a882c

Please sign in to comment.