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. |
To be able to send SNMP traps if monitoring architecture alerts occur, you require SNMPLIB. To download the archive, proceed as follows:
Now perform the following steps in the central monitoring system (and in all systems in which the auto-reaction methods are to be executed):
If you do not know the directory, you can use transaction AL11 (SAP Directories) to determine it for the current application server.
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.
For more information about sapxpg, see SAP Notes 677435 (Overview: external programs and external commands) and 686765 (Security check when you execute external commands).
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.
If the method is to be executed as a local auto-reaction, adjust the method in the monitored systems; if the method is to be executed as a central auto-reaction, adjust the method in the central monitoring system.
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.
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 Caution
Change the value in every case. If you have copied the files as described above, the correct value is, for example, $DIR_EXECUTABLE/MIBS (/usr/sap/<SysID>/SYS/exe /run/MIBS). |
. |
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