I have my logstash instance create a new directory everyday to store its logs. The config file is below. It seems to create a directory (and start using it) in the evening a day early; as opposed to creating it right after midnight (when the date actually changes). I am on the West coast (UTC−08:00). I am on an OEL os.
Configuration:
input {
udp {
port => 6379
}
}
filter {
ruby {
code => "event['@timestamp'] = event['@timestamp'].localtime('-08:00')"
}
}
output {
file {
path => ["/logstash-1.4.1/logs/%{+YYYY-MM-dd}/logstash_in.txt"]
}
elasticsearch {
protocol => http
}
stdout {
codec => rubydebug
}
}
My system date and time are correct:
[root@xxx]# date
Mon Jul 14 18:22:37 PDT 2014