I seem to be having an issue with rotating my Monit logfiles with newsyslog. In /usr/local/etc/monitrc I have set:
In /etc/newsyslog.conf I have set:
This is how my /var/log/monit directory looks:
The ONLY file that is used for Monit logging is the monit.log.2 file. All the other log files just say:
What am I doing wrong here?
Code:
set logfile syslog facility log_daemon
set logfile /var/log/monit/monit.log
In /etc/newsyslog.conf I have set:
Code:
/var/log/monit/monit.log 644 7 * @T00 C
This is how my /var/log/monit directory looks:
Code:
-rw-r--r-- 1 root wheel 59B May 9 00:00 monit.log
-rw-r--r-- 1 root wheel 118B May 9 00:00 monit.log.0
-rw-r--r-- 1 root wheel 118B May 8 00:00 monit.log.1
-rw-r--r-- 1 root wheel 2.6K May 9 08:21 monit.log.2 <---- Only log with Monit entries in it
-rw-r--r-- 1 root wheel 117B May 6 00:00 monit.log.3
-rw-r--r-- 1 root wheel 99K May 6 20:37 monit.log.4
The ONLY file that is used for Monit logging is the monit.log.2 file. All the other log files just say:
Code:
May 9 00:00:00 mail newsyslog[30562]: logfile turned over
What am I doing wrong here?