Modules Configurationedit

The metricbeat.modules section of the metricbeat.yml config file contains an array with the enabled modules. The following example shows a configuration where the Apache and MySQL modules are enabled:

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 Optionsedit

You can specify the following options in the metricbeat section of the metricbeat.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 Modules section for more info about the available modules, the metricsets that they support, and any additional module-specific configuration info.

moduleedit

The name of the module to run.

metricsetsedit

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.

enablededit

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.

periodedit

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

hostsedit

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

fieldsedit

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

tagsedit

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

filtersedit

A list of filters to apply to the data generated by the module. For more detail on how to configure filters, see Processors Configuration.