Sun Management Center 4.0 Installation and Configuration Guide

Configuring a Legacy SNMP Agent as a Subagent of an Agent

A legacy SNMP agent is an SNMP agent that is not part of the Sun Management Center agent framework. You might need to configure one or more legacy agents as subagents of a Sun Management Center agent if you want to use the legacy agent with Sun Management Center.

Any legacy SNMP agent can be configured as a subagent of a Sun Management Center Agent provided that the following criteria are met:

The following procedure applies to machines on which the Sun Management Center server, agent, or both server and agent are installed.

ProcedureTo Configure a Legacy SNMP Agent as a Subagent of an Agent

  1. Log in as root.

  2. If the file /var/opt/SUNWsymon/cfg/subagent-registry-d.x does not exist, copy the file from the /opt/SUNWsymon/base/cfg directory


    # cp /opt/SUNWsymon/base/cfg/subagent-registry-d.x /var/opt/SUNWsymon/cfg/
    
  3. In the file /var/opt/SUNWsymon/cfg/subagent-registry-d.x, find the block that is similar to the following block:


    # sa2 = {
    #    type             = legacy
    #    persist          = false
    #    snmpPort         = "20001"
    #    errorAction      = restart
    #    startCommand     = "/usr/lib/snmp/mibiisa -p %port"
    #    stopCommand      = "kill -9 %pid"
    #    pollInterval     = 60
    #    pollHoldoff      = 60
    #    oidTrees         = 1.3.6.1.2.1
    #    snmpVersion      = SNMPv1
    #    securityLevel    = noauth
    #    securityName     = public
    # }
  4. Remove the comment symbols (#) at the beginning of each line so that the code resembles the following code.


    sa2 = {
        type             = legacy
        persist          = false
        snmpPort         = "20001"
        errorAction      = restart
        startCommand     = "/usr/lib/snmp/mibiisa -p %port"
        stopCommand      = "kill -9 %pid"
        pollInterval     = 60
        pollHoldoff      = 60
        managedTrees     = "mib-2 sun"
        oidTrees        = 1.3.6.1.2.1
        snmpVersion      = SNMPv1
        securityLevel    = noauth
        securityName     = public
     }
  5. Modify the codes as follows:

    • Change sa2 to the unique subagent name for the agent.

    • Set type to legacy.

    • Set persist to false if the subagent is stopped when the Sun Management Center agent exits. If this value is true, then the Sun Management Center agent does not stop the subagent when the Sun Management Center agent exits.

    • Set snmpPort to the UDP port number on which you want to run the subagent.

    • Set errorAction to restart, ignore, or kill. If the restart option is used, the Sun Management Center agent tries to restart if the agent encounters an error when communicating with the subagent.

    • Set startCommand to the mandatory command to start the subagent. This command should contain %port, which is replaced by the value that is given in snmpPort.

    • Set stopCommand to the command to stop the process. %pid can represent the process ID (PID) of the subagent process.

    • Set pollInterval to the time in seconds in which the Sun Management Center agent polls the subagent.

    • Set pollHoldoff to the time in seconds after which the first poll is performed on the subagent after the Sun Management Center agent starts the subagent.

    • Set oidTrees to a space-separated list of SNMP OIDs managed by the subagent.

    • Set snmpVersion to either SNMPv1, SNMPv2or SNMPv3.

    • Set securityLevel to either priv, auth, or noauth.

    • Set securityName to the SNMPv1 community name or SNMPv2 security name you want to use.

    For more details, refer to the descriptions in the subagent-registry-d.x file.

  6. Stop and restart Sun Management Center to make the changes effective.

    1. Type /opt/SUNWsymon/sbin/es-stop -A to stop Sun Management Center.

      Wait for all processes to stop successfully.

    2. Type /opt/SUNWsymon/sbin/es-start -A to start Sun Management Center.

      Wait for all processes to start successfully.

    See Chapter 8, Starting and Stopping Sun Management Center for further information.