Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
  Previous   Contents   Next 
   
 
Chapter 3

Using SNMP Services for WBEM (Tasks)

SNMP Services for WBEM includes two components, the SNMP Adapter for WBEM and the SNMP Provider.

Here is a list of the information in this chapter.

SNMP Adapter for WBEM

Intended for use by system administrators, the SNMP Adapter for WBEM enables Simple Network Management Protocol (SNMP) management applications to access system management information that is provided by Solaris WBEM Services.

Used with snmpdx, the Master Agent of the Solstice Enterprise Agents™ technology, the SNMP Adapter for WBEM maps SNMP requests into equivalent WBEM Common Information Model (CIM) properties or instances. The Master Agent is described in snmpdx(1M).

The SNMP Adapter for WBEM also remaps the response from the CIM Object Manager into an SNMP response, which is returned to the management application.

A mapping file contains the corresponding Object Identifier (OID), class name, property name, and Abstract Syntax Notation One (ASN.1) type for each object. You can create your own mapping files.

How the SNMP Adapter for WBEM Works

The Solaris operating environment initializes WBEM Services before starting the Solstice Enterprise Agents Master Agent. By default, the SNMP Adapter for WBEM, or Adapter, is disabled. However, once you enable the Adapter, the Solstice Enterprise Agents Master Agent (snmpdx) starts the Adapter automatically. The Adapter is described in snmpXwbemd(1M).

An SNMP Manager passes an SNMP Get-request to the Solstice Enterprise Agents Master Agent. The Master Agent then sends the Get-request to the Adapter, which uses the mapping files in /var/sadm/wbem/snmp/map to translate the objects in the Get-request into corresponding CIM objects. The Adapter also translates the CIM objects into SNMP objects in a Get-response.


Note - At present, only Get-request and scalar objects are supported in Solaris 9. Get-next-request, Get-bulk-request, and Set-request as well as other objects are not currently supported.


The Adapter searches this directory alphabetically for the first file to which the extension .map is appended. The Adapter then reads all mapping files in the directory and caches their contents. The Adapter uses the contents of these files to translate the objects that are specified in the Get-request into corresponding CIM objects. The Adapter subsequently ignores duplicate OIDs in the mapping files in the directory. For example, if this OID appears in 002SUNWlvma.map:

1.3.6.1.2.1.1.1.0 My_ComputerSystem Description SnmpString

and the same OID appears in 050SUNWwbcou.map, which the Adapter reads after 002SUNWlvma.map:

1.3.6.1.2.1.1.1.0 Solaris_ComputerSystem Description SnmpString

then the Adapter ignores the OID that is specified in 050SUNWwbcou.map.

The Adapter subsequently generates a Get-response for each Get-request that an SNMP Manager submits. If the Adapter cannot find a corresponding entry in any mapping file, the Adapter returns a Get-response error.

How the Master Agent Routes a Request: SNMP Adapter for WBEM Compared to the Sun SNMP Agent

Until the release of the SNMP Adapter for WBEM, when an SNMP Manager sent a Get-request for an SNMP MIB-2 variable to the Solstice Enterprise Agents Master Agent, the Master Agent routed the request to the Sun SNMP MIB-2 Agent (mibiisa). Because the Adapter also handles SNMP MIB-2 requests, what happens if the Sun SNMP Agent and the SNMP Adapter for WBEM are both running at the same time? How does the Master Agent route a request?

The Master Agent builds a node table based on the subtrees that are defined in each subagent registration file. The mibiisa subagent registers the entire MIB-2 subtree and the Sun Microsystems MIB subtree. The Adapter registers the MIB-2.system subtree and the hostRsrc subtree. The Master Agent does not allow two agents to register the same subtree.

The Sun SNMP MIB-2 Agent is described in mibiisa(1M). The Master Agent is described in the Solstice Enterprise Agents 1.0 User Guide.

At initialization, the Master Agent creates a node table that contains each subtree that is registered. The Master Agent forwards each Get-request to the agent whose subtree best matches the OID that is included in the request. A request for mib-2.system.5.0, for example, is forwarded to the Adapter. A request for mib-2.interfaces.1.0, on the other hand, is forwarded to the mibiisa subagent. If the OID is not defined within any subtree that is registered by the Master Agent, the Master Agent returns an error in the Get-response.

The SNMP Adapter for WBEM supports SNMP V1 requests only.

Configuring the Adapter and Mapping SNMP to CIM Objects

Configuration Files

The files you use to configure the SNMP Adapter for WBEM, which are located in /etc/snmp/conf/, are described in this section.

In snmpXwbem.acl, you define the access control list policies that are associated with the Adapter, in this format:

#pragma ident  "@(#)snmpXwbem.acl   1.2   01/04/18 SMI"
#Copyright (c) 2001 by Sun Microsystems, Inc.
#All rights reserved.

#        Configuration file of the SNMP subagent for WBEM

##################
# access control #
##################
# The list of community names needed for read/write access
# to the entire MIB.

# If the list is empty, the only valid community name is "public"
# and its access type is read-only
#
# A * in the managers list indicates requests can be received from
# any host.

acl = {
        {
                communities = public, private
                access = read-only
                managers = * 
        }
}

###################
# trap parameters #
###################
trap = {
}

A comma-separated list of communities and a comma-separated list of managers are allowed. The access policies are read-only. An empty trap clause is required. Traps are not supported by the Adapter in Solaris 9.

In snmpXwbem.reg, you define the Object Identifier (OID) of the subtree for which the Adapter is responsible, in this format:

#pragma ident   "@(#)snmpXwbem.reg      1.3    01/10/04 SMI"
#
#Copyright (c) 2001 by Sun Microsystems, Inc.
#All rights reserved.

#       Configuration file of the SNMP subagent for WBEM

##########
# macros # 
##########

# The following 3 macros are predefined:
#
#       mib-2 =         1.3.6.1.2.1
#       enterprise =    1.3.6.1.4.1
#       sun =           1.3.6.1.4.1.42
#
# You can define your own macros, so that you can
# manipulate strings instead of OIDs in defining the agent.
# See the "agent" section below.

macros = {
        system = mib-2.1    
        hostRsrc = mib-2.25
}


##########
# agent  #
##########

# You must fill in at least the following fields:
#
# - name:               the name of your agent (for example, the executable
#                       file name of your agent)
#
# - subtrees:           the list of OIDs / subtrees of OIDs your agent
#                       supports. The listed items must be separated by
#                       a comma.
#
# You can also change or add the following fields:
#
# - timeout:            the number of micro-seconds the SNMP Relay will
#                       wait for a response from your agent
#
# - watch-dog-time:     the number of seconds the SNMP Relay will wait to
#                       test whether the subagent is active, if there has
#                       been no activity for the watch-dog-time interval
#
# - port:               the UDP port number on which you will start
#                       your agent

agents =
{
        {
                name = "WBEMsubagent"
                subtrees = { system, hostRsrc }
                timeout = 20000000
                watch-dog-time = 240
        }
}
 
 
 
  Previous   Contents   Next