Is your goal to have a different index template for each possible value of app_name? As written I don't think what you're trying is possible (template patterns can't refer to event fields), but it's also rarely necessary. If the template pattern is "filebeat-*" then your output.elasticsearch.index setting should send everything to the correct index, and the different indices will all share a common index template, which is usually what you want.
If you do have a particular situation that depends on distinct index templates though, feel free to share more details and we can try and find a workaround
Thanks, your reply makes sense - " If the template pattern is "filebeat-*" then your output.elasticsearch.index setting should send everything to the correct index, and the different indices will all share a common index template, which is usually what you want."
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.