The Problem
On CentOS/RHEL system, the messages file is empty, and so are the rotated files (exact rotated names depends on the /etc/logrotate.conf configuration file), e.g. :
# cd /var/log ls -larth messages* -rwxrwxrwx 1 root root 0 Aug 8 22:32 messages.4 -rwxrwxrwx 1 root root 0 Aug 15 22:32 messages.3 -rwxrwxrwx 1 root root 0 Aug 22 22:32 messages.2 -rwxrwxrwx 1 root root 0 Aug 29 22:32 messages.1 -rwxrwxrwx 1 root root 0 Sep 5 22:32 messages
The Solution
The /etc/syslog.conf configuration file has been altered, e.g. by commenting this line which is shipped with a default CentOS/RHEL installation :
$ grep /var/log/messages /etc/syslog.conf #*.info;mail.none;news.none;authpriv.none;cron.none /var/log/messages
1. Uncomment that line or rollback any other changes to the logging configuration of the messages that should go to /var/log/messages in /etc/syslog.conf (/etc/rsyslog.conf on CentOS/RHEL 6,7)
$ grep /var/log/messages /etc/syslog.conf *.info;mail.none;news.none;authpriv.none;cron.none /var/log/messages
2. Restart the syslog service to pick up the changes.
# service syslog restart ### For CentOS/RHEL 5 # service syslog restart ### For CentOS/RHEL 6,7
On CentOS/RHEL 7,
# systemctl restart rsyslog.service