The basic issue is when I try and replace @timestamp with another date setting the timezone option all other dates are 5 hours off in Kibana because they are stored without a timezone and Kibana assumes they must be UTC.
More detail using sample data...
csv columns => [ "receive_time","generated_time","start_time"]
line would look like ( dates in EST / UTC -5 / -0500) = 2016/11/07 13:09:44,2016/11/07 13:09:39,2016/11/07 13:09:40
Since they are firewall syslog entries, I would prefer that @timestamp use "generated_time" for auditing purposes incase there is an issue with syslog and/or older logs need to be imported.
date {
locale => "en"
timezone => "America/New_York"
match => [ "generated_time", "yyyy/MM/dd HH:mm:ss" ]
tag_on_failure => ["_dateparsefailure"]
}
Here is where it breaks down...
The timestamp is converted to ISO8601(UTC) using the new date (2016/11/07 13:09:39) ...
"@timestamp" => "2016-11-07T18:09:39.000Z",
The other three dates are left as is...
"receive_time" => "2016/11/07 13:09:44",
"generated_time" => "2016/11/07 13:09:39",
"start_time" => "2016/11/07 13:09:40",
Because Kibana setting use the Browsers timezone offset (EST / UTC -5 in my case) all the other times are assumed UTC and then lose 5 hours.
2016/11/07 13:09:44 >> 2016/11/07 08:09:44
I have read so many posts now I don't know what the best solution is. I imagine if I can just add the -0500 timezone to my times then all should be good?
Do I do that at CSV, Mutate, or Date?
date {
timezone => "America/New_York"
match => [ "generated_time_orig", "yyyy/MM/dd HH:mm:ss" ]
target => "generated_time_fixed"
}
or
mutate {
replace => [ "generated_time", "%{generated_time}-05:00" ]
}
Not even sure if I have the mutate one right and I assume I have to have a "date" target for each time I want to fix.
Any assistance would be greatly appreciated,
Scott