filebeat.prospectors:
- paths: ["/home/ec2-user/filebeat/app1.log"]
fields:
type: "app1"
- paths: ["/home/ec2-user/filebeat/app2.log"]
fields:
type: "app2"
setup.template.settings:
index.number_of_shards: 3
index.codec: best_compression
#_source.enabled: false
setup.template.name: "logs-%{+yyyy.MM.dd}"
setup.template.pattern: "logs-*"
setup.template.enable: true
setup.template.overwrite: true
output.elasticsearch:
hosts: ["xxx"]
index: "logs-%{+yyyy.MM.dd}"
indices:
- index: "app1-%{+yyyy.MM.dd}"
when.contains:
fields.type: "app1"
- index: "app2-%{+yyyy.MM.dd}"
when.contains:
fields.type: "app2"
this config only setup logs-%{+yyyy.MM.dd}
how to setup both app1-%{+yyyy.MM.dd},app2-%{+yyyy.MM.dd}?