WARNING: Version 5.1 of Metricbeat has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Step 2: Configuring Metricbeat
editStep 2: Configuring Metricbeat
editTo configure Metricbeat, you edit the configuration file. For rpm and deb,
you’ll find the configuration file at /etc/metricbeat/metricbeat.yml
. For mac
and win, look in the archive that you just extracted.
Metricbeat uses modules to collect metrics. You configure
each module individually. The following example shows the default configuration
in the metricbeat.yml
file. The system status module is enabled by default to
collect metrics about your server, such as CPU usage, memory usage, network IO
metrics, and process statistics:
metricbeat.modules: - module: system metricsets: - cpu - filesystem - memory - network - process enabled: true period: 10s processes: ['.*'] cpu_ticks: false
The following example shows how to configure two modules: the system module and the Apache HTTPD module:
metricbeat.modules: - module: system metricsets: - cpu - filesystem - memory - network - process enabled: true period: 10s processes: ['.*'] cpu_ticks: false - module: apache metricsets: ["status"] enabled: true period: 1s hosts: ["http://127.0.0.1"]
To configure Metricbeat:
-
Define the Metricbeat modules that you want to enable. For each module, specify the metricsets that you want to collect. See Configuring Metricbeat for more details about configuring modules.
If you accept the default configuration without specifying additional modules, Metricbeat will collect system metrics only.
-
If you are sending output to Elasticsearch, set the IP address and port where Metricbeat can find the Elasticsearch installation:
output.elasticsearch: hosts: ["192.168.1.42:9200"]
If you are sending output to Logstash, see Configuring Metricbeat to Use Logstash instead.