Step 3: Enable and configure modules
editStep 3: Enable and configure modules
editFilebeat uses modules to collect and parse log data.
-
Identify the modules you need to enable. To see a list of available modules, run:
filebeat modules list
filebeat modules list
./filebeat modules list
filebeat modules list
./filebeat modules list
PS > .\filebeat.exe modules list
Can’t find a module for your file type? Skip this section and configure the input manually.
-
From the installation directory, enable one or more modules. For example, the following command enables the
system
,nginx
, andmysql
module configs:filebeat modules enable system nginx mysql
filebeat modules enable system nginx mysql
./filebeat modules enable system nginx mysql
filebeat modules enable system nginx mysql
./filebeat modules enable system nginx mysql
PS > .\filebeat.exe modules enable system nginx mysql
-
In the module configs under
modules.d
, change the module settings to match your environment.For example, log locations are set based on the OS. If your logs aren’t in default locations, set the
paths
variable:
To see the full list of variables for a module, see the documentation under Modules.
To test your configuration file, change to the directory where the Filebeat binary
is installed, and run Filebeat in the foreground with the following options specified:
./filebeat test config -e
. Make sure your config files are in the path expected by
Filebeat (see Directory layout),
or use the -c
flag to specify the path to the config file.
For more information about configuring Filebeat, also see:
- Configure Filebeat
- Config file format
-
filebeat.reference.yml
: This reference configuration file shows all non-deprecated options. You’ll find it in the same location asfilebeat.yml
.