Sun Management Center 4.0 Installation and Configuration Guide

SNMP Daemons and Legacy Agents

This section provides an overview of SNMP, and the procedure for configuring legacy SNMP agents as subagents of the Sun Management Center agent.

SNMP Overview

The Sun Management Center server uses SNMP to communicate with the Sun Management Center agents. SNMP also communicates with the other server components, such as the Topology manager, Configuration manager, Event manager, and Trap handler. By contrast, the Sun Management Center server uses remote method invocation (RMI) to communicate with the Sun Management Center consoles.

The SNMP port definitions for Sun Management Center components are defined in two files:

The domain-config.x file contains one configuration block for each of the SNMP-based Sun Management Center agents. Each configuration block contains at least one line that defines the port address for the corresponding agent. The default port definition for the Sun Management Center server is in the server-config.x file.

You can manually add hosts with Sun Management Center agents that use port addresses other than 161 to the administrative domain through the Create Topology Object window. Alternatively, you can discover these hosts automatically by specifying the port number in the discovery parameters. For more information about the Create Topology Object window, see Chapter 3, Manually Adding Objects to the Topology Database, in Sun Management Center 3.6.1 User’s Guide. For more information about how hosts are discovered automatically, see Chapter 4, Adding Objects to the Topology Database Using the Discovery Manager, in Sun Management Center 3.6.1 User’s Guide. Because you can only specify one port number in addition to port 161, you must select an alternate port number and use that number for all agent installations.

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.