Nagios mangles its own logrotate file
Posted: Fri Jul 28, 2023 3:19 pm
It looks like the latest version of XI is mangling the heck out of the nagiosxi logrotate file. After looking in to a disk space consumption issue I found that log files haven't been rotated in months. This is how the file sits on multiple systems I have checked, so there is a bug some where in the install that seems to not be replacing values for the logrotate file:
/etc/logrotate.d/nagiosxi
I've already fixed my file and logrotate is working again, but anyone who's installed the latest version probably has a broken logrotate and growing log files now...
/etc/logrotate.d/nagiosxi
Code: Select all
PRODDIR/var/*log {
missingok
notifempty
size 5M
copytruncate
su NAGIOSUSER NAGIOSGROUP
rotate 1
compress
}
PRODDIR/var/xidebug.log {
missingok
notifempty
size 100M
copytruncate
create 0660 APACHEUSER NAGIOSGROUP
su APACHEUSER NAGIOSGROUP
rotate 1
compress
}
PRODDIR/var/xidebug.log.backtrace {
missingok
notifempty
size 100M
copytruncate
create 0660 APACHEUSER NAGIOSGROUP
su APACHEUSER NAGIOSGROUP
rotate 1
compress
}
PRODDIR/var/components/auditlog.log {
missingok
notifempty
size 100M
copytruncate
create 0660 APACHEUSER NAGIOSGROUP
su APACHEUSER NAGIOSGROUP
rotate 1
compress
}
PRODDIR/tmp/phpmailer.log {
missingok
notifempty
size 100M
copytruncate
create 0660 APACHEUSER NAGIOSGROUP
su APACHEUSER NAGIOSGROUP
rotate 1
compress
}