logrotate说它正在运行,但它不是

我刚刚把这个盒子设置为日志服务器,所以我可以转发到SIEM,但文件没有按照我期望的方式旋转。

/var/log/remote/*.log { daily dateext rotate 4 compress delaycompress } 

如果我跑

 /usr/sbin/logrotate -d /etc/logrotate.conf -fv 

logrotate认为它应该旋转日志

 considering log /var/log/remote/logstash-prod.log log needs rotating rotating log /var/log/remote/logstash-prod.log, log->rotateCount is 4 dateext suffix '-20151009' glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]' glob finding logs to compress failed glob finding old rotated logs failed renaming /var/log/remote/logstash-prod.log to /var/log/remote/logstash-prod.log-20151009 creating new /var/log/remote/logstash-prod.log mode = 0600 uid = 0 gid = 0 

但从不写logstash-prod.log-20151009

我怎样才能解决为什么发生这种情况?

  • 我有磁盘空间
  • 我以root身份运行该命令
  • /etc/logrotate.conf是系统提供的副本(AWS Linux 2015.09)

RTFM帮助,我认为-d是指定包含configuration的目录。 这实际上是一个干运行debugging。