Troubleshooting
Problem
Customize /etc/rsyslog.conf for logging tuning
Resolving The Problem
By default, all Kusu logs from the compute nodes in a PCM cluster are redirected to the Installer node for centralized log control. This can, in some cases, cause problems for the Installer node such as high load and/or high disk space usage. You can modify this behavior by applying the procedure in this article.
0. Introduction
You should have sufficient knowledge of changing rsyslog.conf file. Detailed information of its configuration is out of the scope of this article.
To customize rsyslog behavior on the compute node. /opt/kusu/etc/rsyslog_conf.tmpl on each compute nodes will be changed.
Your out-of-box rsyslog.conf file should look like this on compute nodes:
[root@compute-00-00 ~]# cat /etc/rsyslog.conf
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* -/var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg *
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
$template kusurelaymsg, "%TIMESTAMP% %FROMHOST% %programname%: %msg%"
*.* @192.168.1.182; kusurelaymsg
To change the behavior of only logging error messages, you must change the last line to:
*.err @192.168.1.182; kusurelaymsg
Follow the steps below to accomplish this:
1. Backup original files
[root@pcm201 plugins]# pdsh -a "cp -p \
/opt/kusu/etc/templates/rsyslog_conf.tmpl /opt/kusu/etc/templates/rsyslog_conf.tmpl.orig"
2. Make the change
[root@pcm201 plugins]# pdsh -a "sed -i \
's/\*\.\*/\*\.err/g' /opt/kusu/etc/templates/rsyslog_conf.tmpl"
3. Re-generate the actual configure files
[root@pcm201 plugins]# cfmsync -f
Running plugin: /opt/kusu/lib/plugins/cfmsync/getent-data.sh
Distributing 3 KBytes to all nodes.
Updating installer(s)
Sending to 192.168.1.255
Sending to 192.168.1.255
Sending to 192.168.1.255
Sending to 192.168.1.255
Sending to 192.168.1.255
4. Verify if the change has been made
[root@pcm201 plugins]# ssh compute-00-00
Last login: Mon Nov 29 15:07:26 2010 from pcm201.example.com
[root@compute-00-00 ~]# tail /etc/rsyslog.conf
*.emerg *
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
$template kusurelaymsg, "%TIMESTAMP% %FROMHOST% %programname%: %msg%"
*.err @192.168.1.182; kusurelaymsg
You can make your own customizations by adopting a similar procedure as showing above.
Was this topic helpful?
Document Information
Modified date:
16 September 2018
UID
isg3T1014974