Logstash using default template instead of the one I added

when booting up logstash, i can't find the template for ES I added and I get:

 [2019-02-18T21:24:30,994][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
 [2019-02-18T21:24:31,009][INFO ][logstash.outputs.elasticsearch] Attempting to install template {...}

So I get that there's no path specified for the logstash template, but where do I specify the path? And if I'm using a container, do I specify the ES link ie. localhost:9200/_template/logstash ? or a file path?

You would supply it using the template option on the elasticsearch output. I am surprised you get that message given what the code looks like.

I've specified the path, but I'm getting the following error.

  # This setting must be a path
  # File does not exist or cannot be opened /etc/logstash/logstash_index.template.json
  template => "/etc/logstash/logstash_index.template.json"

I've given permissions to all folders and the template itself. I'm running logstash on a docker container.

I have never used docker, but I have seen several times people posting about failure to open files in docker images where the issue was that they didn't map the file into the image.

Yes thank you, the template wasn't being mounted to the container properly. That solved the issue.

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