I have a log like this
{"log":"{\"@timestamp\":\"2021-06-01T02:08:25.7387857-04:00\",\"level\":\"Information\",\"messageTemplate\":\"Got patients request\",\"message\":\"Got patients request
I am trying to parse date with grok and date filters and this how my filters are written
grok {
match => { "message" => ".*%{TIMESTAMP_ISO8601:log_date}.*level.*%{LOGLEVEL:LogType}.*messageTemplate\\\"\:\\"\.*%{GREEDYDATA:LogMessage}.*message.*\\\"AppName.*\"%{WORD:ApplicationName}\\\".*" }
}
date {
locale => "en"
match => ["log_date", "ISO8601"]
timezone => "America/Anguilla"
target => "log_date"
}
I am getting output like this "log_date" => 0021-06-01T06:08:25.738Z 2021-06-where year field is 0021 instead of 2021 and hour field is 06 instead of 02 despite adding timezone => "America/Anguilla".
Because of this I am not able to plot the date histogram properly in kibana.
Can someone quickly help me on this? Thanks.