Hi all:
I'm using logstash email output for alerting, and everything works very well.
The only question is that, how do I use non UTC timezone for my email body?
Here is my config:
output {
if "email_alert" in [tags] {
email {
address => "smtp.exmail.qq.com"
authentication => "login"
username => "user"
password => "password"
to => "group@mydomain.com"
from => "Logstash<logstash@mydomain.com>"
body => "timestamp: %{@timestamp} \n message: %{detail}" # <====== @timestamp is UTC time like 2016-08-22T07:12:28.663Z
subject => "server %{host} %{type} altering: %{content}"
contenttype => "text/plain; charset=UTF-8"
}
}
}
So @timestamp
is like 2016-08-22T07:12:28.663Z
, which is an UTC time. Is there any way to format this field as other timezone? Thanks.