Distributed Systems Administration Utilities User's Guide, Linux, March 2009

3.3.2.2.1 Creating the clog Package
To create the consolidated logging or clog package, start by copying the package templates:
# mkdir $SGCONF/clog
# cd $SGCONF/clog
# cp /opt/dsau/share/serviceguard/templates/clog.conf.template clog.conf
# cp /opt/dsau/share/serviceguard/templates/clog.script.template clog
# chmod +x clog
Both the clog.conf package configuration file and the clog package control script need to be
edited to replace marker tokens with the correct values.
For clog.conf, there is only one token to replace, <%SG_PKG_SUBNET%>. This identifies the
package’s subnet. It is the same as the subnet value in the package control script. Use netstat
-i to help identify the proper subnet for the package’s IP address.
For the package control script, clog, make the changes described below.
The default script template assumes you are using an LVM-based storage configuration. Replace
the volume group/filesystem related tokens as appropriate for the package’s storage configuration
as follows:
1. Find the line “VG[0]=<%SG_PKG_VOL_GRP%>” and replace the token with the name of
the VM volume group for the package. For example:
VG[0]=/dev/vgclog
If using VxVM, comment out the LVM Volume Group line
VG[0]=<%SG_PKG_VOL_GRP%>. Uncomment the line “VXVM_DG[0]=” and put in the
VxVM Disk Group.
2. Find the line LV[0]=<%SG_PKG_LOG_VOL%> and replace the token with the full name
of the logical volume. For example:
LV[0]=/dev/vgclog/lvol1
3. Find the line “FS[0]=<%SG_PKG_FS%>” and replace the token with the name of the
filesystem created for this package. For example:
FS[0]=/clog
All the consolidated logs will reside on this filesystem. The specific location for the
consolidated package logs and the consolidated syslogs is specified in the /etc/
syslog-ng.conf.server file on REd Hat or /etc/syslog-ng/
syslog-ng.conf.server on SLES. Using /clog as the example, the default locations
based on the template /etc/syslog-ng.conf.server file are:
/clog/syslog/syslog.log
/clog/packages/<package name>.log
4. Find the line “FS_MOUNT_OPT[0]=<%SG_PKG_MNT_OPT%>:” and replace the token
with the filesystem’s mount options. For example:
FS_MOUNT_OPT[0]=-o rw
5. Find the line “FS_TYPE[0]=<%SG_PKG_FS_TYPE%>” and replace the token with the
filesystem type. For example:
FS_TYPE[0]=ext3
6. Find the line “FS_UMOUNT_OPT[0]=<%SG_PKG_FS_UMOUNT_OPT%>” and replace the
token with any filesystem umount options. The token can be removed and this option left
blank if there are no special umount options. For example:
FS_UMOUNT_OPT[0]=“”
3.3 Log Consolidation Configuration 65