Entering content frame

Function documentation Adjusting the Configuration File for Sending SNMP Traps Locate the document in its SAP Library structure

Use

You require a configuration file in the following cases to set up the sending of SNMP traps:

·        If you are using the method CCMS_OnAlert_SNMP_TRAP_CFG (use this method if you want to send SNMP traps to multiple recipients, or if you are using SNMP version 3)

·        When sending SNMP traps as a function of the CCMS agents:

You define details about the sending of the SNMP traps in the configuration file, such as the recipients and the port to which the traps are to be sent, and the protocol with which they are to be sent.

Features

The values in the configuration file are determined using three levels:

·        Predefined default values

·        General default values of the configuration file (section [SNMP_DEFAULT])

·        Special values for a recipient host ([DESTINATION_<x>] sections)

These values have increasing priority from the top of the file to the bottom; that is, a value that is specified in a level with a higher value overwrites the value of a lower level.

You can set the following parameters in each of the above sections ([SNMP_DEFAULT] and [DESTINATION_<x>]):

Parameter

Description

VERSION

SNMP version (1, 2c, or 3)

HOSTNAME
COMMUNITY
INFORM
TIMEOUT
RETRIES
TRANSPORT
PORT
MIB_DIR

Parameters whose names and meanings correspond to those of the method parameters for the method CCMS_OnAlert_SNMP_TRAP (see Structure linkSetting Up the Sending of SNMP Traps as Auto-Reaction Methods)

Set the following parameters only if you are using SNMP version 3:

Parameter

Description

USER_NAME

Name of the SNMP user

AUTH_PASSPHRASE

Password of the SNMP user

SECURITY_LEVEL

Security level; the following levels are supported:

NoauthNoPriv: no authentication, no encryption (Default)

authNoPriv: Authentication, no encryption

AUTH_PROTOCOL

Procedure for authenticating the message (creation of a checksum used to ensure that the message was not changed); the MD5 (Message Digest 5) procedure is supported

SECURITY_ENGINE

Engine ID of the application from which the SNMP traps are to be sent; this parameter is only required if INFORM=0, since the engine ID is generated during the communication if INFORM=1

CONTEXT_ENGINE
CONTEXT_NAME

Reserved for internal use

PRIV_PROTOCOL
PRIV_PASSPHRASE

Not yet supported

Activities

·        When sending SNMP traps as a function of the CCMS agents:

Specify the complete path of the adjusted configuration file in the parameter TrapSendFile (see Setting Up the Sending and Receiving of SNMP Traps Using CCMS Agents).

·        When sending SNMP traps using the method CCMS_OnAlert_SNMP_TRAP_CFG::

Specify the complete path of the adjusted configuration file in the method parameter CFG_FILE. Perform the usual adjustment and assignment of the method as described in Structure linkSetting Up the Sending of SNMP Traps as Auto-Reaction Methods.

Example

There is a template with the default settings for the configuration file in the SNMPLIB archive. This template has the following content:

####################################################################
# Configuration File for trapsend_cfg executable                   
# trapsend_cfg can send SNMP traps to more than one destination    
#                                                                  
# How the values are set:                                           
#                                                                  
# Default Template [SNMP_DEFAULT] parameters specified here are    
# valid for all [DESTINATION_x] templates                          
#                                                                   
# default, if parameter is not set                                 
# VERSION    1                     TRANSPORT  UDP                  
# HOSTNAME   localhost             MIB_DIR    .                     
# PORT       162                   COMMUNITY  PUBLIC               
# TIMEOUT    1                     INFORM     0                    
# RETRIES    5                                                     
#                                                                   
# for v3 traps                                                     
# USER_NAME                        CONTEXT_ENGINE                  
# AUTH_PASSPHRASE                  CONTEXT_NAME                    
# AUTH_PROTOCOL                    PRIV_PROTOCOL                   
# SECURITY_LEVEL                   PRIV_PASSPHRASE                 
# SECURITY_ENGINE                                                  
#                                                                   
# Destination Template [DESTINATION_<X>] parameters set in         
# [SNMP_DEFAULT] can be overwritten here for a specific destination
#                                                                  
####################################################################

# this is an example of a configuration file
[SNMP_DEFAULT]
HOSTNAME=ls3016
MIB_DIR=.

# send SNMP v1 trap to DESTINATION_0
[DESTINATION_0]
VERSION=1
COMMUNITY=PUBLIC
TIMEOUT = 3
RETRIES = 2
TRANSPORT =UDP
HOSTNAME=ls3016

# send SNMP v2 trap to DESTINATION_1
[DESTINATION_1]
VERSION=2c
INFORM=0

# send SNMP v3 trap to DESTINATION_2
[DESTINATION_2]
VERSION=3
INFORM=1
USER_NAME=myuser
AUTH_PASSPHRASE=mypassword

# send SNMP v3 trap to DESTINATION_3
[DESTINATION_3]
VERSION=3
INFORM=0
USER_NAME=myuser
AUTH_PASSPHRASE=mypassword
SECURITY_ENGINE=0x0102030405
HOSTNAME=ls3016
AUTH_PROTOCOL=MD5

This graphic is explained in the accompanying text Structure linkSending and Receiving Alerts Using SNMP Traps start page

 

Leaving content frame