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 modules dev guide #3616

Merged
merged 2 commits into from
Feb 23, 2017
Merged

Conversation

tsg
Copy link
Contributor

@tsg tsg commented Feb 17, 2017

Basic guide for creating a new module.

Part of #3159.

@tsg tsg added docs in progress Pull request is currently in progress. labels Feb 17, 2017
@tsg tsg mentioned this pull request Feb 17, 2017
22 tasks
@tsg tsg force-pushed the filebeat_modules_dev_guide branch from 3d474d2 to d0ef8e4 Compare February 21, 2017 09:31
@tsg tsg added needs_backport PR is waiting to be backported to other branches. review and removed in progress Pull request is currently in progress. labels Feb 21, 2017
Basic guide on creating new filebeat modules.
@tsg tsg force-pushed the filebeat_modules_dev_guide branch from d0ef8e4 to 4e24cbc Compare February 21, 2017 14:17
Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

I left some minor comments. I really like the tutorial style documentation.

All Filebeat modules currently live in the main
https://github.com/elastic/beats[Beats] repository. To clone the repository and
build Filebeat (which you will need for testing), please follow the general
Beats https://github.com/elastic/beats/blob/master/CONTRIBUTING.md[CONTRIBUTING]
Copy link
Contributor

Choose a reason for hiding this comment

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

Not only related to this guide, but we should probably have contributing as part of the docs to also have it specific to a version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we should probably move that to the docs.

There's quite a lot going on in the above, so let's break it down:

* The name of the variable is `paths` and the default value is
`["/example/test.log*"]`.
Copy link
Contributor

Choose a reason for hiding this comment

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

It could be confusing that here the compact array form is used, but above it the example not. For people familiar with Yaml, it is obvious.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I rephrased it to avoid having to use the compact form.

[source,yaml]
----
ingest_pipeline: ingest/pipeline.json
prospectors: config/testfileset.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

Just realising it now that this should probably be singular prospector as now only one prospector can be defined.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, that's wrong here in the docs.

pattern: "^# User@Host: "
negate: true
match: after
input_type: log
Copy link
Contributor

Choose a reason for hiding this comment

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

input_type: log exists twice

[source,shell]
----
$ cd filebeat/module/{module}/
python ../dev-tools/export_dashboards.py --regex {module} --dir _meta/kibana
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the path to the dev-tools needs a few more ../

@ruflin ruflin merged commit 5c8215f into elastic:master Feb 23, 2017
tsg added a commit to tsg/beats that referenced this pull request Feb 23, 2017
Basic guide on creating new filebeat modules.
(cherry picked from commit 5c8215f)
@tsg tsg removed the needs_backport PR is waiting to be backported to other branches. label Feb 23, 2017
ruflin pushed a commit that referenced this pull request Feb 24, 2017
Basic guide on creating new filebeat modules.
(cherry picked from commit 5c8215f)
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.

2 participants