Skip to content
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

Filebeat Kibana module log fileset #7052

Merged
merged 3 commits into from
May 18, 2018
Merged

Conversation

ruflin
Copy link
Contributor

@ruflin ruflin commented May 9, 2018

This adds the Kibana module to Filebeat reading the Kibana log. The Kibana log is in JSON format which simplifies reading it but at the same time it provides many fields which are not necessarily know in advance. To solve this issue The data is put under kibana.log.meta and the most common known fields are picked into kibana.log.* or directly put into the global field like message. The fields under meta are stored as keyword. This make sure all the meta information around the event is still in the index but prevents potential type conflicts like long vs double.

Additional change:

  • Module tests always overwrite the pipeline. This should make development easier.

@ruflin ruflin added in progress Pull request is currently in progress. module Filebeat Filebeat labels May 9, 2018
@ruflin
Copy link
Contributor Author

ruflin commented May 11, 2018

@tsg The Kibana log is pretty interesting as it's all in json which is pretty nice. The downside of it is there are lots of fields and I assume in my test logs not all fields that can show up in there. At the moment I'm not sure how we should deal with all these fields as I don't think it will scale to map all of them. I was thinking perhpas we can pick the ones we think are most relevant and put all the others under a namespace and just say it's object type and mapping will be done dynamically?

@ruflin ruflin force-pushed the kibana-filebeat-module branch 2 times, most recently from 7031c13 to 1f4889f Compare May 14, 2018 07:50
@ruflin ruflin changed the title [WIP] Filebeat Kibana module log fileset Filebeat Kibana module log fileset May 14, 2018
@ruflin ruflin added review and removed in progress Pull request is currently in progress. labels May 14, 2018
@ruflin
Copy link
Contributor Author

ruflin commented May 14, 2018

PR updated with proposed solution for json handling (see PR message). Ready for review.

@ruflin ruflin force-pushed the kibana-filebeat-module branch from bb090b7 to 6835c40 Compare May 15, 2018 08:54
@ruflin ruflin force-pushed the kibana-filebeat-module branch from 6835c40 to 273305f Compare May 16, 2018 11:58
@@ -161,6 +161,16 @@ filebeat.modules:
#var.paths:


#------------------------------- kibana Module -------------------------------
- module: {{ module }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... This seems to be a problem of the generator. Do you mind changing it manually now. I am opening a PR with the fix in the meantime.

@@ -0,0 +1,8 @@
- module: {{ module }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this file is problematic.

@@ -0,0 +1,8 @@
- module: {{ module }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one, too.

Copy link
Contributor

@kvch kvch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{{ module }} and {{ fileset }} is not substituted correctly

@ruflin
Copy link
Contributor Author

ruflin commented May 16, 2018

@kvch Fixed. Glad you spotted this.

This adds the Kibana module to Filebeat reading the Kibana log. The Kibana log is in JSON format which simplifies reading it but at the same time it provides many fields which are not necessarily know in advance. To solve this issue The data is put under `kibana.log.meta` and the most common known fields are picked into `kibana.log.*` or directly put into the global field like `message`. The fields under `meta` are stored as keyword. This make sure all the meta information around the event is still in the index but prevents potential type conflicts like long vs double.

Additional change:

* Module tests always overwrite the pipeline. This should make development easier.
@ruflin ruflin force-pushed the kibana-filebeat-module branch from 3a1a4c7 to 9ba1c16 Compare May 17, 2018 06:00
@ruflin
Copy link
Contributor Author

ruflin commented May 17, 2018

@kvch I made 2 additional small changes: Added a beta label to the docs and adjusted the path to read logs from.

@@ -0,0 +1,63 @@
{
"description": "Pipeline for parsing Kibana log logs",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for spotting it quite late, but could you please remove "log" from the description.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@kvch
Copy link
Contributor

kvch commented May 17, 2018

I tested it locally, works like a charm. After that minor problem is fixed, it's ready to be merged.

@tsg
Copy link
Contributor

tsg commented May 17, 2018

Would it be possible to add at least a simple Kibana dashboard? So far all FB modules come with at least a dashboard, and I'd like to keep it that way :)

@ruflin
Copy link
Contributor Author

ruflin commented May 18, 2018

Added Dashboards to the meta issue here: #7036

@kvch kvch merged commit a332ece into elastic:master May 18, 2018
stevea78 pushed a commit to stevea78/beats that referenced this pull request May 20, 2018
* Filebeat Kibana module with log fileset

This adds the Kibana module to Filebeat reading the Kibana log. The Kibana log is in JSON format which simplifies reading it but at the same time it provides many fields which are not necessarily know in advance. To solve this issue The data is put under `kibana.log.meta` and the most common known fields are picked into `kibana.log.*` or directly put into the global field like `message`. The fields under `meta` are stored as keyword. This make sure all the meta information around the event is still in the index but prevents potential type conflicts like long vs double.

Additional change:

* Module tests always overwrite the pipeline. This should make development easier.

* add beta label

* Fix review comment for pipeline
stevea78 pushed a commit to stevea78/beats that referenced this pull request May 20, 2018
* Filebeat Kibana module with log fileset

This adds the Kibana module to Filebeat reading the Kibana log. The Kibana log is in JSON format which simplifies reading it but at the same time it provides many fields which are not necessarily know in advance. To solve this issue The data is put under `kibana.log.meta` and the most common known fields are picked into `kibana.log.*` or directly put into the global field like `message`. The fields under `meta` are stored as keyword. This make sure all the meta information around the event is still in the index but prevents potential type conflicts like long vs double.

Additional change:

* Module tests always overwrite the pipeline. This should make development easier.

* add beta label

* Fix review comment for pipeline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants