I am trying to send log files from logstash to elasticsearch.
I have completed the whole setup and the test to send the standard input to elasticsearch has passed.
Now, I want to send the file to elasticsearch by specifying the file, but nothing is sent to elasticsearch.
Logstash seems to be working fine.
(At least it's not outputting any errors at runtime.
What do I need to check and fix to send the file to elasticsearch?
Here is the logstash config file that I created.
logstash-sample.conf
input {
#stdin { } <-OK
file {
path => ["/usr/local/elastic/datasets/logstash-tutorial.log"]
}
}
output {
elasticsearch {
hosts => ["http://***. ***. ***. ***:9200"]
index => "test-%{+YYYY.MM.dd}"
}
}
Then, run the following.
/usr/share/logstash/bin/logstash -f /etc/logstash/logstash-sample.conf --config.reload.automatic