10 Collecting Alarms Using the SNMP Service

This chapter describes how to configure and use the Simple Network Management Protocol (SNMP) service to collect the alarms generated by Oracle Communications Services Gatekeeper.

Understanding the SNMP Service

The SNMP service collects alarms and distributes them as SNMP traps. Figure 10-1 illustrates SNMP trap generation and explains the trap codes.

The SNMP service acts as an internal alarm listener and sends traps (or notifications) to any registered SNMP trap listener. There is a one-to-one relationship between alarms and SNMP traps. The Management Information Base (MIB) file defining the SNMP traps is based on the content of the alarm.xml file. See "Generating SNMP MIB Files" for instructions on how to create these files.

Each individual alarm ID generates the object identifier for each SNMP trap.

The SNMP traps sent consist of:

IANA-registered private enterprise ID + BEA ID + Services Gatekeeper ID + ”0” + alarm identifier

  • The IANA-registered enterprise ID is configurable using the EnterpriseObjectIdentifier field in SNMPServiceMBean.

  • The BEA ID is static, and the value is 140.

  • The Services Gatekeeper ID is static, and the value is 627.

  • The alarm identifier is defined in alarm.xml, in the attribute id of the alarm element.

The default BEA-WLNG-MIB MIB file is located in Gatekeeper_home/ocsg_pds/integration, where Gatekeeper_home is the directory in which Services Gatekeeper is installed. You must create a new MIB file each time you change.

Configuring and Managing the SNMP Service

This section describes the following tasks required to configure and manage the SNMP service:

See "SNMPServiceMBean Reference" for information on using the SNMPServiceMBean.

Configuring SNMP Service

Table 10-1 lists the attributes used to configure the SNMP Service.

Table 10-1 Task Overview

To define Use This Field in SNMPServiceMBean

The SNMP Community string.

Community

Enterprise Object Identifier.

This attribute has a default value and should normally not be changed.

EnterpriseObjectIdentifier

SNMP version to use.

SNMPVersion

Which alarm severity levels that shall be distributed as SNMP traps.

SeverityFilter


Define trap receivers using the addTrapReceiver method in SNMPServiceMBean.

Trap Receivers

Table 10-2 lists the operations on trap receivers.

Table 10-2 Task Overview

To Use These Methods in SNMPServiceMBean

Add a trap receiver

addTrapReceiver

List defined trap receivers

listTrapReceivers

Delete an existing trap receiver

First, call listTrapReceivers to list the registered trap receivers. Locate the id of the trap receiver to delete.

Then, call deleteTrapReceiver with the ID of the trap receiver to delete as an input parameter.


See "SNMPServiceMBean Reference" for information on using the SNMPServiceMBean.

Generating SNMP MIB Files

The MIB file specifies the alarms that you forward as SNMP traps. When you change the alarm descriptor, you must generate a new MIB file and distribute it to your SNMP clients. You do this by copying the contents of the alarm descriptor and pasting it into an xml file. Use this xml file to generate the MIB file.

You generate the management interface base (MIB) file corresponding to the alarms using the mibgenerator Apache Ant task defined in com.bea.wlcp.wlng.ant.MIBGeneratorTask.

Unless stated otherwise, perform these steps in the Middleware_home/ocsg_pd/integration directory. Where Middleware_home is the directory that serves as the repository for common files that are used by Oracle Communications products installed on the same machine, such as Services Gatekeeper and WebLogic Server.

To generate a new MIB file:

  1. Create a /tmp directory.

  2. Copy the example alarm_example/edr-config.xsd file to the /tmp directory.

  3. Open the Gatekeeper_home/user_projects/domains/basic-domain/config/custom/wlng-edr.xml file for editing.

  4. Save the alarm-config portion of the Gatekeeper_home/user_projects/domains/domain_name/config/custom/wlng-edr.xml file to a file called alarm.xml. in the /tmp directory.

  5. Record the edrDir entry in Middleware_home/ocsg_pds/integration/build.xml so that you can recreate it.

  6. Change the edrDir directory in the example build file, Middleware_home/ocsg_pds/integration/build.xml to reference the /tmp directory using this example:

    edrDir=/tmp

  7. Navigate to Middleware_home/ocsg_pds/integration/ and run the

    ant generate-mib

    command to generate a new BEA-WLNG-MIB_Generated file containing the new list of alarms.

  8. Return the edrDir item in Middleware_home/ocsg_pds/integration/build.xml to it's original setting.

  9. Distribute the new BEA-WLNG-MIB file to all of your SNMP clients.

SNMPServiceMBean Reference

Set field values and use methods from the Administration Console by selecting Container, then Services, and then SNMPService. Alternately, use a Java application. For information on the methods and fields, see the "All Classes" section of Services Gatekeeper OAM Java API Reference.