I have configured logstash pipeline to report to elastic. I am able to read the log files. My log files contain multiline messages, but each line is being reported as one message to elastic.Following is my logstash configuration file
LogConf file:
input {
file {
path => ["abc.log" ]
start_position => "beginning"
codec => multiline
{
pattern => "^%{LOGLEVEL}"
negate => "false"
what => "next"
}
}
}
filter {
}
output {
# only for debug purposes
stdout {
codec => rubydebug
}
elasticsearch {
hosts => ["http://abcd:9200"]
index => "logstash"
}
}
Log file:
DEBUG - LogBO={
message:############ ##############
------------>>!User Info[################################]
------------>>!Debug Info[ ############################# ]
***************isABCEnabled*********************true
}
DEBUG - LogBO={
message:############ ##############
------------>>!User Info[################################]
------------>>!Debug Info[ ############################# ]
***************isABCEnabled*********************true
}
I am able to see the logs getting reported to Elastic, but as each line of log is a separate message. I want whole log
DEBUG - LogBO={
message:############ ##############
------------>>!User Info[################################]
------------>>!Debug Info[ ############################# ]
***************isABCEnabled*********************true
}
to be reported as a single message to Elastic.Please help me fixing the issue.
Please help me fixing this issue.