Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 1.44 KB

metricbeat-filtering.asciidoc

File metadata and controls

50 lines (40 loc) · 1.44 KB

Filtering the Exported Data

When your use case requires only a subset of the data exported by Metricbeat, you can use Metricbeat config options to filter the data, or you can use the generic filtering provided by libbeat.

Metricbeat Module Filtering

Each module accepts a list of filters in its configuration. These filters are applied to the data generated by the module. These filters are applied to the module data prior to the addition of the common beat fields like beat.hostname and type so they can only be used to filter fields from the module.

The following example reduces the exported fields of the Redis module to include only the redis.info.memory fields.

metricbeat.modules:
- module: redis
  metricsets: ["info"]
  period: 1s
  hosts: ["127.0.0.1:6379"]
  enabled: true
  filters:
    - include_fields:
       fields: ['redis.info.memory']

Generic Filtering

For example, the following filters configuration reduces the exported fields by dropping the beat.name and beat.hostname fields under beat, from all documents.

filters:
 - drop_fields:
    fields: ['beat']

See filter configuration options for more information.