Hi, I set up a template file in logstash.conf
output
like this,
output {
elasticsearch {
hosts => ["172.17.0.2:9200"]
manage_template => false
template => "/home/user_name/docker-elk/logstash/core_mapping_template.json"
template_overwrite => true
index => "%{host}-%{[@metadata][log_type]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][log_type]}"
}
stdout { codec => json }
}
the template.json
is in the directory specified above, and logstash
generated the following error,
logstash_1 | {:timestamp=>"2016-08-24T13:12:27.260000+0000", :message=>"Invalid setting for elasticsearch output plugin:\n\n output {\n elasticsearch {\n # This setting must be a path\n # File does not exist or cannot be opened /home/user_name/docker-elk/logstash/core_mapping_template.json\n template => \"/home/user_name/docker-elk/logstash/core_mapping_template.json\"\n ...\n }\n }", :level=>:error}
I have chmod
the json
file to 755
.
I am running ELK
using docker 1.11.2
.
How to fix the issue?
cheers