Logstash timezone while creating index

As I found logstash create an Index on UTC timezone. How can I create an index on the local timezone? I have set up an ES client that needs to query the index day-wise in local time.

output {
elasticsearch {
     hosts => ["localhost:9200"]
    index => "logstash-%{+YYYY-MM-dd}"
    manage_template => false }
    stdout { codec => rubydebug }
}

elasticsearch always stores documents with the timestamp in UTC. It is the responsibility of the clients, such as kibana, to convert those timestamps to the timezone of the consumer (since there may be consumers in multiple timezones).

You can have logstash lie about which timezone events are in, but that may lead to problems in other parts of the elastic stack.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.