Here is an example:
Data in file:
03-27-18 09:32:10,563 [1452] DEBUG AdvancedProperties - No value in: HKEY_LOCAL_MACHINE\SOFTWARE\GlobalSCAPE Inc.\EFT Server 7.0\ReplaceBackslashWithSlashInPathsForFTP, using default: 0
03-27-18 09:32:10,563 [1452] DEBUG AdvancedProperties - No value in: HKEY_LOCAL_MACHINE\SOFTWARE\GlobalSCAPE Inc.\EFT Server 7.0\ReplaceBackslashWithSlashInPathsForFTP, using default: 0
03-27-18 09:32:10,563 [1452] DEBUG AdvancedProperties - No value in: HKEY_LOCAL_MACHINE\SOFTWARE\GlobalSCAPE Inc.\EFT Server 7.0\ReplaceBackslashWithSlashInPathsForFTP, using default: 0
Here is my grok parser:
filter {
if [source] =~ "eft*.log" {
if [message] =~ /^\s*$/ {
drop { }
}
grok{
match => {"message" => "%{DATESTAMP:date},%{NUMBER:msgnum} [%{NOTSPACE:session}] %{LOGLEVEL:src} %{GREEDYDATA:message}"}
}
}
}
Output:
{
"path" => "E:/elastic/logstash/incoming/eft_test.log",
"@version" => "1",
"host" => "SVYAHALKAR2012R2",
"message" => "03-27-18 09:32:10,563 [1452] DEBUG AdvancedProperties - No value in: HKEY_LOCAL_MACHINE\SOFTWARE\GlobalSCAPE Inc.\EFT Server 7.0\ReplaceBackslashWithSlashInPathsForFTP, using default: 0\r",
"@timestamp" => 2018-03-28T00:06:15.545Z
}
Basically, it is not splitting data into different fields and showing up all in message field which is GREEDYDATA. Parsing works in Grok Debugger tool.
Can you please help?
Thanks,
Sachin