- Filebeat Reference: other versions:
- Filebeat overview
- Quick start: installation and configuration
- Set up and run
- Upgrade
- How Filebeat works
- Configure
- Inputs
- Modules
- General settings
- Project paths
- Config file loading
- Output
- Kerberos
- SSL
- Index lifecycle management (ILM)
- Elasticsearch index template
- Kibana endpoint
- Kibana dashboards
- Processors
- Define processors
- add_cloud_metadata
- add_cloudfoundry_metadata
- add_docker_metadata
- add_fields
- add_host_metadata
- add_id
- add_kubernetes_metadata
- add_labels
- add_locale
- add_observer_metadata
- add_process_metadata
- add_tags
- community_id
- convert
- copy_fields
- decode_base64_field
- decode_cef
- decode_csv_fields
- decode_json_fields
- decompress_gzip_field
- dissect
- dns
- drop_event
- drop_fields
- extract_array
- fingerprint
- include_fields
- registered_domain
- rename
- script
- timestamp
- translate_sid
- truncate_fields
- urldecode
- Autodiscover
- Internal queue
- Load balancing
- Logging
- HTTP endpoint
- Regular expression support
- Instrumentation
- filebeat.reference.yml
- How to guides
- Override configuration settings
- Load the Elasticsearch index template
- Change the index name
- Load Kibana dashboards
- Load ingest pipelines
- Enrich events with geoIP information
- Deduplicate data
- Parse data by using ingest node
- Use environment variables in the configuration
- Avoid YAML formatting problems
- Beats central management
- Modules
- Modules overview
- ActiveMQ module
- Apache module
- Auditd module
- AWS module
- Azure module
- Barracuda module
- Bluecoat module
- CEF module
- Check Point module
- Cisco module
- CoreDNS module
- Crowdstrike module
- Cylance module
- Elasticsearch module
- Envoyproxy Module
- F5 module
- Fortinet module
- Google Cloud module
- GSuite module
- haproxy module
- IBM MQ module
- Icinga module
- IIS module
- Imperva module
- Infoblox module
- Iptables module
- Juniper module
- Kafka module
- Kibana module
- Logstash module
- Microsoft module
- MISP module
- MongoDB module
- MSSQL module
- MySQL module
- nats module
- NetFlow module
- Netscout module
- Nginx module
- Office 365 module
- Okta module
- Osquery module
- Palo Alto Networks module
- PostgreSQL module
- RabbitMQ module
- Radware module
- Redis module
- Santa module
- Sonicwall module
- Sophos module
- Squid module
- Suricata module
- System module
- Tomcat module
- Traefik module
- Zeek (Bro) Module
- Zscaler module
- Exported fields
- ActiveMQ fields
- Apache fields
- Auditd fields
- AWS fields
- awscloudwatch fields
- Azure fields
- Barracuda Web Application Firewall fields
- Beat fields
- Blue Coat Director fields
- Decode CEF processor fields fields
- CEF fields
- Checkpoint fields
- Cisco fields
- Cloud provider metadata fields
- Coredns fields
- Crowdstrike fields
- CylanceProtect fields
- Docker fields
- ECS fields
- Elasticsearch fields
- Envoyproxy fields
- Big-IP Access Policy Manager fields
- Fortinet fields
- Google Cloud fields
- gsuite fields
- HAProxy fields
- Host fields
- ibmmq fields
- Icinga fields
- IIS fields
- Imperva SecureSphere fields
- Infoblox NIOS fields
- iptables fields
- Jolokia Discovery autodiscover provider fields
- Juniper JUNOS fields
- Kafka fields
- kibana fields
- Kubernetes fields
- Log file content fields
- logstash fields
- Microsoft fields
- MISP fields
- mongodb fields
- mssql fields
- MySQL fields
- NATS fields
- NetFlow fields
- Arbor Peakflow SP fields
- Nginx fields
- Office 365 fields
- Okta fields
- Osquery fields
- panw fields
- PostgreSQL fields
- Process fields
- RabbitMQ fields
- Radware DefensePro fields
- Redis fields
- s3 fields
- Google Santa fields
- Sonicwall-FW fields
- sophos fields
- Squid fields
- Suricata fields
- System fields
- Apache Tomcat fields
- Traefik fields
- Zeek fields
- Zscaler NSS fields
- Monitor
- Secure
- Troubleshoot
- Get help
- Debug
- Common problems
- Can’t read log files from network volumes
- Filebeat isn’t collecting lines from a file
- Too many open file handlers
- Registry file is too large
- Inode reuse causes Filebeat to skip lines
- Log rotation results in lost or duplicate events
- Open file handlers cause issues with Windows file rotation
- Filebeat is using too much CPU
- Dashboard in Kibana is breaking up data fields incorrectly
- Fields are not indexed or usable in Kibana visualizations
- Filebeat isn’t shipping the last line of a file
- Filebeat keeps open file handlers of deleted files for a long time
- Filebeat uses too much bandwidth
- Error loading config file
- Found unexpected or unknown characters
- Logstash connection doesn’t work
- Publishing to Logstash fails with "connection reset by peer" message
- @metadata is missing in Logstash
- Not sure whether to use Logstash or Beats
- SSL client fails to connect to Logstash
- Monitoring UI shows fewer Beats than expected
- Dashboard could not locate the index-pattern
- Contribute to Beats
Configure Elasticsearch index template loading
editConfigure Elasticsearch index template loading
editThe setup.template
section of the filebeat.yml
config file specifies
the index template to use for setting
mappings in Elasticsearch. If template loading is enabled (the default),
Filebeat loads the index template automatically after successfully
connecting to Elasticsearch.
A connection to Elasticsearch is required to load the index template. If the configured output is not Elasticsearch (or Elasticsearch Service), you must load the template manually.
You can adjust the following settings to load your own template or overwrite an existing one.
-
setup.template.enabled
- Set to false to disable template loading. If this is set to false, you must load the template manually.
-
setup.template.name
-
The name of the template. The default is
filebeat
. The Filebeat version is always appended to the given name, so the final name isfilebeat-%{[agent.version]}
.
-
setup.template.pattern
-
The template pattern to apply to the default index settings. The default pattern is
filebeat-*
. The Filebeat version is always included in the pattern, so the final pattern isfilebeat-%{[agent.version]}-*
. The wildcard character-*
is used to match all daily indices.Example:
setup.template.name: "filebeat" setup.template.pattern: "filebeat-*"
-
setup.template.fields
-
The path to the YAML file describing the fields. The default is
fields.yml
. If a relative path is set, it is considered relative to the config path. See the Directory layout section for details. -
setup.template.overwrite
- A boolean that specifies whether to overwrite the existing template. The default is false.
-
setup.template.settings
-
A dictionary of settings to place into the
settings.index
dictionary of the Elasticsearch template. For more details about the available Elasticsearch mapping options, please see the Elasticsearch mapping reference.Example:
setup.template.name: "filebeat" setup.template.fields: "fields.yml" setup.template.overwrite: false setup.template.settings: index.number_of_shards: 1 index.number_of_replicas: 1
-
setup.template.settings._source
-
A dictionary of settings for the
_source
field. For the available settings, please see the Elasticsearch reference.Example:
setup.template.name: "filebeat" setup.template.fields: "fields.yml" setup.template.overwrite: false setup.template.settings: _source.enabled: false
-
setup.template.append_fields
-
A list of fields to be added to the template and Kibana index pattern. This setting adds new fields. It does not overwrite or change existing fields.
This setting is useful when your data contains fields that Filebeat doesn’t know about in advance.
If
append_fields
is specified along withoverwrite: true
, Filebeat overwrites the existing template and applies the new template when creating new indices. Existing indices are not affected. If you’re running multiple instances of Filebeat with differentappend_fields
settings, the last one writing the template takes precedence.Any changes to this setting also affect the Kibana index pattern.
Example config:
setup.template.overwrite: true setup.template.append_fields: - name: test.name type: keyword - name: test.hostname type: long
-
setup.template.json.enabled
-
Set to
true
to load a JSON-based template file. Specify the path to your Elasticsearch index template file and set the name of the template.setup.template.json.enabled: true setup.template.json.path: "template.json" setup.template.json.name: "template-name
If the JSON template is used, the fields.yml
is skipped for the template
generation.