I am trying to add fields.type of a pipeline to my index but for some reason is not resolving and data is going in against one single index i.e. index-other.
filebeat.inputs:
- type: log
enabled: true
paths:
- /usr/share/apps/logs/*.log
exclude_lines: ['Aaaa:','Bbbb:','Cccc:']
fields:
tags: ["tag-1","tag-2"]
type: "logs"
fields_under_root: true
setup.ilm.enabled: false
setup.template.name: "index"
setup.template.pattern: "index-*"
output.elasticsearch:
hosts: '${ELASTICSEARCH_HOSTS:xx-xx-xx-xx:9200}'
index: "index-%{[fields.type]:other}"
I am getting all my data against index-other in ES. However I should get it against index-logs.
I need help here. What is wrong with my config?