Logwatch symlinked logs broken since update 1.6.0p10

Hi there,

Hope all is well.

Since updating to latest RAW CRE edition it seems logwatch is unable to

monitor logs that are sym links.

Example:

# file /var/cpanel/updatelogs/last /var/cpanel/updatelogs/last: symbolic link to /var/cpanel/updatelogs/update.1585705742.log'

I always used to monitor:

/var/cpanel/updatelogs/last

But now it is seen in check_mk as:

/var/cpanel/updatelogs/update.1585687982.log

Every night when the cPanel update runs, and repoints the ‘last’ file to the actual file ‘update.1585687982.log’ check_mk alerts that the file ‘update.1585687982.log’ no longer exists.

Is there a setting for this, or is this a new bug?

Thanks,

C

As a work around, if anyone else has this problem:

  1. Set a hook to run after upcp to copy log content to regular file:

echo “cat /var/cpanel/updatelogs/last > /var/cpanel/updatelogs/last-check-mk.log” > /scripts/postupcp
chmod +x /scripts/postupcp

  1. Update logwatch.cfg to check /var/cpanel/updatelogs/last-check-mk.log and not /var/cpanel/updatelogs/last

Hope this helps
C

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.