If you create the two rollover indices and replace the index pattern in the example given with the write aliases and set the tag in the when condition, does it not work (have not tried)?
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: udp
host: "10.0.101.15:10514"
tags: ["voice"]
fields:
type: "voice"
- type: udp
host: "10.0.101.15:10515"
tags: ["viprinet"]
fields:
type: "viprinet"
- type: udp
host: "10.0.101.15:10516"
tag: ["smb1"]
fields:
type: "smb1"
#================================ Outputs =====================================
# Configure what output to use when sending the data collected by the beat.
setup.ilm.enabled: true
#setup.ilm.policy_name: "%{[fields.type]}"
#setup.ilm.rollover_alias: "%{[fields.type]}"
#setup.ilm.pattern: "%{[fields.type]}-{now/d}-000001"
setup.ilm.overwrite: true
setup.template.name: "%{[fields.type]}"
setup.template.pattern: "%{[fields.type]}-*"
setup.template.overwrite: true
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
indices:
- index: "voice"
when.contains:
fields.type: "voice"
- index: "viprinet"
when.contains:
fields.type: "viprinet"
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.