[[configuration-metricbeat]]
=== Modules Configuration

The `metricbeat.modules` section of the +{beatname_lc}.yml+ config file contains an array with the enabled <<metricbeat-modules,modules>>. The following example shows a configuration where the Apache and MySQL modules are enabled:

[source,yaml]
------------------------------------------------------------------------------
metricbeat.modules:

#---------------------------- Apache Status Module ---------------------------
- module: apache
  metricsets: ["status"]
  enabled: true
  period: 1s
  hosts: ["http://127.0.0.1/"]

#---------------------------- MySQL Status Module ----------------------------
- module: mysql
  metricsets: ["status"]
  enabled: true
  period: 2s
  hosts: ["root@tcp(127.0.0.1:3306)/"]
------------------------------------------------------------------------------

==== Metricbeat Options

You can specify the following options in the `metricbeat` section of the +{beatname_lc}.yml+ config file. These options
are the same for all modules. Each module may have additional configuration options that are specific to that module.
See the <<metricbeat-modules>> section for more info about the available modules, the metricsets that they support,
and any additional module-specific configuration info.

===== module

The name of the module to run. 

===== metricsets

A list of metricsets to execute. Make sure that you only list metricsets
that are available in the module. It is not possible to reference metricsets from other modules.

===== enabled

A Boolean value that specifies whether the module is enabled. If you use the default config file, `metricbeat.yml`,
the System module is enabled (set to `enabled: true`) by default. If the `enabled` option is missing from the
configuration block, the module is enabled by default.

===== period

How often the metricsets are executed. If a system is not reachable, Metricbeat returns an error for each period. This setting is required.

===== hosts

A list of hosts to fetch information from. For some metricsets, this setting is optional.

===== fields

A dictionary of fields that will be sent with the metricset event. This setting is optional. 

===== tags

A list of tags that will be sent with the metricset event. This setting is optional. 

===== filters

deprecated[5.1,This option will be renamed and changed in a future release]

A list of filters to apply to the data generated by the module. 

include::../../../../libbeat/docs/generalconfig.asciidoc[]

include::../../../../libbeat/docs/outputconfig.asciidoc[]

include::../../../../libbeat/docs/shared-path-config.asciidoc[]

include::../../../../libbeat/docs/loggingconfig.asciidoc[]

include::../../../../libbeat/docs/processors-config.asciidoc[]

