Open venkateshrepal opened 6 years ago
According to the elastalert logs ,errors from elastalert/elastalert.py . I suppose that I had not triggerred alert-sent incient thus index(alert_time) is not initialized .Finally ,I add an annotation on below code and elastalert run fine abd then later restore them after doing its job
which file did u add the annotation
You can use timestamp_field
to change which field ElastAlert 2 will use as the timestamp. You can use timestamp_type
to change it between ISO 8601 and unix timestamps. You must have some kind of timestamp for ElastAlert 2 to work. If your events are not in real time, you can use query_delay
and buffer_time
to adjust when ElastAlert 2 will look for documents.
Fixed: Add this into rule.yaml
timestamp_field: "@timestamp"
timestamp_type: "iso"
I am creating an application where I need to send a mail with elastalert. When I run command
python -m elastalert.elastalert --verbose --rule myrules\myrule.yaml
to trigger the rule, I am having an exception as follows:No mapping found for [alert_time] in order to sort on
Output of this API is as follows:
Rule file content:
any idea to solve the same please?