Closed deanilenko closed 8 years ago
Hi,
Graylog uses UTC internally to handle date times, and the web interface converts them into the time zone you defined for your user. As alerts can be send to many 3rd party systems and several users, times are not adjusted and the email contains events in UTC.
As far as I can see, it is working as intended.
Hello! I have a problem with timestamp in email callback, but when i use web-interface timestamp is correct. On web i see this:
Alerts use this template:
Date: ${check_result.triggeredAt} Stream title: ${stream.title} ${if stream_url}Stream URL: ${stream_url}${end}
${if backlog}Last messages accounting for this alert: ${foreach backlog message} Source: ${message.source}(${message.fields.gl2_remote_ip}) ${if message.fields.source_file}Source File: ${message.fields.source_file} ${end} Message: ${message.message} TimeStamp: ${message.timestamp} ${end}${else}
${end}
But in email message i see incorrect timestamp:
Date: 2015-12-18T13:46:24.077Z Stream title: xxxxxxxxxxx Stream URL: http://xxxxxxxxxxxxx/streams/5673f109b3366b08fa979fbe/messages?rangetype=absolute&from=2015-12-18T13:45:24.077Z&to=2015-12-18T13:46:24.077Z&q=*
Last messages accounting for this alert:
Source:xxxxxxxxxxx Source File: /var/log/messages Message: Dec 18 15:45:42 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TimeStamp: 2015-12-18T13:45:43.026Z
In config files i use UTC+2:
$grep root_time /etc/graylog/server/server.conf root_timezone = EET $grep timezone /etc/graylog/web/web.conf timezone="EET"
Graylog version:
graylog-server 1.2.2-1 graylog-web 1.2.2-1
How can i solve this issue?