-
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
Add syslog support for ISO8601 format timestamp #10736
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Tested locally. Error seems unrelated
@@ -0,0 +1,28 @@ | |||
[ | |||
{ | |||
"ecs.version": "1.0.0-beta2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see an @timestamp
in the output here. Do I miss something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ruflin unfortunately all the timestamps got removed in https://github.com/elastic/beats/pull/10736/files/5c8b9d3205efc146891117823f724935600ed372#diff-7f560f729ae36bb40472cb039fedc34fL42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, regarding to the @timestamp
field: https://github.com/elastic/beats/blob/master/filebeat/tests/system/test_modules.py#L220 because timestamp got removed from system.syslog metricset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I now understand why it happens. The problem now is that the log file above actually has timestamps with the year inside but we don't test it. This becomes especially important as we just added a pattern to support year but the tests we have to confirm it works, don't do that.
Is there an easy way to fix this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a chat with @kaiyan-sheng about the missing timestamp. We decided to merge it as is but follow up with a convention or something similar to make it possible in the future to have here the timestamps generated.
This PR is to add support for syslog which has ISO8601 format timestamps. For example:
Suse Format:
2018-08-14T14:30:02.203151+02:00 linux-sqrz systemd[4179]: Stopped target Basic System.
2018-08-14T14:30:02.203251+02:00 linux-sqrz systemd[4179]: Stopped target Paths.
closes #8716