I am newbie to ELK, I am trying to send the SAP hybris logs to elasticsearch from logstash on the server
input {
file {
path => "/hybris/log/hybris*.log"
type => "hybris"
start_position => "beginning"
}
file {
path => "/hybris/log/access*.log"
type => "hybris_access"
start_position => "beginning"
}
}
filter {
if [type] == "hybris" {
grok {
match => [
"message",
"^\s*%{TIMESTAMP_ISO8601:logdate}\s*\[%{LOGLEVEL:loglevel} \|\[%{IP:client_ip}\] \|%
{WORD:sessionid}\|%{NOTSPACE:classname}\]"
]
}
date {
match => [ "logdate", "ISO8601" ]
remove_field => ["logdate"]
}
multiline {
pattern => "^\s*%{TIMESTAMP_ISO8601}"
negate => true
what => "previous"
periodic_flush => true
}
}
if [type] == "hybris_access" {
grok {
match => [
"message",
"^%{IP:client_ip}.*\[%{DATA:logdate}\].* %{WORD:sessionid}$"
]
}
date {
# [16/Mar/2016:17:51:17 +0100]
match => [ "logdate", "dd/MMM/yyyy:HH:mm:ss Z" ]
remove_field => ["logdate"]
}
}
}
output {
elasticsearch {
hosts => "<elkIP>:9200"
index => "hybrislogs"
}
}
I see the below logs from logstash
{:timestamp=>"2017-12-13T12:58:22.675000+0000", :message=>"Defaulting pipeline worker threads to 1 because there are some filters that might not work with multiple worker threads", :count_was=>4, :filters=>["multiline"], :level=>:warn}
please advise, Am I doing anything wrong?
Versions:
logstash - logstash-2.2.4
kibana-4.4.2-1.x86_64
elasticsearch-2.4.6-1.noarch