[syslog-ng] Integrating syslog-ng on Solaris 10

Ed Ravin eravin at panix.com
Wed May 4 04:58:50 CEST 2011


On Mon, May 02, 2011 at 12:04:44PM +0200, Sandor Geller wrote:
> An alternative would be updating /etc/init.d/syslog to start syslog-ng
> instead of syslogd.. From /lib/svc/share/smf_include.sh one can load
> useful functions and exit codes to be SMF-compliant.

That's exactly what I did - I installed syslog-ng from sunfreeware.com and
then reconfigured system-log using "svcadm" with the XML file shown below.
This starts syslog-ng with the method supplied in the sunfreeware.com
package.

	-- Ed


--------------------------- syslog-ng.xml
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">

<service_bundle type='manifest' name='system-log'>

<!--
  Steal the FMRI of the regular syslogd, so that things which depend on
  "system-log" running (like rarp) do not automatically get turned
  off by Solaris.
 -->

<service
        name='system/system-log'
        type='service'
        version='1'>

        <create_default_instance enabled='false' />

        <single_instance/>

        <dependency
                name='milestone'
                grouping='require_all'
                restart_on='none'
                type='service'>
                <service_fmri value='svc:/milestone/sysconfig' />
        </dependency>

        <!--
          syslog-ng can log to non-root local directories.
        -->
        <dependency
                name='filesystem'
                grouping='require_all'
                restart_on='none'
                type='service'>
                <service_fmri value='svc:/system/filesystem/local' />
        </dependency>

        <!--
          syslog-ng needs nameservice resolution to log to remote hosts.
        -->
        <dependency
                name='name-services'
                grouping='require_all'
                restart_on='none'
                type='service'>
                <service_fmri value='svc:/milestone/name-services' />
        </dependency>

        <dependent
                name='system-log_single-user'
                timeout_seconds='60' />

        <property_group name='general' type='framework'>
                <!-- to start stop syslog daemon -->
                <propval name='action_authorization' type='astring'
                        value='solaris.smf.manage.system-log' />
        </property_group>

        <stability value='Unstable' />

        <template>
                <common_name>
                        <loctext xml:lang='C'> syslog-ng
                        </loctext>
                </common_name>
                <documentation>
                        <manpage title='syslog-ng' section='1M'
                                manpath='/usr/local/share/man' />
                </documentation>
        </template>
</service>

</service_bundle>




More information about the syslog-ng mailing list