Setting Up the Sending of SNMP Traps
Use
Use an auto-reaction method to send SNMP traps and the associated notification, for example, to external management platforms. If an alert occurs (for example, a value exceeds or falls below a threshold value), the monitoring architecture starts the auto-reaction method which collects the required information and sends the trap to an external recipient.
Use the following auto-reactions for sending SNMP traps:
| Method | Description |
|---|---|
|
CCMS_OnAlert_SNMP_TRAP |
Sending SNMP traps of SNMP version 1 or 2c to one recipient; perform the configuration directly in the method parameters |
|
CCMS_OnAlert_SNMP_TRAP_CFG |
Sending SNMP traps of version 3 or SNMP traps to multiple recipients; since you must set more than ten parameters in each case, you cannot do this using method parameters. Specify a configuration file instead. |
Prerequisites
To be able to send SNMP traps if monitoring architecture alerts occur, you require SNMPLIB. To download the archive, proceed as follows:
- Use your SAP Service Marketplace ID to log on to the Software Catalog of the SAP Service Marketplace (http://service.sap.com/swdc
). - In the navigation bar, choose Download → Support Packages and Patches →Entry by Application Group →SAP SAP NetWeaver →SAP SAP NetWeaver →SAP SAP NetWeaver 04 → Entry by Component → Application Server ABAP → SAP KERNEL 6.40 32/64-BIT → <operating system> →Database Independent.
- Download the archive SNMPLIB_<Version>.SAR.
- Decompress the archive with the command sapcar -xvf SNMPLIB_<Version>.SAR.
Now perform the following steps in the central monitoring system (and in all systems in which the auto-reaction methods are to be executed):
- Copy all files and directories from the for_central_system directory of the SNMPLIB to the $DIR_EXECUTABLE of all application servers of the system.
- Ensure that the user <sid>adm can run the executables.
- Ensure that your control program sapxpg has at least Patch Level 1 for SAP Kernel 6.40 (status at May 2004) on all application servers. If this is not the case, download the newest version from the SAP Service Marketplace (http://service.sap.com/swdc)and replace the existing file.
To do this, choose the following path in the navigation bar:
Download → Support Packages and Patches → Entry by Application Group → SAP NetWeaver →SAP SAP NetWeaver →SAP SAP NetWeaver 04 → ABAP Server → SAP KERNEL 6.40 32/64-BIT → <operating system> → Database Independent.
Procedure
Copying and Releasing the Method Definitions
We recommend that you leave the original method unchanged and use it only as a template for your methods.
- Choose CCMS → Configuration → Alert Monitor, or call transaction RZ21.
- In the Methods group box, select Method Definitions and choose Display Overview.
- Select the desired method and choose Copy (
). - Enter the desired name for the copy, and choose Continue (Enter) (
). - When you copy a method, the system resets the release of the copy. To be able to use the copy as an auto-reaction method, you must therefore explicitly release it as an auto-reaction method. First switch to change mode by choosing the Display «Change (
) button. - Choose the Release tab page and in the Execute Method as group box, select Auto-Reaction Method.
- If you want to use the method as a central auto-reaction, choose the Control tab page, and choose the radio button Only in central system, triggered by CCMS agents.
Adjusting Method Definitions
You must, for example, store the recipient to which the SNMP traps are to be sent in the method. The method therefore requires additional parameters.
- Choose the Parameters tab page.
- If you are using the method CCMS_OnAlert_SNMP_TRAP_CFG, specify a configuration file in the method parameter CFG_FILE to adjust the method. For information about adjusting this file, see Adjusting the Configuration File for Sending SNMP Traps.
- If you are using the method CCMS_OnAlert_SNMP_TRAP, adjust the values of the following method parameters:
Parameter Meaning Default VERSION
SNMP version (1 or 2c)
1
HOSTNAME
Receiving host for the SNMP traps
localhost
COMMUNITY
Name of the community (logical group of devices within a network monitored by SNMP, to which access rights are assigned)
public
INFORM
Indicator of whether a trap (<SPACE>) or an inform (X) is to be sent; with an inform, unlike with an SNMP trap, a return message is sent (as of SNMP version 2c)
<SPACE>
TIMEOUT
Timeout for the request in seconds (only if INFORM=X)
1
RETRIES
Number of repetitions if the timeout is exceeded (only if INFORM=X)
5
TRANSPORT
Transport protocol
UDP
PORT
Port number of the recipient of the SNMP trap
162
MIB_DIR
Complete path of the directory that contains the Management Information Base (MIB) files
.
Assigning Methods as Auto-Reactions
Follow the appropriate link, depending on whether you want to assign the method to the desired node as a local auto-reaction or as a central auto-reaction:
| Assignment of the Method | Link |
|---|---|
|
Local auto-reaction |
|
|
Central auto-reaction |
Result
You have activated and adjusted the method definitions, and assigned them to the desired nodes in the alert monitoring tree. If an alert now occurs in one of these nodes, an SNMP trap is sent.
More information:
Detailed documentation about sending SNMP traps as auto-reactions in the SNMPLIB archive
Sending and Receiving Alerts Using SNMP Traps start page