-
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
Convert Filebeat logstash.* to ECS #9935
Conversation
@ruflin Quick question. This module has 2 pipelines per fileset. One for Logstash' plain log format, the other for the JSON format. Right now, only plain logs are tested. When trying to add a sample JSON log for
|
Can you provide me with some JSON logs here. Will check what I can hack in to make this happen in @ycombinator I assume you face the same problem for the ES json logs. How did you solve this? |
@ruflin Awesome, thanks. Here's a few lines for
I'll get you slow logs shortly |
@ruflin Here's the slow log example:
|
e40a87b
to
d204a5e
Compare
d204a5e
to
2c909c1
Compare
@ruflin @ycombinator Ready for final review. Both unchecked caveats in the description are currently done in this PR, but I'm fine with reverting these changes, if you think that's best. Thanks! |
@@ -1,5 +1,5 @@ | |||
{ | |||
"description": "Pipeline for parsing logstash log logs", | |||
"description": "Pipeline for parsing logstash logs", |
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.
Nit: I'd make this "Pipeline or parsing logstash slow logs", just so it's not the same as the logs
fileset's pipeline description.
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.
One small naming nit 🙄, otherwise LGTM.
Fixed the pipeline names for slowlog. To my great surprise, the Travis CI tests were failing for the LS slow log. They work on my machine. Will investigate, to see if this was a transient problem or something legit. |
Legit failure. Was able to reproduce locally after a rebuild:
|
…ogs): - logstash.log.level => log.level - logstash.log.message => message - logstash.slowlog.level => log.level - logstash.slowlog.message => message - logstash.slowlog.took_in_nanos => event.duration - read_timestamp => event.created Pipelines for JSON logs haven't been migrated.
This fails the tests until `test_modules.py` has support for this.
Note that this field is stripped out of the saved JSON, since it would differ from one test run to another
- log.level in both - message only in the 'log' dataset. It's not kept in slowlog because it's always the same message
0ac44f9
to
d503db9
Compare
Tests were perfectly green. Rebased for a single conflict in ecs-migration.yml. Merging right away. |
Caveats
logstash.log.module
is parsed with trailing spaced included. Seems like a good time to fix this and strip those spaces.logstash.slowlog.message
is not useful, I would take the opportunity to remove it. It always just contains "event processing time". In the plain logs, it also contains a duplicate of the nested event, which is also atlogstash.slowlog.event
)Renames
TODO
logstash.log.module