input {
file {
path => "C:\Users\Micronet1\Desktop\logstash-acess\Main.log"
codec => multiline {
pattern => "^%{TIMESTAMP_ISO8601}"
negate => true
what => previous
}
}
}
filter {
if [path] == "Main" {
grok {
match => { "message" => "%{DATA:time} %{LOGLEVEL:level} \[%{DATA:class}\] %{JAVACLASS:class}%{DATA:method}:%{GREEDYDATA:syslog_message}"}
}
}
}
output {
elasticsearch {
hosts => [ "localhost:9200" ]
index => "logstash-*"
}
stdout { codec => rubydebug }
}