this is my conf file and it's ok i've created an index with only errors match
but now it's possible create a second indexs with file warning or custom?
code => "event.cancel if not event.get('message').include? 'WARN' "
.....
elasticsearch {
hosts => ["elasticsearch:9200"]
index => "warn" ?????? other index file??? is possible
}
my file logstash.conf
input {
file {
path => [ "/logstash_dir/P1/*.*",
"/logstash_dir/P2/*.*" ]
start_position => "beginning"
}
}
filter {
ruby {
code => "event.cancel if not event.get('message').include? 'ERROR' "
}
}
output {
elasticsearch {
hosts => ["elasticsearch:9200"]
index => "errors"
}
stdout { codec => rubydebug }
}