-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file timezone problem #1986
Comments
i got same issue |
The problem is |
Yes, %Y%m%d only happens. |
Okay, will check. |
It did not work because of config error. [error]: config error file="/etc/td-agent/td-agent.conf" error_class=Fluent::ConfigError error="insufficient timestamp placeholders in path"
|
@f-ueno I try to set %Y%m%d%H in path, but getting configure error...
|
@luweiv9988 I think you should use correct path depending on timekey
|
It seems time calculation with larger timekey has bug. |
@repeatedly do you have any workaround if the problem is not fixed ? |
Because the timestamp of the midnight cannot be divisible by 86400 in localtime (JST). The timestamp of the midnight is divisible by 86400 only in UTC. Therefore we must consider offset from UTC in localtime. For example, at `2018-07-04 01:23:23 +0900`: If timekey is 86400 and path template is `/log/%Y%m%d.log`. In previous version, extract path template to `/log/20180703.log`. In this version, extract path template to `/log/20180704.log`. Fix fluent#1986 Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
Fluentd version: td-agent 1.0.2
I want to transfer logfile from CentOS to CentOS by fluentd.
I could transfer file but file switches at incorrect time.
My timezone is +0900.
rw-r--r-- 1 root root 34201618 5月 15 09:02 test-log.20180514
rw-r--r-- 1 root root 40060437 5月 16 09:01 test-log.20180515
rw-r--r-- 1 root root 5943936 5月 16 10:47 test-log.20180516
I want files switch at 00:00 but actually they switch at 09:00 everyday.
When I set time_slice_format = %Y%m%d_%H files switch correctly. (test.log.20180516_01 is created at 01:00 )
how can I solve it?
config (input) :
config (output) :
The text was updated successfully, but these errors were encountered: