Hi,
I am trying to add a field to every message of my alert log .
The test has to be extracted from the file name and appended as a field to every log entry.
To do that I am doing:-
if [path] =~ /alert/ {
grok {
match => [ "path","%{WORD:logtype}_%{WORD:sid}.%{WORD.filetype}" ]
}
mutate {
add_field => { "SID" => "%{sid}" }
}
}
But the SID is not appended. Instead,
"@timestamp" => "2015-09-28T16:30:32.000Z",
"path" => "/path/to/file",
"host" => "hostname",
"type" => "oracle_alert_log",
"tags" => [
[0] "multiline",
[1] "_grokparsefailure"
],
"SID" => "%{sid}",
"oradb_status" => "running"
I also tried
match => { "path" => "%{WORD:logtype}_%{WORD:sid}.%{WORD.filetype}" }
But does not work.
Regards,
Debarun.