I\'d like to import a text file in Elasticsearch. The text file contains 3 values per line. After spending several hours of struggling, I didn\'t get it done. Help is greatly ap
Simply put this in a file called grok.conf
:
input {
file {
path => "/path/to/your/file.log"
start_position => beginning
sincedb_path => "/dev/null"
}
}
filter {
grok {
match => {"message" => "%{WORD:username} %{WORD:email} %{WORD:hash}" }
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
}
}
Then run Logstash with bin/logstash -f grok.conf
and you should be ok.