-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect timestamp #1047
Comments
Are you sure you're not looking in Kibana, where the timestamp is automatically adjusted to local time? Can you post the raw JSON of the document that matched (including _id) along with the alert (including _id)? |
Hello thanks for getting back to me - yes, I was looking in Kibana, however my understanding is that by default Elastalert uses local time too, so shouldn't the Kibana and Elastalert timestamps be the same value? |
Internally ElastAlert converts everything into UTC (The Z at the end of the timestamps you posted means UTC in iso8601). In a few places it will convert it into local time to display in the alert, but when it does it will add the timezone. |
OK thanks, so what should I do to get the two timestamp values to agree with each other? |
You can set |
Thanks again - is use_local_time: true set on config.yaml or in a rule? |
config.yaml to make it apply to all rules, or per rule |
Adding the use_local_time option has not made a difference, the alert @timestamp is still an hour behind so I assume I'll need to go the Logstash route? Test ElastAlert Rule @timestamp: 2017-04-24T18:24:21.841Z Subject: Member: Group: Additional Information: |
@kernelpanicfbsd any solution? |
@arlindonatal
|
@Qmando thks! I use in the "alert_text_args", but the timezone is incorrect, returns with +3 hours. my rule: alert_text_type: "alert_text_only"
Other problem is the period. How get endtime the rule? |
If you are using pretty_ts function, it will use the local machines timezone (/etc/timezone). Is that incorrect? Or are you still just printing out UTC? Try adding |
Seems I met this problem too.
The |
After searching I fixed this problem by previous issues. Thank you very much! |
I'm getting notifications with correct timestamp with this enhancement. But I'm getting an error as well :
How can I resolve this? |
I tried the same thing. The problems are:
|
The @timestamp format issue can be fixed by using something like this:
And then in the rule referencing in "local_time" instead of "@timestamp": |
I tried the above solution as well what @Qmando provided. If anyone has the solution for this |
Thanks for the quick response. |
How are you starting elastalert? Try using |
I am starting as- Everything was running before i was getting email alerts but the timestamp shows sometime a day old. Even the time is wrong |
While testing it i am not getting any error. elastalert-test-rule my_rules/email_rule.yaml |
Try just |
Not Though I really have zero experience with python on windows so something else may be afoot here. |
I got the output as- and then i have bunch of schema, which says Failed validating 'oneof' in schema: |
|
I am not sure why its checking example_spike_single_metric_agg.yaml in rules folder. |
Even i am unable to understand, just to change the @timestamp i have to work on enhancements.py otherwise i am getting the alerts on email and JIRA. I even added timeframe, bbut nothing changes |
And one the problem that i am facing is, elastalert is getting started from 5/20/2019 till today i.e. 5/22/2019. But it shows the alert notification of the 20th May. And even the alert is wrong becasue at that particular time i have no spike. |
The above error got resolved by using in the config.yaml file |
@Qmando Hi Qmando, this method didn't work for me, this method just modify the time of alert email conent, trigger sending email time still use UTC time. eg: How should I deal with this problem? Look forward to your reply. Thanks |
Hello all, I'm using elastalert to query a winlogbeat index which does use @timestamp for the date/time.
However, the email alert I'm receiving has a timestamp value that is an hour behind the actual timestamp on the document it has matched; for example a document with the timestamp of @timestamp: 2017-04-24T10:05:42.687Z in the elastalert database has a timestamp of @timestamp: 2017-04-24T09:05:42.687Z on the elastalert email.
Can anyone help?
The text was updated successfully, but these errors were encountered: