Step 3: Enable and configure modules
editStep 3: Enable and configure modules
edit-
Identify the modules you need to enable. To see a list of available modules, run:
metricbeat modules list
metricbeat modules list
./metricbeat modules list
metricbeat modules list
./metricbeat modules list
PS > .\metricbeat.exe modules list
-
From the installation directory, enable one or more modules. If you accept the default configuration without enabling additional modules, Metricbeat collects system metrics only.
The following command enables the
apache
andmysql
configs in themodules.d
directory:metricbeat modules enable apache mysql
metricbeat modules enable apache mysql
./metricbeat modules enable apache mysql
metricbeat modules enable apache mysql
./metricbeat modules enable apache mysql
PS > .\metricbeat.exe modules enable apache mysql
See the modules command to learn more about this command. If you are using a Docker image, see Run Metricbeat on Docker.
-
In the module configs under
modules.d
, change the module settings to match your environment. See Standard config options for more about available settings.
To test your configuration file, change to the directory where the Metricbeat binary is installed, and run
Metricbeat in the foreground with the following options specified: ./metricbeat test config -e
. Make sure
your config files are in the path expected by Metricbeat (see
Directory layout), or use
the -c
flag to specify the path to the config file.
For more information about configuring Metricbeat, also see:
- Configure Metricbeat
- Config file format
-
metricbeat.reference.yml
: This reference configuration file shows all non-deprecated options. You’ll find it in the same location asmetricbeat.yml
.