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.
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:
To install the SNMP network service on Windows XP:
From the Start menu, select Settings, then Control Panel, and then Add or Remove Programs.
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.
From the list of components displayed on the Windows Components Wizard, select the Management and Monitoring Tools component, and then click Next.
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, and so on.
After the installation completes, check to make sure the installation was successful by selecting Settings, then Control Panel, then Administrative Tools, and then Services.
The Services window lists all the services installed on your computer. Under the Name column check for SNMP Service and SNMP Trap Service.
Follow these steps to configure the SNMP Network Service on Windows XP:
From the Start menu, select Settings, then Control Panel, then Administrative Tools, and then Services.
Select SNMP Service from the list of services; right-click and select Properties.
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).
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.
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 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.
After the installation is complete, select Settings, then Control Panel, then Administrative Tools, and then 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.
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.
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).
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.
Use the following procedure to modify the Oracle SNMP Peer Master Agent configuration file to reflect the SNMP configuration.
Specify the port where the SNMP Master Agent is listening.
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.
COMMUNITY public ALLOW ALL OPERATIONS USE NO ENCRYPTION
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 host names.
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 126.96.36.199.2.1.1, 188.8.131.52.2.1.2, 184.108.40.206.2.1.3, 220.127.116.11.2.1.4, 18.104.22.168.2.1.5, 22.214.171.124.2.1.6, 126.96.36.199.2.1.7, 188.8.131.52.2.1.8, 184.108.40.206.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.
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
Before you can start the SNMP environment, you need to verify that no other services are running on the designated UDP ports.
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.
From the Start menu, select Settings, Control Panel, Administrative Tools, and then 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.
Check the status of Enterprise Manager SNMP Subagent. If it was previously started, stop it now.
Start the SNMP services in the following order:
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.
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"
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.
To test the value of an OID:
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
Current OID: .220.127.116.11.18.104.22.168.0
SNMP Function to Execute: Select GET the value of the current OID.
Click Execute Command.
If the master agent is running correctly, it will return the sysDescr system identifier.
Issue the following OID to test for Oracle specific values:
Follow the instructions in the Testing the Value of an OID section.
For the Current OID value, use .22.214.171.124.126.96.36.199.188.8.131.52. “index“
Where index is the value specified in the SNMP_RW.ORA file for the database you wish to query.
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:
Note:For IBM AIX systems, see "Configuring SNMP on IBM AIX Systems".
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.
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
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.
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.
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=.
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.
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
Because IBM AIX has its own native SNMP agent, you do not use the start_peer script for SNMP Agent start up.
For IBM AIX systems:
Add the following line to the snmpd.conf file:
smux 0.0 "" server_IP_address
server_IP_address is the interface to which Oracle Management Agent is bound. To confirm this address, at the UNIX prompt, enter
hostname and press RETURN. Then ping the returned host name and use the IP address that is returned.
To enable the SNMP Master Agent to read the updated snmpd.conf file, you must refresh or restart snmpd.
refresh -s snmpd
stopsrc -s snmpd startsrc -s snmpd
Load the Oracle MIBs as described in "Loading the Oracle MIBs".
Load the Oracle MIBs according to the instructions provided in your SNMP Console configuration guide.
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.
Use the following commands to start, stop, or request the status of the subagent. The following examples show the command and expected output.
% emctl start subagent Oracle Enterprise Manager 11g Release 184.108.40.206.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. Starting sub agent ... started
% emctl stop subagent Oracle Enterprise Manager 11g Release 220.127.116.11.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. Stopping sub agent ... stopped
Follow these steps to set up SNMP Trap notifications:
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).
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".
Example 2-4 shows a typical SNMP Trap.
Tue Oct 28 05:00:02 2003 Command: 4 Enterprise: 18.104.22.168.22.214.171.124.2 Agent: 126.96.36.199 Generic Trap: 6 Specific Trap: 1 Time Stamp: 8464:39.99 Count: 11 Name: 188.8.131.52.184.108.40.206.220.127.116.11.1 Kind: OctetString Value: "mydatabase" Name: 18.104.22.168.22.214.171.124.126.96.36.199.1 Kind: OctetString Value: "Database" Name: 188.8.131.52.184.108.40.206.220.127.116.11.1 Kind: OctetString Value: "myhost.com" Name: 18.104.22.168.22.214.171.124.126.96.36.199.1 Kind: OctetString Value: "Owner's Invalid Object Count" Name: 188.8.131.52.184.108.40.206.220.127.116.11.1 Kind: OctetString Value: "Invalid Object Owner" Name: 18.104.22.168.22.214.171.124.126.96.36.199.1 Kind: OctetString Value: "SYS" Name: 188.8.131.52.184.108.40.206.220.127.116.11.1 Kind: OctetString Value: "28-OCT-2003 04:59:10 (US/Eastern GMT)" Name: 18.104.22.168.22.214.171.124.126.96.36.199.1 Kind: OctetString Value: "Warning" Name: 188.8.131.52.184.108.40.206.220.127.116.11.1 Kind: OctetString Value: "12 object(s) are invalid in the SYS schema." Name: 18.104.22.168.22.214.171.124.126.96.36.199.1 Kind: OctetString Value: "Database Metrics" Name: 188.8.131.52.184.108.40.206.220.127.116.11.1 Kind: OctetString Value: "SYSMAN"