Previous Instrumentation Next

SNMP Agent

The SNMP agent is a Java Object that enables SNMP management applications to access the properties of manageable resources at runtime via SNMP. The OpenFusion SNMP agent implements SNMPv1 and uses UDP as the underlying transport protocol for sending and receiving SNMP messages.

To use the SNMP agent, the SNMPAgentObject must be added to a Service in the Administration Manager. Adding Java Objects to a Service is described in Adding Singletons and Java Objects. The SNMP agent enables all manageable resources that are co-located with it to be managed via SNMP.

Configuring the SNMP Agent

The following properties of the SNMPAgentObject can be configured from the Administration Manager.

Port

The port used by the agent to listen for SNMP requests. The standard port for listening for SNMP requests is port 161.

Property Name

Port

Property Type

STATIC

Data Type

INTEGER

Accessibility

READ/WRITE

Mandatory

YES

Default Value

161

Max Packet Size

The maximum packet size (in bytes) of an SNMP message.


Warning: If the packet size is configured to be too small then the SNMP agent may fail with an exception when attempting to process an SNMP message whose size exceeds the maximum packet size.

Property Name

MaxPacketSize

Property Type

STATIC

Data Type

INTEGER

Accessibility

READ/WRITE

Mandatory

YES

Default Value

1300

Max Active Clients

The maximum number of clients that can access the agent concurrently. A value less than one is interpreted to mean that there is no limit to the number of clients that can access the SNMP agent concurrently.

Property Name

MaxActiveClients

Property Type

STATIC

Data Type

INTEGER

Accessibility

READ/WRITE

Mandatory

YES

Default Value

10

Enable Traps

A flag indicating if the agent will send SNMP traps. By default the SNMP agent does not send traps.

Property Name

EnableTraps

Property Type

STATIC

Data Type

BOOLEAN

Accessibility

READ/WRITE

Mandatory

YES

Default Value

FALSE

Trap Hosts File

An XML file defining hosts to receive traps sent by the agent. See Trap Hosts File for a description of this file.

Property Name

TrapHostsFile

Property Type

STATIC

Data Type

FILE

Accessibility

READ/WRITE

Mandatory

YES

Default Value

none

Default Trap Port

The port to send traps to when a port is not specified in the XML. The standard port for listening for SNMP traps is port 162.

Property Name

DefaultTrapPort

Property Type

STATIC

Data Type

INTEGER

Accessibility

READ/WRITE

Mandatory

YES

Default Value

162

Default Trap Community

The community name used for sending traps when a community name is not specified in the XML. For security reasons this property cannot be monitored via SNMP.

Property Name

DefaultTrapCommunity

Property Type

STATIC

Data Type

STRING

Accessibility

READ/WRITE

Mandatory

YES

Default Value

none

Trap On Authentication Failure

A flag indicating if the agent sends a trap when an authentication failure occurs. Regardless of the value of this property, the SNMP agent will only send traps if the EnableTraps property is set to TRUE.

Property Name

TrapOnAuthenticationFailure

Property Type

STATIC

Data Type

BOOLEAN

Accessibility

READ/WRITE

Mandatory

YES

Default Value

TRUE

Read-only Community

The community name of the agent providing read-only access to the MIB view. For security reasons this property cannot be monitored via SNMP.

Property Name

ReadOnlyCommunity

Property Type

STATIC

Data Type

STRING

Accessibility

READ/WRITE

Mandatory

YES

Default Value

none

Enable Write Access

A flag indicating if the agent will allow write access. By default the SNMP agent does not allow write access.

Property Name

EnableWriteAccess

Property Type

STATIC

Data Type

BOOLEAN

Accessibility

READ/WRITE

Mandatory

YES

Default Value

FALSE

Read-write Community

The community name of the agent providing read-write access to the MIB view. For security reasons this property cannot be monitored via SNMP. Requests that use this community when the EnableWriteAccess property is set to FALSE will result in an authentication failure.

Property Name

ReadWriteCommunity

Property Type

STATIC

Data Type

STRING

Accessibility

READ/WRITE

Mandatory

YES

Default Value

none

Notifications

The following notifications are sent by the SNMP agent:

This notification signals that the SNMP agent has started and is listening for SNMP requests.

This notification signals that an authentication failure has occurred while processing an SNMP message.

This notification signals that the SNMP agent has stopped and is no longer listening for SNMP requests.

Notifications are sent to SNMP management applications as SNMPv1 traps. These traps are enterprise specific and do not belong to the snmp group in MIB-II. Consult the SNMP agent MIB for details of all traps sent by the SNMP agent.

Trap Hosts File

The trap hosts file is an XML file that defines the hosts that are to receive SNMPv1 traps emitted by the SNMP agent. The full path to this file is specified by the TrapHostsFile property. If the EnableTraps property is set to FALSE then the TrapHostsFile property is ignored by the SNMP agent.

Each host is defined in the XML by a host name and optionally a port and community name. If the port is not specified then the value of the DefaultTrapPort property is used. Similarly, if the community name is not specified then the value of the DefaultTrapCommunity property is used. The host name must be specified and can either be the name or the IP address of the host.

The DTD that specifies the format of the XML is defined in the following file:

<INSTALL>/xml/schema/TrapHosts.dtd

where <INSTALL> is the OpenFusion installation directory.

A DOCTYPE declaration referencing TrapHosts.dtd must be included in every XML file so that the XML can be validated. If this declaration is not included then the SNMP agent will fail to start.

Starting the SNMP Agent

Once an SNMPAgentObject has been added to a Service, starting the Service automatically starts the SNMP agent. Immediately after the agent has started it will send an SnmpAgentStartup trap (if traps are enabled) and it will begin listening for incoming SNMP requests.

Manageable resources that are co-located with the SNMPAgentObject must be started before the SNMPAgentObject in order to be managed via SNMP. This can be accomplished from within the Administration Manager by positioning all co-located resources above the SNMPAgentObject in the Service definition. The exception to this starting rule is the ProcessSingleton, which is normally the last resource in a Service definition.

Stopping the SNMP Agent

Stopping the Service containing the SNMPAgentObject automatically stops the SNMP agent. Immediately before the agent has stopped it will send an SnmpAgentShutdown trap (if traps are enabled) and it will stop listening for incoming SNMP requests.

OpenFusion MIBs

The OpenFusion MIBs are contained in the following directory:

<INSTALL>/mibs

where <INSTALL> is the OpenFusion installation directory.

There is one MIB for each OpenFusion manageable resource. The name of each MIB is prefixed with the name of the resource it describes (minus the Singleton or Object suffix). For example, the MIB representing the TradingSingleton is named TRADING-MIB.txt, and the MIB representing the SNMPAgentObject is named SNMPAGENT-MIB.txt. The exception to this naming rule is the ProcessSingleton MIB, which is named SERVER-MIB.txt.

The OpenFusion MIBs fully conform to SMIv1. Management applications connected to the SNMP agent will be able to access the objects defined in the MIBs of co-located resources by their OIDs. The OID of the root node of the PrismTech OpenFusion MIB tree is 1.3.6.1.4.1.5510.1.



Previous Instrumentation Next