Install and configure rsyslog Centralized logging server in CentOS 6
Configure rsyslog in RHEL 6.x / CentOS 6.x Step 1 : Enable the module.We will uncomment the below given line by removing # Edit the file /etc/rsyslog.conf Uncomment by removing # in front of these module names module(load="imuxsock") # provides support for local system logging (e.g. via logger command) module(load="imklog") # provides kernel logging support (previously done by rklogd Now, in same file , search for line *.emerg *. Modify the action (i.e *) with :omusrmsg:* . See below given reference *.emerg :omusrmsg:* Now, at the end of file /etc/rsyslog.conf , paste the below given code(These are rsyslog templates) # $template TmplAuth, "/var/log/%HOSTNAME%/%PROGRAMNAME%.log" $template TmplMsg, "/var/log/%HOSTNAME%/%PROGRAMNAME%.log" authpriv.* ?TmplAuth *.info,mail.none,authpriv.none,cron.none ?TmplMsg Now , save and exit ...