Buenas tardes!
Como puedo tener diferentes archivos de entrada con logstash y diferentes filtros.
Yo lo tengo asi y queria saber si es correcto
input {
file{
path => "/home/clusterelastic/cluster/nodo1/logstash-5.5.2/logsaleer/access"
type => "apache_access"
#start_position => "beginning"
sincedb_path => "/dev/null"
}
file{
path => "/home/clusterelastic/cluster/nodo1/logstash-5.5.2/logsaleer/mysql_error.log"
type => "mysql"
}
file{
path => "/home/clusterelastic/cluster/nodo1/logstash-5.5.2/logsaleer/catalina.out"
type => "tomcat"
codec => multiline {
pattern => "(^%{MONTH} %{MONTHDAY}, 20%{YEAR} %{HOUR}:?%{MINUTE}(?::?%{SECOND}) (?:AM|PM))"
what => "previous"
}
}
#file{
#path => "/home/clusterelastic/cluster/nodo1/logstash-5.5.2/logsaleer/localhost_access_log.2017-08-21"
# type => "apache_access"
#}
}
filter {
if [type] in [ "apache" , "apache_access" , "apache-access" ,"access"] {
grok {
match => ["message"," %{IP:clientip} - - [%{NOTSPACE:date} -%{INT}] "%{WORD:action} /%{WORD}/%{WORD}/%{NOTSPACE:login}
%{WORD:protocol}/%{NUMBER:protocolNum}" %{NUMBER:status} %{NUMBER} "%{NOTSPACE}" "%{NOTSPACE:client} (%{WORD}; %{WORD:clientOs}%{GREEDYDATA}"]
}
}
}
output {
#elasticsearch {
#hosts => ["localhost:9200"]
#}
csv{
fields =>["request"]
path =>"/home/clusterelastic/cluster/csv-salida.csv"
}
stdout { codec => rubydebug }
}