elastic/logstash

Allow setting the timezone for sprintf in Logstash event class

Open

#3,368 创建于 2015年6月3日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)Ruby (14,197 star) (3,496 fork)batch import
enhancementhelp wanted

描述

A regular problem that arises for users is that Logstash uses UTC time everywhere. Although this is suitable and usually highly desirable for timestamps, there are other places where using UTC doesn't make sense and leads to unexpected results for end-users.

One particular example is with the elasticsearch output plugin as discussed here:

https://github.com/logstash-plugins/logstash-output-elasticsearch/issues/165

Allowing for example, an option to change the default timezone for everything but timestamps would result in a better experience for the end-user, many of whom expect the (in reference to the issue above) indexes to be rotated on local time rather than UTC and better integration with other tools/services on the server, like cron (and curator called through cron), which usually operate in local time.

The following branch seems to have the beginnings of a fix for this:

https://github.com/elastic/logstash/compare/elastic:master...talevy:sprintf-with-tz

贡献者指南

Allow setting the timezone for sprintf in Logstash event class · elastic/logstash#3368 | Good First Issue