Is filebeat 6.1.0 support multi templates setup?

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}?

Setting up multiple templates is currently not supported. For these cases you have to load the template manually.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.