Logstash conf file is not creating an index in ES

Logstash conf file is not creating an index in ES when using docker-compose. This is my logstash.conf code, can anyone help me figure out the solution?

input{
    elasticsearch {
    		hosts => "elasticsearch:9200"
    		user => "elastic"
    		password => "changeme"
    	}
    file {
        path => "<path of logFile on local desktop>/logFile.txt"
        start_position => "beginning"
    }
}

output{
    elasticsearch{
    hosts => "elasticsearch:9200"
    user => "elastic"
    password => "changeme"
    index => "sample" 
}

input section looks weird. it has Elasticsearch and file both as input. is that correct?

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