The breadth and depth of OpManager’s fault management capability is fully utilized by many of our users. Few users however may not be aware of the extent of flexibility the application provides as far as managing alerts are concerned.

Yet another frequently asked/discussed requirement is the ability to forward alarms in OpManager as traps to another trap destination. Requests are also raised to know if the incoming trap can be redirected to another application. YES, both are possible. Here is how you go about the forwarding:

Forwarding Traps

Here, OpManager simply forwards the SNMP Trap to another manager/device. Forwarding traps from OpManager involves a couple of configuration changes in two files. Refer the table below:

1. Effect the following configuration changes:

File name & path Existing entry Modified entry

/opmanager/conf/trap.forwarder


(replace with the correct
IP address and port)
/opmanager/conf/trap.filters


2. Save the file and restart OpManager.

OpManager starts forwarding the incoming traps to the destination IP address and the Port mentioned in the trap.forwarder file.

Forwarding OpManager Alarms as Traps

You might want to forward the alarms in OpManager as traps to another destination/trap receiver. Here is how you do it:

1)Ensure Net-SNMP is installed on the OpManager server or download from the links given at the end of this post:

2)Create a batch file sendtrap.bat to invoke the snmptrap command. Place this file in  /opmanager folder. The syntax for this command is as follows:

snmptrap options hostname community trap parameters...

For Version 1, the required trap parameters are:

enterprise-oid agent trap-type specific-type uptime objectID type value…

The code snippet for this batch file is given below:

snmptrap -v 1 -c public %1 .1.3.6.7.2.1.3.1 %2 1 6 10000 .1.3.6.7.2.1.3.1.1.2 s “%3,%4,%5,%6”

where

-v 1 The SNMP version
-c The community string and the default SNMP community string is public
%1 The manager name, viz., the hostname or the IP address of the manager that must receive traps.
.1.3.6.7.2.1.3.1 Specify the appropriate enterprise OID
%2 The agent-name, that is the hostname or the IP address of the device for which an alarm is generated.
.1.3.6.7.2.1.3.1.1.2 Replace with the appropriate specific OID
1 The generic type number
6 The specific type number
10000 The sysUptime in milli-seconds
s Refers to the data type of the OID (string type)

“%3,%4,%5,%6”

(replace the % symbol with $ if you are doing it on a Linux box)

The message from OpManager that can contain one or more of the following variables:

  • $displayName – the Displayname of the device
  • $strModTime – the time when the alarm was generated
  • $category – the category to which this device belongs to
  • $severity – the severity of the alarm
  • $message – the message of the alarm ( like Web Service Down or Threshold Violated ).

3)Configure a ‘Run Program’ notification profile specifying the following:

Command Name: sendtrap.bat

Program Arguments :[manager-name] $source $displayName $strModTime $category $severity $message

3. You can associate this notification profile to devices using the Quick Configuration Wizard. Whenever an alarm is generated on the managed devices, a trap is sent to the other monitoring server.

NET-SNMP download (zip)

NET-SNMP download (exe)