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

[Docs] Document how to use modules.d directory #4973

Merged
merged 2 commits into from
Sep 5, 2017

Conversation

dedemorton
Copy link
Contributor

Adds docs about modules.d for #4537

I didn't go into a lot of detail about how the modules enable/disable commands change the name of the config files because that seems like an implementation detail. But let me think if the layout needs more description. I also reworked some stuff in the other docs because it made sense to do it now.

[[modules-tutorial]]
=== Tutorial

//REVIEWERS: Now that we have a section about specifying which modules to run (where I describe how to override settings) plus a Quick start for common log formats, the info in this tutorial is a bit redundant. I do think a more in-depth tutorial that shows a realistic use case would be pretty useful here. It could even show path overrides and prospector settings, but it wouldn't have to describe all the permutations because we do that in the reference section. IMO a streamlined version of this tutorial focused on specific user goals and built around a compelling story would be more useful. If someone can provide me with the "story" for this tutorial, I can write it up. Any volunteers?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tsg Adding you as a reviewer because I'd specifically like your input on this question. I think you wrote the original version of the tutorial.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I agree this is likely not needed anymore. I'm not sure what the overlap between the getting started and the FBM tutorial is at the moment. If the Getting Started focuses on the "add your own prospector" experience, then we could keep this one, maybe simplified.

I'm not sure what sort of story do you have in mind, maybe something like you have a LAMP stack and you monitor linux logs (system module), Apache logs (apache2 module) and Mysql logs (mysql module)?

@dedemorton dedemorton mentioned this pull request Aug 23, 2017
4 tasks
@@ -148,6 +160,9 @@ cannot install the plugins, you can use the following:
./filebeat -e -modules=nginx -M "nginx.access.var.pipeline=no_plugins"
----------------------------------------------------------------------


//REVIEWERS: Is no_plugins still a thing?
Copy link
Contributor

Choose a reason for hiding this comment

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

No, that's not an option anymore, we should remove it.

@@ -81,20 +84,28 @@ example:
----------------------------------------------------------------------
./filebeat -e -modules=system,nginx,mysql
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we update -modules to --modules? there are several occurrences on this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yah, I haven't changed much in the getting started because it sounds like our plans for the getting started experience are still in flux. But since you mentioned it, beta 2 users might find the discrepancy a little confusing, so maybe I should go ahead and change them now.

@dedemorton dedemorton added the needs_backport PR is waiting to be backported to other branches. label Aug 26, 2017
The default module configurations assume that the logs you’re harvesting are
in the location expected for your OS and that the default behavior of Filebeat
is appropriate for your environment. To change the default settings, you need
to specify variable overrides. See <<override-variables>>.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather recommend here to edit the modules.d/*.yml files, instead of using CLI to overwrite settings. The main point of splitting the huge configuration file into smaller ones is that they are easier to edit.

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 thought the main purpose of the modules.d dir was to make it easier to enable/disable specific configs. But anyhow, the topic this points to does discuss changing the config before it mentions the command-line overrides. I will change the language in this sentence to make this a bit more clear, tho.

command requires the `modules.d` layout.

To enable specific modules in the +{beatname_lc}.yml+ config file, you can add
entries to the `filebeat.modules` list. Each entry in the list begins with a
Copy link
Contributor

Choose a reason for hiding this comment

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

Most of this file uses the {beatname_lc} variables, but here filebeat is used by the name.

Copy link
Contributor Author

@dedemorton dedemorton Sep 2, 2017

Choose a reason for hiding this comment

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

yah, I'm trying to use the variable in places where I think the name could change (like in the name of the config file). Doesn't hurt to use it here, tho, so I've changed it. Someday I'll do a cleanup and use it everywhere, but since we haven't used the asciidoc variables consistently from the beginning, we'll need to do some cleanup anyhow.

@dedemorton dedemorton merged commit 96a33df into elastic:master Sep 5, 2017
dedemorton added a commit to dedemorton/beats that referenced this pull request Sep 5, 2017
* [Docs] Document how to use modules.d directory

* Add changes from review
@dedemorton dedemorton removed the needs_backport PR is waiting to be backported to other branches. label Sep 5, 2017
tsg pushed a commit that referenced this pull request Sep 7, 2017
* [Docs] Document how to use modules.d directory (#4973)

* [Docs] Document how to use modules.d directory

* Add changes from review

* Add upgrading guide docs (#5068)

* Add upgrading guide docs

Part of / related to #4737.
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…#5103)

* [Docs] Document how to use modules.d directory (elastic#4973)

* [Docs] Document how to use modules.d directory

* Add changes from review

* Add upgrading guide docs (elastic#5068)

* Add upgrading guide docs

Part of / related to elastic#4737.
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