I use elk (elasticsearch, logstash and kibana) in docker. In logstash I have got input.conf and output.conf. All works fine, but I don't add any grok filters.. If I try add it to input.conf or create new file "filter.conf" but logstash don't see these filters.
My input.conf
input {
file {
type => "test"
path => [
"/host/var/log/test.log"
]
}
}
My output.conf
output {
elasticsearch {
hosts => ["localhost"]
}
}
My filter:
filter {
grok {
type => "test"
match => [ "%{IP:client}, "%{WORD:method}", "%{URIPATHPARAM:request}", "%{NUMBER:bytes}", "%{NUMBER:duration}" ]
}
}
Example of log, which is save in test.log: echo 51.0.50.1 POST /index.html 15824 0.049 >> var/log/test.log
What's wrong in this configuration?