Hi Team,
I am working two sets of logs, with different timestamp files and i am not able to parse them
Format 1: 2018-Dec-18 08:18:21,531
Logstash conf
match => { "message" => "%{YEAR:year}-%{MONTH:month}-%{MONTHDAY:day} %{TIME:time},%{NUMBER:z}" }
overwrite => [ "message" ]
}
mutate {
add_field => { "timestamp" => "%{year}-%{month}-%{day} %{time},%{z}" }
}
date {
match => [ "timestamp" , "EEE MMM dd HH:mm:ss y", "EEE MMM dd HH:mm:ss ZZZ yyyy", "EEE MMM d HH:mm:ss ZZZ yyyy", "dd/MMM/yyyy:HH:mm:ss Z", "YYYY-MM-dd HH:mm:ss", "YYYY-MM-dd HH:mm:ss Z", "YYYY-MMM-dd HH:mm:ss", "dd.MM.YY HH:mm:ss", "MMM dd, yyyy hh:mm:ss a", "dd.MM.YY-HH:mm:ss", "MMM dd HH:mm:ss" ]
}
}
Conitnuous grok parse failures...
Format 2: [2018-07-10 01:15:43,195]
since its in square braces, tried creating custome pattern
pattern file:
SAMPLE_TIME [%{YEAR}-%{MONTH}-%{MONTHDAY} %{TIME},%{NUMBER}]
logstash conf:
match => { "message" => "%{SAMPLE_TIME}" }
overwrite => [ "message" ]
}
But no luck with this also..