Hi
I'm running several logstash instances, each one parsing logs from one application.
On each instance, I grok to get all fields I need, before indexing them on elasticsearch.
As each logstash is isolated from others, I was wondering if there's a feature to define the elasticsearch template/mapping each application should use WITHIN LOGSTASH, instead of creating it manually.
eg: setting number/date format, and analyzed from LS
Update:
Just realized there's something that could do the trick: https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-template
Unfortunately, this doesn't seem to work:
template => "%{[@metadata][template]}"
output {
elasticsearch {
# This setting must be a path
# File does not exist or cannot be opened %{[@metadata][template]}
template => "%{[@metadata][template]}"
...
}
}
Hope I explained myself properly.
Thanks in advance.