elastic/logstash

Allow setting the timezone for sprintf in Logstash event class

Open

#3.368 aberto em 3 de jun. de 2015

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)Ruby (3.496 forks)batch import
enhancementhelp wanted

Métricas do repositório

Stars
 (14.197 stars)
Métricas de merge de PR
 (Mesclagem média 4d 19h) (50 fundiu PRs em 30d)

Description

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

Guia do colaborador