I found that the filter plugin can't filter wrong format message and all data would output to the elasticsearch.
If I want to filter out wrong data let wrong data can't output to the elasticsearch ,how can I do.
this is my conf:
input {
stdin { }
}
filter {
if[type]=="syslog"{
grok {
match => { "message" => '<%{NONNEGINT:syslog_pri}>%{GREEDYDATA:fgtlogmsg}'
}
}
kv {
source => "fgtlogmsg"
}
syslog_pri { }
}
}
output {
elasticsearch { hosts => ["localhost:9200"] }
stdout { codec => rubydebug }
}
if I input message such as "123456Test", it also output to the elasticsearch
thank you in advance