I'm trying to load a custom elasticsearch template when filebeat starts up. The relevant part of my latest filebeat.yml looks like:
output.elasticsearch:
enabled: true
hosts: ["<%= @elasticsearch %>:443"]
protocol: "https"
index: "audit-%{+yyyyMMdd}"
setup.template:
name: 'audit'
pattern: 'audit-*'
json:
enabled: true
path: 'audit.template.json'
name: 'audit'
enabled: true
settings:
index.number_of_shards: 3
But a default mapping is applied to the index and no template is defined. The docs say the setup.template.json.* options are experimental, so not sure if they do indeed work.
Regardless, how can I load a json template defined in audit.template.json? I've tried every option combination based on reading the docs and can't get it to work.
Thanks.