Skip Headers
Oracle® Enterprise Manager SNMP Support Reference Guide
Release 10.2

Part Number B16244-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

2 Configuring SNMP for Oracle

This chapter covers procedures for:

Keep in mind that the SNMP configuration is operating system specific. For more comprehensive configuration information, see the installation or configuration guide specific to your platform.

Note:

The SNMP configuration is case sensitive. Specify all occurrences of community names in the same case.

Configuring SNMP on Microsoft Windows Platforms

You can configure SNMP on Microsoft Windows XP, Windows 2000, Windows 2003 Server, or Windows NT platform. The configuration procedures given in this section are based on Windows XP platform. However, the same procedures apply to Windows 2000, Windows 2003, and Windows NT platforms.

Before you integrate SNMP with Enterprise Manager SNMP Subagent, complete the following tasks:

After you integrate SNMP with Enterprise Manager SNMP Subagent, complete the following tasks:

Installing the SNMP Network Service

To install the SNMP network service on Windows XP:

  1. From the Start menu, select Settings > Control Panel > Add or Remove Programs.

  2. On the Add or Remove Programs window, select the Add/Remove Windows Components option.

    The Windows Components Wizard lists all the components of Windows XP.

  3. From the list of components displayed on the Windows Components Wizard, select the Management and Monitoring Tools component, and then click Next.

  4. On the Files Needed dialog, provide the location of the files that are needed for completing the installation, and then click OK.

    Note:

    The files needed for completing the installation vary from one platform to another. For example, it can be Immib2.dll file and snmpmib.dll file for Windows 2000 platform, msi.mfl file for Windows 2003 Server platform, nd so on.
  5. After the installation completes, check to make sure the installation was successful by selecting Settings > Control Panel > Administrative Tools > Services.

    The Services window lists all the services installed on your computer. Under the Name column check for SNMP Service and SNMP Trap Service.

Configuring the SNMP Network Service

Follow these steps to configure the SNMP Network Service on Windows XP:

  1. From the Start menu, select Settings > Control Panel > Administrative Tools > Services.

  2. Select SNMP Service from the list of services; right-click and select Properties.

  3. On the Agent tab, complete the following:

    • Contact: Contact information for this computer.

    • Location: Physical location of this computer.

    • Service: Select all Service Types (Physical, Applications, Datalink and subnetwork, Internet, and End-to-end).

  4. On the Traps tab, add the following:

    • Community Name: The community is usually public.

    • Trap Destinations: Specify either the host name or IP addresses. This should be for all machines working with SNMP aware products that require traps. If you specify a host name, the system must be able to locate the corresponding IP address.

Integrating SNMP with Enterprise Manager SNMP Subagent

Enterprise Manager SNMP Subagent supports SNMP, allowing third-party system management frameworks to use SNMP to receive SNMP Traps directly from Oracle Management Agent. By configuring Oracle Management Agent to recognize SNMP requests from the master agent, third-party systems can gather relevant data.

Installing the Peer Executables

Installing the peer executables is the first step toward integrating SNMP with Enterprise Manager SNMP Subagent. Oracle SNMP Peer Master Agent (AGNTSVC.EXE) and Oracle SNMP Peer Encapsulator (ENCSVC.EXE) are the two peer executables that are bundled with Enterprise Manager SNMP Subagent. When you install Enterprise Manager SNMP Subagent, these peer executables also get installed.

  1. After the installation is complete, select Settings > Control Panel > Administrative Tools > Services to see the following new services created:

    • Oracle SNMP Peer Master Agent

    • Oracle SNMP Peer Encapsulator

In the next section, you will learn how to configure the SERVICES file to have these peer executables listen on an unused port.

Configuring the SNMP Services File

In order for the SNMP Master Agent to communicate with both the standard SNMP services and the Enterprise Manager SNMP Subagent, the SNMP services file must be configured properly.

  1. Specify an unused port where the Oracle SNMP Peer Encapsulator and Microsoft SNMP Service should be listening. Microsoft SNMP Service typically uses port 1161.

    The port is specified in the SERVICES file located in the following directory:

    C:\WINDOWS\system32\drivers\etc
    

    Note:

    In Windows 2000 and Windows NT, the SERVICES file is located in the C:\WINNT\system32\drivers\etc directory.

    Make sure that you have the following lines in the file:

    snmp       1161/udp               #SNMP
    snmptrap   1162/udp   snmp-trap   #SNMP trap
    

    Note:

    If an entry for SNMP already exists in the file, change the port from 161 (default number) to another available port (1161 in this example).
  2. In the same location, check that the HOSTS and LMHOSTS.SAM files contain the mappings of IP addresses to host names for all computers in the SNMP setup.

    System performance will improve if more computer addresses can be resolved locally. Even if you use DHCP and WINS, adding the IP addresses will speed up the SNMP integration.

Modifying the Oracle SNMP Peer Master Agent Configuration File

Use the following procedure to modify the Oracle SNMP Peer Master Agent configuration file to reflect the SNMP configuration.

  1. Specify the port where the SNMP Master Agent is listening.

    The port is specified in the TRANSPORT section of the MASTER.CFG file located in the ORACLE_HOME\NETWORK\ADMIN directory.

    For example, add the following section to the file:

    TRANSPORT   ordinary     SNMP
    OVER UDP SOCKET
    AT PORT 161
    

    Note:

    It is recommended that you use port 161 for the Oracle SNMP Peer Master Agent since port 161 is reserved for the SNMP framework. However, you may specify a different available port if you can configure the management application on your NMS to send SNMP requests to the master agent listening on this port.
  2. Specify the authentication in the COMMUNITY section of the MASTER.CFG file.

    COMMUNITY public
    ALLOW ALL OPERATIONS
    USE NO ENCRYPTION
    
    
  3. If you need to send traps, specify the IP address (10.10.10.10 in this example) of that computer in the MANAGER section of the MASTER.CFG file.

    10.10.10.10
    SEND ALL TRAPS
    WITH COMMUNITY public
    
    

    You only need to modify the manager section if you need to send traps, or use software that can manipulate and react to SNMP Traps, such as HP Openview. For performance reasons, specify IP addresses here, instead of hostnames.

  4. If you have more than one Oracle SNMP Peer Master Agent running on a single computer, edit the Oracle SNMP Peer Encapsulator configuration file, ENCAPS.CFG. This file is located in the ORACLE_HOME\NETWORK\ADMIN directory and is used to specify which non-PEER master agents are to be encapsulated.

    You must add at least an AGENT entry, including MIB-subtrees manageable by NMS, for the encapsulated master agent.

    See the following example:

    AGENT AT PORT 1161 WITH COMMUNITY public
    SUBTREES 1.3.6.1.2.1.1,
             1.3.6.1.2.1.2,
             1.3.6.1.2.1.3,
             1.3.6.1.2.1.4,
             1.3.6.1.2.1.5,
             1.3.6.1.2.1.6,
             1.3.6.1.2.1.7,
             1.3.6.1.2.1.8,
             1.3.6.1.4.1.77
    FORWARD ALL TRAPS;
    

    Note:

    The port (1161 in this example) must match the one you specified in the SERVICES file. Also, the community name must match previous definitions.

Starting the SNMP Environment

After you complete the configuration, the next step is to start the SNMP services. It is important that you:

  • Verify UDP port 161 (or 1161) is unused

  • Start and stop the services in the correct order

Verifying Active UDP Ports

Before you can start the SNMP environment, you need to verify that no other services are running on the designated UDP ports.

  1. From the ORACLE_HOME\BIN directory, type the following command:

    netstat -p udp -a
    
    

    The results of this command list all active UDP ports on the computer. Port 161, and the SNMP port you specified in the SERVICES file must be unused.

Manually Starting SNMP Services

  1. From the Start menu, select Settings > Control Panel > Administrative Tools > Services. In the Services window, check the status of Oracle SNMP Peer Master Agent, Oracle SNMP Peer Encapsulator, and SNMP Service. If they were previously started, terminate these programs now.

  2. Check the status of Enterprise Manager SNMP Subagent. If it was previously started, stop it now.

  3. Start the SNMP services in the following order:

    • SNMP Service

    • Oracle SNMP Peer Master Agent

    • Oracle SNMP Peer Encapsulator

    • Enterprise Manager SNMP Subagent

      Tip:

      To start, stop, or request the status of Enterprise Manager SNMP Subagent, use the Enterprise Manager command line utility (emctl). See Controlling Enterprise Manager SNMP Subagent for instructions.

Note:

The Oracle SNMP Peer Encapsulator is required only when you have more than one Enterprise Manager SNMP Subagent installed and configured on the computer.

Starting and Stopping SNMP Services by Batch File

You can also launch all relevant SNMP services by creating a batch file to automate the process. For example:

NET START "SNMP"
NET START "SNMP Trap Service"
Start C:\ORACLE_HOME\BIN\emctl start agent C:\ORACLE_HOME\NETWORK\ADMIN\master.cfg  C:\ORACLE_HOME\NETWORK\LOG\master.log
NET START "Service Name"

Testing the SNMP Environment

Once you have successfully installed SNMP, you are ready to query the MIBs from your Network Management Station.

One way to test the SNMP environment is by using the SNMPUTILG tool. The Windows XP Service Pack 2 Support Tools contains this SNMP troubleshooting tool that you can use to get basic information about the SNMP setup.

Note:

You must download the Windows XP Service Pack 2 Support Tools separately at http://www.microsoft.com. Also, for other platforms like Windows 2003 Server, Windows 2000, and Windows NT, look for the SNMPUTILG.EXE tool in their respective service packs or resource kits.

The GUI SNMP Query/Set Utility (SNMPUTILG.EXE) (Figure 2-1) replaces the previous command line SNMPUTIL.EXE tool.

Figure 2-1 GUI SNMP Query Set/Utility

GUI SNMP Query Set/Utility
Description of "Figure 2-1 GUI SNMP Query Set/Utility"

Testing the Value of an OID

To test the value of an OID:

  1. Open the GUI SNMP Query/Set Utility window (Figure 2-1) and change the following fields to reflect your values.

    • Node Address: IP address of your machine. This computer must be running the SNMP service.

    • Community Name: The community is usually public.

    • Current OID: .1.3.6.1.2.1.1.1.0

    • SNMP Function to Execute: Select GET the value of the current OID.

  2. Click Execute Command.

    If the master agent is running correctly, it will return the sysDescr system identifier.

Testing Oracle Specific Values

Issue the following OID to test for Oracle specific values:

  1. Follow the instructions in the Testing the Value of an OID section.

  2. For the Current OID value, use .1.3.6.1.4.1.111.4.1.6.1.1. ÒindexÒ

    Where index is the value specified in the SNMP_RW.ORA file for the database you wish to query.

Configuring SNMP on UNIX Platform

The following configuration instructions are for Unix platforms using O/S native or master agents that use the Peer Technology.

Configuring SNMP on UNIX platforms requires the following:

Using only an SNMP Console

Monitoring consoles use an SNMP Master Agent to communicate with the Enterprise Manager SNMP Subagent. The SNMP Master Agent must be configured correctly before the Enterprise Manager SNMP Subagent can communicate over SNMP to the SNMP Master Agent.

The following is an example of the process for configuring the SNMP Master Agent on a UNIX platform.

Note:

SNMP with the Enterprise Manager SNMP Subagent is not supported by all platforms. Refer to the installation or configuration guide for your specific platform to identify differences in the configuration procedures and to confirm SNMP support.

Configuring the SNMP Master Agent

The necessary SNMP files are automatically installed when you install Oracle Management Agent. After installing Oracle Management Agent, edit the following files:

$ORACLE_HOME/sysman/snmp/peer/CONFIG.master 
$ORACLE_HOME/sysman/snmp/peer/CONFIG.encap
$ORACLE_HOME/sysman/snmp/peer/start_peer
/etc/snmp/conf/snmpd.conf

CONFIG.Master (Peer Master Agent file)

To edit the CONFIG.master file, find the line beginning with MANAGER and change the IP address coded in this line to match the IPaddress of the machine where the SNMP Traps will be sent.

CONFIG.encap (Peer Encapsulator file)

To edit the CONFIG.encap file, find the line AGENT AT PORT. It normally reads AGENT AT PORT 1161 WITH COMMUNITY public. If you modify the port number from 1161, you must also modify the start_peer script.

start_peer Script

To edit the start_peer script, find the line NEW_SNMPD_PORT= and verify that it is using the same port number as listed in the CONFIG.encap file. Find the line NEW_TRAPD_PORT= and verify the port number is different than NEW_SNMPD_PORT=.

snmpd.conf File

Add the following line to the file:

trap <hostname or ipaddress>

Replace the information in brackets with the actual hostname or IPaddress of the local host where the file is located.

Once you have configured the SNMP Master Agent to use only the SNMP console, you then need to configure the SNMP Console to receive external traps on the managed node.

For more comprehensive configuration information, see the documentation specific to your platform; SNMP configuration differs from platform to platform.

Starting the SNMP Agents

Make sure no SNMP components are running. The three main components are the master_peer, encap_peer, and snmpd. If any of these processes are running, use the ps command to find them, and the kill command to terminate these processes.

For example, the following checks to see if the SNMP Master Agent is running.:

ps -ef | grep snmp

Start the PEER Master Agent, PEER encapsulator, and native UNIX SNMP Agent:

cd $ORACLE_HOME/network/snmp/peer 
  su root 
  ./start_peer -a   

This command starts all three processes. Then use the ps command to determine if all three processes were started:

ps -ef |grep peer 
ps -ef |grep snmpd 
ps -ef |grep snmp

Loading the Oracle MIBs

Load the Oracle MIBs according to the instructions provided in your SNMP Console configuration guide.

Configuring SNMP with Enterprise Manager

The Enterprise Manager SNMP Subagent and necessary SNMP files are automatically installed when you install Oracle Management Agent.

Note:

Notification methods based on SNMP Traps must be configured by an administrator with super administrator privileges before any user can then choose to select one or more of these SNMP Trap methods while creating/editing a notification rule.

Controlling Enterprise Manager SNMP Subagent

The Enterprise Manager command line utility (emctl) is used to start, stop, or request the status of Enterprise Manager SNMP Subagent.

Use the following commands to start, stop, or request the status of the subagent. The following examples show the command and expected output.

Example 2-1 Starting the Enterprise Manager SNMP Subagent

% emctl start subagent

Oracle Enterprise Manager 10g Release 10.1.0.4.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Starting sub agent ... started

Example 2-2 Stopping the Enterprise Manager SNMP Subagent

% emctl stop subagent

Oracle Enterprise Manager 10g Release 10.1.0.4.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Stopping sub agent ... stopped

Example 2-3 Requesting Status of the Enterprise Manager SNMP Subagent

% emctl status subagent

Oracle Enterprise Manager 10g Release 10.1.0.4.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Sub agent is running OR Sub agent is not running

Setting Up SNMP Trap Notifications

Follow these steps to set up SNMP Trap notifications:

  • From the Enterprise Manager Grid Control Console, define an SNMP Trap destination by going to the Notification Methods page under Setup.

    Notification Methods allow you to define different mechanisms for sending notifications, for example, e-mail, SNMP Traps, running custom scripts, or all three. Once defined, these methods can then be used with Notification Rules for sending notifications to administrators as a result of alert occurrences.

  • Under Scripts and SNMP Traps, select SNMP Trap from the Add menu.

  • On the Add SNMP Trap page, provide the name of the host (machine) on which the SNMP Master Agent is running, the port it is listening on, and the community it is part of (Figure 2-2).

    Figure 2-2 Adding SNMP Trap

    Adding SNMP Trap
    Description of "Figure 2-2 Adding SNMP Trap"

    Note:

    A Test Trap button exists for you to test your setup.
  • After you have defined the Notification Method, define a Notification Rule by going to the Notification Rules page under Preferences.

    Notification rules allow you to choose the targets and conditions for which you want to receive notifications from Enterprise Manager.

  • Click Create on the Notification Rules page to display the Create Notification Rule property pages. See the online help provided for these pages and follow the instructions carefully to create your Notification Rule. While defining the Notification Rule, remember to include the Notification Method created in the previous steps.

The MIBs for each trap type are available in Appendix F, "Interpreting Variables of the Enterprise Manager MIB". For more details on how to set up Enterprise Manager to deliver SNMP Traps, refer to the Oracle Enterprise Manager Advanced Configuration guide 10g Release (10.2).

Example 2-4 shows a typical SNMP Trap.

Example 2-4 SNMP Trap

Tue Oct 28 05:00:02 2003

Command: 4
   Enterprise: 1.3.6.1.4.1.111.15.2
   Agent: 138.1.6.200
   Generic Trap: 6
   Specific Trap: 1
   Time Stamp: 8464:39.99
   Count: 11
Name: 1.3.6.1.4.1.111.15.1.1.1.2.1
   Kind: OctetString
   Value: "mydatabase"
Name: 1.3.6.1.4.1.111.15.1.1.1.3.1
   Kind: OctetString
   Value: "Database"
Name: 1.3.6.1.4.1.111.15.1.1.1.4.1
  Kind: OctetString
  Value: "myhost.com"
Name: 1.3.6.1.4.1.111.15.1.1.1.5.1
   Kind: OctetString
   Value: "Owner's Invalid Object Count"
Name: 1.3.6.1.4.1.111.15.1.1.1.6.1
   Kind: OctetString
   Value: "Invalid Object Owner"
Name: 1.3.6.1.4.1.111.15.1.1.1.7.1
   Kind: OctetString
   Value: "SYS"
Name: 1.3.6.1.4.1.111.15.1.1.1.8.1
   Kind: OctetString
   Value: "28-OCT-2003 04:59:10 (US/Eastern GMT)"
Name: 1.3.6.1.4.1.111.15.1.1.1.9.1
   Kind: OctetString
   Value: "Warning"
Name: 1.3.6.1.4.1.111.15.1.1.1.10.1
   Kind: OctetString
   Value: "12 object(s) are invalid in the SYS schema."
Name: 1.3.6.1.4.1.111.15.1.1.1.11.1
   Kind: OctetString
   Value: "Database Metrics"
Name: 1.3.6.1.4.1.111.15.1.1.1.12.1
   Kind: OctetString
   Value: "SYSMAN"