Running multiple syslog-ng instances on the same host (RHEL6 CO6 SL6)
In my environment we want to have isolation between the standard OS based syslog-ng service and the central syslog-ng collector service, which of course is running on a host that already has an OS based syslog-ng process running on it. Running muliple syslog-ng daemons under systemd is not so difficult. Copy the system service file and systemd automatically registers a .d folder for custom configurations, however, there is nothing automatic about the System V init mechanism used in the RHEL6 based systems. Don't worry because they syslog-ng init script from the copr yum repository (https://copr.fedorainfracloud.org/coprs/czanik) starting at 3.19 has already thought of this and made multiple instances as automatic as they can be. Quick steps to create a second syslog-ng instance: 1. Decide on the new name extension (shown here is yourName) 2. Copy the included init script cp /etc/init.d/syslog-ng /etc/init.d/syslog-ng-yourName 3. Change the SYSLOGNG_SUFFIX value in your new init script to the value "-yourName". You need the leading hyphen because your added -yourName to the init file name. 4. Copy and customize the included customization file cp /etc/sysconfig/syslog-ng /etc/sysconfig/syslog-ng-yourName By default all of the configuration and runtime files will default to file names including the -yourName suffix, so very little if any customization should be needed. 5. Create a new syslog-ng configuration file for your new instance vi /etc/syslog-ng/syslog-ng-yourName 6. Enable the auto-start of your new instance chkconfig --add syslog-ng-yourName 7. Start your instance /sbin/service syslog-ng-yourName start Thanks again to all of the people adding value to an already great product!
participants (1)
-
Evan Rempel