-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fixes parsing of @timestamp for Elasticsearch Audit JSON logs #13532
Fixes parsing of @timestamp for Elasticsearch Audit JSON logs #13532
Conversation
Fixes parsing of @timestamp for Elasticsearch Audit JSON logs. E.g. of logs: ``` {"@timestamp":"2019-09-05T14:02:37,921", "node.id":"UwRu4mReRtyJO1-FWAPvIQ", "event.type":"transport", "event.action":"authentication_success", "user.name":"_system", "origin.type":"local_node", "origin.address":"127.0.0.1:9300", "realm":"__fallback", "request.id":"474ZciqtQteOhjLO3OdZIw", "action":"indices:monitor/stats", "request.name":"IndicesStatsRequest"} ```
@lucabelluccini thanks for opening this PR, it seems that it is failing for our current test files. Most of them seem to be ISO8601 dates with timezone included, but we have some of them without timezone. I wonder if the ones without timezones are from older versions. From what version is the log entry you posted? |
Pinging @elastic/stack-monitoring |
Hello @jsoriano, this is Filebeat 7.1.1 with Elasticsearch 7.1.1. |
Hi @lucabelluccini, I'm able to reproduce the issue you are seeing with Elasticsearch 7.1.1. This is because in that version of ES the audit logs (JSON format) contain a Thanks for bringing this to our attention with this PR. However, the fixes in this PR are not compatible across all versions of ES, as @jsoriano pointed out in his comment above. After much experimentation (and learning a few special cases in Painless syntax 😅) I believe I finally have the correct configuration necessary for the |
Fixes parsing of @timestamp for Elasticsearch Audit JSON logs.
E.g. of audit JSON logs:
Related to #13367
Would it be possible to review @jsoriano @ycombinator ?