Change timezone for rotation


#1

Hello,

i'm using the date-based log rotation with the file output plugin.
My problem is that the time is in UTC timezone and i'm in CEST/CET timezone.
Consequence is that log are not rotated at midnight as expected.
Does someone know how to change the timezone to correct this behavior (system date/time is correct) ?

Kr,


(Magnus B├Ąck) #2

The %{+YYYY etc} notation always reads the @timestamp field and always uses UTC. You'll have to use a ruby filter to create a separate field containing the local time and then reference that field in the file output's path option.


#3

Thanks for your reply.
"You'll have to use a ruby filter to create a separate field containing the local time and then reference that field in the file output's path option."
As i am totally new to that, any advice on how to do that ?

Kr,


(system) #4

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