How to escape if row separator is there in the data.Field is enclosed.
245544007,247794,6/15/2016 11:46,Your Account is verified with Pan Card. Now you can make payments and do more with your account. Thank you! for verifying your account.,1,0,0,,INFOGN,124132,106.220.26.57,0,1
245543992,274603,6/15/2016 11:46,"We provide
Corporate Identity, Logo, Brochures, Website, E-Commerce, Android Application development & Bulk email Marketing Service.
Regards,
Ashok Mathur
Gdesign Studioo
9166335222",2,0,0,,,p245543950,115.252.210.248,0,1
input{
file{
delimiter=>"
"
path => ["/apps/samplelogs/EMPTY/tl_sent/*"]
start_position => "beginning"
type=>"_SENT"
close_older=>"300"
max_open_files=>"5000"
discover_interval=>5
ignore_older=>172800
sincedb_path=>"/apps/sincedb/sin.log"
}
}
filter{
if [message] =~ /^\s*$/ {
drop { }
}
csv { quote_char => '"'
separator=>","
autogenerate_column_names=>"false"
columns=>["id","userid","date","message_str","howmany","groupid","totalcredits","sched","origin","url","ipaddress","processing","groupMemberCount"]
}
if[date] and [date]!='null' and [date]!='NULL'{
date {
match => [ "date", "MM/dd/yyyy HH:mm" ]
target =>"date"
timezone=>"Asia/Kolkata"
}
grok {
match => { "date" => "(?<txttlsentindexdate>[0-9]{4}\-[0-9]{2})"}
}
}
if![date] or [date]=='null' or [date]=='NULL'{
grok {
match => { "@timestamp" => "(?<txttlsentindexdate>[0-9]{4}\-[0-9]{2})"}
}
ruby {
code => "event['date'] = nil"
}
}
mutate {
convert => { "id" => "integer" }
convert => { "userid" => "integer" }
convert => { "howmany" => "integer" }
convert => { "groupid" => "integer" }
convert => { "totalcredits" => "integer" }
}
}
output{
stdout{codec=>rubydebug}
}
Thanks in advance.