add option to define the @timestamp format to use the timezone

Description

Logstash use a GMT timestamp internaly to store the event timestamp (@timestamp field).

When using the File output module (for example), I use :

Giving :

I would like to have the timestamp writen using my real timezone (GMT-4) like :

I see 3 ways to do this :

  • add an otpion to the File output to "auto" add the timestamp to every line, and an option to manage the timezone. This will only affect File output though

  • add something (a decorator) to the special @timestamp field to force a timezone representation, like : %{@timestamp:-0400}

  • create a logstash internal "alias" to @timestamp with a localized value using the Os timezone setting. Instead of using @timestamp in grok or outputs, use @localtimestamp that will transparently recalculate the timestamp value

Environment

None

Status

Assignee

Philippe Weber

Reporter

sebastien THOMAS

Fix versions

Affects versions

Priority

Configure