My log format is like,
02.11.2017,11:33:13,DDIC,6,192.168.2.110,PFCG,SAPMSYST SAPMSYST1,Logon Successful (Type=A)
My filter is like,
filter {
grok{
match=>{
"message"=>"%{NOTSPACE:date},%{NOTSPACE:time},%{WORD:user},%{NUMBER:riskindex},%{IP:terminal},%{NOTSPACE:tcode},%{GREEDYDATA:program},%{GREEDYDATA:messagetext}"
}
add_field=>{
"eventName"=>"grok"
}
}
}
& I am getting output in elastic is as below,
{
"date" => "02.11.2017",
"terminal" => "192.168.2.110",
"program" => "SAPMSYST SAPMSYST1",
"message" => "02.11.2017,11:33:13,DDIC,6,192.168.2.110,PFCG,SAPMSYST SAPMSYST1,Logon Successful (Type=A)\r",
"type" => "logs",
"riskindex" => "6",
"tcode" => "PFCG",
"path" => "D:\logfile\test.log",
"@timestamp" => 2017-11-07T09:48:41.835Z,
"messagetext" => "Logon Successful (Type=A)\r",
"@version" => "1",
"host" => "GLT-D103",
"eventName" => "grok",
"time" => "11:33:13",
"user" => "DDIC"
}
Expected output for me is,
{
"date" => "02.11.2017",
"terminal" => "192.168.2.110",
"program" => "{"grp1":"SAPMSYST",
"grp2":"SAPMSYST1"}",
"message" => "02.11.2017,11:33:13,DDIC,6,192.168.2.110,PFCG,SAPMSYST SAPMSYST1,Logon Successful (Type=A)\r",
"type" => "logs",
"riskindex" => "6",
"tcode" => "PFCG",
"path" => "D:\logfile\test.log",
"@timestamp" => 2017-11-07T09:48:41.835Z,
"messagetext" => "Logon Successful (Type=A)\r",
"@version" => "1",
"host" => "GLT-D103",
"eventName" => "grok",
"time" => "11:33:13",
"user" => "DDIC"
}
If anyone could point out my oversite or redirect my efforts, it would be greatly appreciate it.
Thanks