Configuring Filebeat processors changes events before they leave the host, which reduces downstream noise and adds the metadata that search, dashboards, and alert rules need to stay useful. Applying field cleanup, tagging, and metadata enrichment at the agent edge also avoids repeating the same work later in Logstash or ingest pipelines.
Filebeat runs processors in order for each event. Elastic's current processor model still supports a top-level processors list that affects every event, a per-input processors list that affects only one input, and module-specific processors under the module's input section when a module needs different handling from the rest of the agent.
On package-based Linux installs, processor changes usually live in /etc/filebeat/filebeat.yml and require a successful filebeat test config before the service is restarted. The config test confirms that YAML structure and processor settings are valid, but it does not prove that a condition matches the intended events or that downstream outputs, ingest pipelines, and dashboards will interpret the changed fields as expected.
$ sudo cp /etc/filebeat/filebeat.yml /etc/filebeat/filebeat.yml.bak
Restoring the previous settings is faster when a later config test fails or a field change breaks downstream parsing.
$ sudoedit /etc/filebeat/filebeat.yml
processors:
- add_host_metadata:
cache.ttl: 5m
- drop_fields:
fields:
- log.offset
- agent.ephemeral_id
ignore_missing: true
Keep field-removal or rename processors near the end of the list so earlier processors can still read the original event data.
drop_fields cannot remove @timestamp or type.
filebeat.inputs:
- type: filestream
id: app-logs
enabled: true
paths:
- /var/log/app/*.log
processors:
- add_fields:
target: ''
fields:
ingest_source: app_logs
Elastic's current processor documentation still limits module-scoped processors to the module's input section rather than the module root.
Related: How to configure Filebeat inputs
$ sudo filebeat test config -c /etc/filebeat/filebeat.yml Config OK
Related: How to test a Filebeat configuration
$ sudo systemctl restart filebeat
$ sudo filebeat export config -c /etc/filebeat/filebeat.yml | sed -n '/^processors:/,/^output:/p'
processors:
- add_host_metadata:
cache:
ttl: 5m
- drop_fields:
fields:
- log.offset
- agent.ephemeral_id
ignore_missing: true
filebeat export config shows the fully merged runtime configuration, so it is useful for checking inheritance and normalized YAML output after edits.
$ sudo systemctl is-active filebeat active