How to set timezone?logstash version 5.x


(Swime) #1

Hello, resently I use logstash 5.4 and try to change the timezone like the way bellow.But it does not work. Is that any fault ? And how can I set the timezone? Thx,please.

filter{
mutate{
add_field => ["time","%{@timestamp}"]
}
date {
match => [ "time", "YYYY-MM-dd'T'HH:mm:ss.SSSZ"]
timezone => "America/Montreal"
}
}


(Swime) #2

{
"path" => "/var/log/secure",
"@timestamp" => 2017-05-26T01:37:11.933Z,
"@version" => "1",
"host" => "cluster-01",
"time" => "2017-05-26T01:37:11.933Z",
"message" => "May 26 09:37:11 cluster-01 sshd[21672]: Received disconnect from 192.1.1.11: 13: The user canceled authentication. "
}


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.