hello,
im trying to get a logstash config file,
that can parse syslogs and apachelogs too,
the following conf shows up in a result:
Error: Expected one of #, => at line 37, column 17 (byte 722)
but i didnt changed the output,
it was always like this,
just added the
if "_grokparsefailure" in [tags] {
mutate {
type => "apache" }
}}
and suddenly i get the error,
nothing changed in the output,
how can be there errors now ?
pls help me
input {
lumberjack {
# The port to listen on
port => 5000
# The paths to your ssl cert and key
ssl_certificate => XXX"
ssl_key => "XXX"
}
}
filter {
if [type] == "syslog" {
grok {
match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program} %{GREEDYDATA:syslog_message}" }
}
if "_grokparsefailure" in [tags] {
mutate {
type => "apache" }
}
else if [type] == "apache" {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" } }
}
if "_grokparsefailure" in [tags] {
mutate {
type => "syslog" }
}
output {
elasticsearch { host => localhost }
stdout { codec => rubydebug } }