Hi,
I need help with sending the timestamp of the log properly to the elastic search via logstash.
My log looks like:
Thu Feb 2 07:24:00 2017 - [Client: WIFI-US001NW5 IPAddress: 10.29.24.6] - [User-Name: johndoe] - [Authentication Type: ntlm_auth] - User 'johndoe' is not a member of AD groups 'TX_WIFI Groups'
My logstash grok pattern looks like:
filter {
if [type] == "log" {
grok {
match => { "message" => "%{DAY:day} %{MONTH:month} %{MONTHDAY:monthday} %{TIME:time} %{YEAR:year} - [%{NOTSPACE:removed}: %{NOTSPACE:radius_clientname} %{NOTSPACE:removed}: %{IP:ipaddress}] - [%{NOTSPACE:removed}: %{NOTSPACE:Username}] - [%{NOTSPACE:removed} %{NOTSPACE:removed}: %{NOTSPACE:AUTHTYPE}] - %{GREEDYDATA:Message}" }
}
mutate {
add_field => {
"timestamp" => "%{monthday}/%{month}/%{year}:%{time}"
}
}
date {
locale => "en"
timezone => "UTC"
match => ["timestamp", "dd/MMM/yyyy:HH:mm:ss.SSSSSS"]
target => "@timestamp"
remove_field => ["timestamp", "monthday", "year", "month", "day", "time"]
}
}
}
But I am not able to get the proper timestamps from the logs. Instead of that I get the timestamp that logstash processed the log.
Can any one help what is the issue?