Hi ,
I need to merge the information from two log file
ex: From the first log file I am getting some log information and second log file I am getting ID , I want to append that ID with each logs coming from first file..
I am doing it like
input
{
file
{
path => "D:/log_file/insightlogfolder/*"
sincedb_path => "D:/data1.sincedb"
type => "logfile"
start_position => "beginning"
}
file
{
path => "D:/log_file/ID/*"
type => "pidlog"
sincedb_path => "D:/data2.sincedb"
start_position => "beginning"
}
}
filter
{
grok
{
match => [ "message", "%{NUMBER:id}" ]
}
if [type] == "logfile"
{
grok
{
patterns_dir => "D:/log_file/patterns"
match => [ "message", "%{MASTER_LOG}" ]
add_field => { "errorlog" => "errorlog" }
}
}
mutate
{
add_field => { "ID" => "%{id}" }
}
}
But not getting the desired result,
please anyone can help