-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more context and examples to Filebeat module docs (#5341)
* Remove tutorial * Add more context and examples to module docs * Add fixes from review
- Loading branch information
1 parent
5541503
commit 276d695
Showing
24 changed files
with
800 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[float] | ||
[id="{modulename}-settings"] | ||
==== Variable settings | ||
|
||
The +{modulename}+ module provides the following settings for configuring the | ||
behavior of the module. Each fileset has separate settings. | ||
|
||
If you don’t specify variable settings, the +{modulename}+ module uses the | ||
defaults. | ||
|
||
For more information, see <<specify-variable-settings>>. Also see | ||
<<advanced-settings>>. | ||
|
||
TIP: When you specify a setting at the command line, remember to prefix the | ||
setting with the module name, for example, +{modulename}.{fileset_ex}.var.paths+ | ||
instead of +{fileset_ex}.var.paths+. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[float] | ||
[id="configuring-{modulename}-module"] | ||
=== Configure the module | ||
|
||
You can further refine the behavior of the +{modulename}+ module by specifying | ||
<<{modulename}-settings,variable settings>> in the | ||
+modules.d/{modulename}.yml+ file, or overriding settings at the command line. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
[float] | ||
[id="running-{modulename}-modules"] | ||
=== Set up and run the module | ||
|
||
IMPORTANT: If you’ve secured Elasticsearch and Kibana, you need to configure the | ||
`username` and `password` options in the Elasticsearch output before setting up | ||
and running the module. See | ||
<<elasticsearch-output,Configure the Elasticsearch output>>. | ||
|
||
Before doing these steps, verify that Elasticsearch and Kibana are running and | ||
that Elasticsearch is ready to receive data from {beatname_uc}. | ||
|
||
To set up and run the module: | ||
|
||
. Enable the module: | ||
+ | ||
["source","sh",subs="attributes"] | ||
---------------------------------------------------------------------- | ||
./{beatname_lc} modules enable {modulename} | ||
---------------------------------------------------------------------- | ||
+ | ||
The <<modules-command,`modules enable`>> command enables the +{modulename}+ | ||
config defined in the `modules.d` directory. See | ||
<<configuration-{beatname_lc}-modules>> for other ways to enable modules. | ||
+ | ||
To see a list of enabled and disabled modules, run: | ||
+ | ||
["source","sh",subs="attributes"] | ||
----- | ||
./{beatname_lc} modules list | ||
----- | ||
|
||
|
||
. Set up the initial environment: | ||
+ | ||
["source","sh",subs="attributes"] | ||
---------------------------------------------------------------------- | ||
./{beatname_lc} setup -e | ||
---------------------------------------------------------------------- | ||
+ | ||
The <<setup-command,`setup`>> command loads the recommended index template for | ||
writing to Elasticsearch and deploys the sample dashboards for visualizing the | ||
data in Kibana. This is a one-time setup step. | ||
+ | ||
The `-e` flag is optional and sends output to standard error instead of syslog. | ||
|
||
. Run {beatname_uc}: | ||
+ | ||
["source","sh",subs="attributes"] | ||
----- | ||
./{beatname_lc} -e | ||
----- | ||
+ | ||
If the module is configured correctly, you'll see | ||
`INFO Harvester started` messages for each file specified in the config. | ||
+ | ||
If your logs aren't in the default location, see | ||
<<configuring-{modulename}-module>>, then run {beatname_uc} after you've | ||
configured the module. | ||
+ | ||
NOTE: Depending on how you've installed Filebeat, you might see errors | ||
related to file ownership or permissions when you try to run Filebeat modules. | ||
See {libbeat}/config-file-permissions.html[Config File Ownership and Permissions] | ||
in the _Beats Platform Reference_ if you encounter errors related to file | ||
ownership or permissions. | ||
|
||
. Explore your data in Kibana: | ||
.. Open your browser and navigate to the *Dashboard* overview in Kibana: | ||
http://localhost:5601/app/kibana#/dashboards[http://localhost:5601/app/kibana#/dashboards]. | ||
Replace `localhost` with the name of the Kibana host. | ||
.. If security is enabled, log in with the Kibana username and password that you | ||
used when you set up security. | ||
.. Enter *{modulename}* in the search box, then open a dashboard and explore | ||
the visualizations for your parsed logs. | ||
+ | ||
TIP: If you don’t see data in Kibana, try changing the date range to a larger | ||
range. By default, Kibana shows the last 15 minutes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*`var.paths`*:: | ||
|
||
An array of paths that specify where to look for the log files. If left empty, | ||
Filebeat will choose the paths depending on your operating systems. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
When you run the module, it performs a few tasks under the hood: | ||
|
||
* Sets the default paths to the log files (but don't worry, you can override the | ||
defaults) | ||
* Makes sure each multiline log event gets sent as a single event | ||
* Uses ingest node to parse and process the log lines, shaping the data into a structure suitable | ||
for visualizing in Kibana | ||
* Deploys dashboards for visualizing the log data | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.