Created attachment 433601 [details]
patch of changes made to rsyslog init script
Description of problem:
Rsyslog init script not conducive to running multiple rsyslogd instances
Version-Release number of selected component (if applicable):
I recently discovered the the limitation of the TCP listener to only listen on a single port which eliminates to option to run in a dual-mode setup (encrypted and unencrypted channels)
When looking for a solution to my problem I was inspired by the tomcat5 init script. I previously had the need to setup Tomcat to run multiple instances and recall how that worked by symlinking to the tomcat5 init script using a unique name like wiki or bugtracker and them making a copy of the tomcat confile files matching their names to your newly created symlink.
In this case I had wanted three rsyslog instances running:
As an overview of the the lay of the land:
Slightly modified rsyslog init script has been symlinked:
[root@lobot init.d]# ls -al rsyslog*
-rwxr-xr-x 1 root root 2524 Jul 22 00:15 rsyslog
lrwxrwxrwx 1 root root 7 Jul 22 01:23 rsyslog-relp -> rsyslog
lrwxrwxrwx 1 root root 7 Jul 22 01:23 rsyslog-secure -> rsyslog
Individual conf files modified to suit(ie encryption, RELP.:
[root@lobot etc]# ls -al /etc/rsyslog*
-rw-r--r-- 1 root root 1675 Jul 21 21:38 /etc/rsyslog.conf
-rw-r--r-- 1 root root 1169 Jul 21 23:34 /etc/rsyslog-relp.conf
-rw-r--r-- 1 root root 1169 Jul 21 22:23 /etc/rsyslog-secure.conf
The sysconfig files just has one light change. Essentially adding the
-f option for custom conf file locations.
[root@lobot etc]# ls -al /etc/sysconfig/rsyslog*
-rw-r--r-- 1 root root 516 Jul 12 22:49 /etc/sysconfig/rsyslog
-rw-r--r-- 1 root root 542 Jul 21 23:36 /etc/sysconfig/rsyslog-relp
-rw-r--r-- 1 root root 657 Jul 21 23:31 /etc/sysconfig/rsyslog-secure
Using the attached patch for the rsyslog init script will allow multiple instances to be controlled by service and chkconfig:
[root@lobot ~]# ps aux|grep rsyslog
root 17392 0.0 0.6 134412 3444 ? Sl Jul21 0:01 /sbin/rsyslogd -r -m 0
root 21709 0.0 0.5 124968 2708 ? Sl Jul21 0:00 /sbin/rsyslogd -i /var/run/rsyslog-secure.pid -f /etc/rsyslog-secure.conf -r -m 0
root 22000 0.0 0.5 124968 2708 ? Sl Jul21 0:00 /sbin/rsyslogd -i /var/run/rsyslog-relp.pid -f /etc/rsyslog-relp.conf -r -m 0
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Thanks for the report. RHEL-5 is entering a maintenance mode and new features are only added on the basis of a support request.