Solaris 10 Xymon SMF

Author Galen Johnson
Compatibility Xymon 4.2
Requirements Solaris 10
Download None
Last Update 2007-04-10

These are service manifest files for Solaris 10. These will allow you to import the hobbit start and stop scripts for the server/client into the new Solaris Service Management Facility (Solaris 10 replacement of /etc/rcN.d).

  1. mkdir -p /var/svc/manifest/application/monitoring/hobbit
  2. copy the client and server xml files to /var/svc/manifest/application/monitoring/hobbit
  3. import the service(s)
    svccfg import /var/svc/manifest/application/monitoring/hobbit/server.xml
    svccfg import /var/svc/manifest/application/monitoring/hobbit/client.xml
  4. enable the service(s)
    svcadm enable svc:/application/monitoring/hobbit/client:default
    svcadm enable svc:/application/monitoring/hobbit/server:default

Xymon Client

Show Code ⇲

Hide Code ⇱

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<!--
    client.xml : Xymon Client manifest, Galen Johnson
    2007-04-13
    based on bigbrother.xml : BigBrother manifest, Kyle Reynolds
    2006-07-02
-->
 
<!--
    Solaris 10 SMF manifest file for Xymon client. Just place in
    /var/svc/manifest/application/monitoring/hobbit
    and run:
    'svccfg import /var/svc/manifest/application/monitoring/hobbit/client.xml'
    'svcadm enable svc:/application/monitoring/hobbit/client:default'
-->
 
<!--
    Be sure to change the path to runclient.sh to match your setup...
    Be sure to change the user and group hobbit runs as for your setup...
    If you need to provide the hobbit service additional group privs, add 
    them to the supp_groups in the method context.
-->
 
<service_bundle type="manifest" name="hobbit:client">
 
<service
    name="application/monitoring/hobbit/client"
    type="service"
    version="1">
 
    <create_default_instance enabled='false' />
 
    <single_instance />
 
    <dependency
        name="filesystem"
        grouping="require_all"
        restart_on="none"
        type="service">
        <service_fmri value="svc:/system/filesystem/local"/>
    </dependency>
 
    <dependency
        name="network"
        grouping="require_all"
        restart_on="none"
        type="service">
        <service_fmri value="svc:/network/initial"/>
    </dependency>
 
    <dependency
        name="multi-user-server"
        grouping="require_any"
        restart_on="error"
        type="service">
       <service_fmri value="svc:/milestone/multi-user-server:default"/>
    </dependency>
 
    <exec_method
        type="method"
        name="start"
        exec="/usr/local/hobbit/client/runclient.sh start"
        timeout_seconds="30">
        <method_context>
            <method_credential user="hobbit" group="bb"
                   supp_groups="" />
        </method_context>
    </exec_method>
 
    <exec_method
        type="method"
        name="stop"
        exec="/usr/local/hobbit/client/runclient.sh stop"
        timeout_seconds="30">
        <method_context>
            <method_credential user="hobbit" group="bb"
                  supp_groups="" />
        </method_context>
    </exec_method>
 
     <property_group name='startd' type='framework'>
        <!-- sub-process core dumps shouldn't restart session -->
        <propval name='ignore_error' type='astring' value='core,signal' />
    </property_group>
 
   <stability value="Unstable"/>
 
    <template>
        <common_name>
            <loctext xml:lang="C">
                Xymon Client
            </loctext>
        </common_name>
        <documentation>
             <doc_link name='hobbit_monitor_site'
                uri='http://hobbitmon.sourceforge.net/' />
        </documentation>
    </template>
 
</service>
 
</service_bundle>

Xymon Server

Show Code ⇲

Hide Code ⇱

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<!--
    client.xml : Xymon Server manifest, Galen Johnson
    2007-04-13
    based on bigbrother.xml : BigBrother manifest, Kyle Reynolds
    2006-07-02
-->
 
<!--
    Solaris 10 SMF manifest file for Xymon server. Just place in
    /var/svc/manifest/application/monitoring/hobbit
    and run:
    'svccfg import /var/svc/manifest/application/monitoring/hobbit/server.xml'
    'svcadm enable svc:/application/monitoring/hobbit/server:default'
-->
 
<!--
    Be sure to change the path to hobbit.sh to match your setup...
    Be sure to change the user and group hobbit runs as for your setup...
-->
 
<service_bundle type="manifest" name="hobbit:server">
 
<service
    name="application/monitoring/hobbit/server"
    type="service"
    version="1">
 
    <create_default_instance enabled='false' />
 
    <single_instance />
 
    <dependency
        name="filesystem"
        grouping="require_all"
        restart_on="none"
        type="service">
        <service_fmri value="svc:/system/filesystem/local"/>
    </dependency>
 
    <dependency
        name="network"
        grouping="require_all"
        restart_on="none"
        type="service">
        <service_fmri value="svc:/network/initial"/>
    </dependency>
 
    <dependency
        name="multi-user-server"
        grouping="require_any"
        restart_on="error"
        type="service">
       <service_fmri value="svc:/milestone/multi-user-server:default"/>
    </dependency>
 
    <exec_method
        type="method"
        name="start"
        exec="/usr/local/hobbit/server/hobbit.sh start"
        timeout_seconds="30">
        <method_context>
            <method_credential user="hobbit" group="bb"/>
        </method_context>
    </exec_method>
 
    <exec_method
        type="method"
        name="stop"
        exec="/usr/local/hobbit/server/hobbit.sh stop"
        timeout_seconds="30">
        <method_context>
            <method_credential user="hobbit" group="bb"/>
        </method_context>
    </exec_method>
 
    <property_group name='startd' type='framework'>
        <!-- sub-process core dumps shouldn't restart session -->
        <propval name='ignore_error' type='astring' value='core,signal' />
    </property_group>
 
   <stability value="Unstable"/>
 
    <template>
        <common_name>
            <loctext xml:lang="C">
                Xymon Server
            </loctext>
        </common_name>
        <documentation>
             <doc_link name='hobbit_monitor_site'
                uri='http://hobbitmon.sourceforge.net/' />
            <manpage title="hobbit" section="1" manpath="/usr/local/man"/>
        </documentation>
    </template>
 
</service>
 
</service_bundle>
  • No known bugs
  • 2007-04-13
    • Split client and server out into separate manifests.
  • 2007-04-10
    • Initial release
  • addons/hobbitsmf.txt
  • Last modified: 2009/11/23 06:33
  • (external edit)