BLOG     |     FORUM
Trap Config Manager

Trap Configuration Reference

The trap configuration comprises the user defined trap profiles, severity definitions, trap speak dictionary, and trap filter definitions. All these can be scripted using the "UnbrowseSNMP.TrapConfiguration" object. These objects allows you to manage hundreds of carefully defined trap profiles and severity levels.

Trap Configuration Manager Diagram

Links


TrapConfigManager (top level object)

Allows high level access to maintain user defined trap profiles, severity levels, trap filters, and trap speak dictionary.

Creating the top level object

VBScript

Set TrapConfig = CreateObject("UnbrowseSNMP.TrapConfigManager")

Ruby

myTrapConfigObject = WIN32OLE.New("UnbrowseSNMP.TrapConfigManager")

Events

None

Properties and Methods

NameParametersAccessDescription
ProfilesCollection of TrapProfile objects -
Return
ReadAll the trap profiles defined in Unbrowse SNMP.

Eg.
For Each Prof In TrapMgr.Profiles
- - -
Next
GroupsCollection of TrapGroup objects ReadAll the trap groups defined in Unbrowse SNMP.

FiltersCollection of TrapFilter objectsReadAll the trap filters defined in Unbrowse SNMP.
SpeakDictionaryTrap Speak Dictionary objectReadThe Trap Speak Dictionary is an advanced feature of Unbrowse SNMP. It allows you to convert text like "Fast Ethernet 0" into speech such as "NJ T1 4 circuit".
Load NALoad the Trap Configuration. This method must be called before any accessing other information.
Open NASame as load
Save NASave the changes made to the trap configuration.
NewTrapProfileString - OID

TrapProfile object- Return value
NACreate a new trap profile object. Each trap profile is associated with a single OID corresponding to the trap.
RemoveTrapProfileString - Trap OIDNARemoves the trap profile for the specified OID. No harm is done if a trap profile with the OID does not exist.

See Also:
IsTrapProfilePresent method to check if a particular trap OID has a profile associated with it.
NewTrapFilterTrap Filter object - return valueNACreates a new trap filter object.
RemoveTrapFilterString - nameNARemove the trap filter object with the given name.
NewTrapGroupTrap Group object - return value NACreates a new trap group.
RemoveTrapGroupTrap Group object NA Removes the specified trap group object.
IsTrapProfilePresentString - Trap OID

Bool - Return
NAReturn "True" if a trap profile exists for the specified Trap OID.
AddVarbindEnumString - Varbind OID

Numeric - Enum Number

String -
Enum Name
NAThis is an advanced feature of the Unbrowse SNMP trap receiver. Allows you to assign user friendly strings to varbind values.
LookupVarbindEnumString - Varbind OID

Numeric -
Enum Number

String - Return value
NAConverts a varbind enum number to a user friendly name.


TrapProfile

Trap Profiles allow you to control how a particular SNMP trap is handled by the trap receiver.
You can:
  • Assign a severity level to a trap
  • Control how a trap is formatted and displayed
  • Assign a trap speak message (for the text to speech engine)
  • Assign a correlation expression (when you get a trap, you can perform a SNMP GET to obtain more information automatically)

Events

None

Properties and Methods

NameParametersAccessDescription
OIDString The trap OID of the trap. A trap profile is associated with a specific trap object.
Severity TrapSeverityRead
Write
The default trap severity level assigned to this trap
DisplayFormat StringRead
Write
Trap Display format string. Controls how a trap is displayed.

See online help for all available formatting expressions.
SpeakFormat StringRead
Write
For the TrapSpeak feature. Controls what phrases are spoken when a particular trap is received.

See online help for available options.
TrapGroupsCollection of TrapGroup objectsReadCollection of trap group objects
AddToTrapGroupTrap Group object Add this trap to a trap group.
RemoveFromTrapGroupTrap Group object Remove this trap from the specified trap group

StringReadThe Trap OID
HasSeverityExpressionBool ReadDoes this trap profile have a severity expression ?

A severity expression is used to assign a severity level to a trap based on the value of certain varbinds..
TrapSeverityExpressionCountNumericReadThe number of trap severity expressions.
GetTrapSeverityExpressionByIndexNumeric - Index of trap sev expression

Numeric Ref - Varbind Index

String Ref - Operator string

Numeric -
Varbind value

Trap Severity -
NAGet the trap severity expression by index.

SeverityControlVariableNumericRead
Write
Unbrowse SNMP can assign a custom severity to a trap based on many values of a single varbind. This varbind is called a control variable.

This property returns the control variable from among the varbinds.
AddTrapSeverityExpressionString - Operator

Numeric -
Value of varbind

Trap Severity -
Severity i

NAAdds a trap severity expression.
DefaultCustomSeverity
Trap Severity NAIf none of the trap severity expressions match. This is the severity attached to the trap.

CorrelationExpression
String ReadTrap correlation is an advanced feature of Unbrowse SNMP. The correlation expression is used to retrieve additonal information from SNMP agets via a GET, in response to certain traps.

TrapFilter

Manage trap filters.

Events

None

Properties and Methods

NameParametersAccessDescription
HostsAllow

String - List of hostsRead
Write
Filter traps to or from specific management stations (trap targets).

Allow List = Comma separated list of IP addresses
HostsDeny


String - List of hostsRead
Write
Block traps sent to these hosts (trap targets)

Block List = Comma separated list of IP addresses
TrapOIDSAllowString - List of OIDsRead
Write
Allow only these traps identified by the trap OID to make it past the filter.

Allow List = Comma separated list of trap OIDs
TrapOIDSDenyString - List of OIDsRead
Write
Block these traps

Block List = Comma separated list of trap OIDs
AgentsAllowString - List of agentsRead
Write
Allows traps only from these SNMP agents

Allow List = Comma separated list of IP addresses
AgentsDenyString - List of agentsRead
Write
Block traps from these SNMP agents

Block List = Comma separated list of IP addresses
AllowNotifyPDUBoolRead
Write
Controls whether NOTIFY traps are allowed
AllowTrapPDUBoolRead
Write
Controls whether TRAP messages are allowed
AllowInformPDUBoolRead
Write
Controls whether INFORM messages are allowed
AllowSNMPv1BoolRead
Write
Controls whether SNMPv1 version trap messages are allowed
AllowSNMPv2cBoolRead
Write
Controls whether SNMPv2 version trap messages are allowed
AllowSNMPv3BoolRead
Write
Controls whether SNMPv3 version trap messages are allowed
NameStringRead
Write
A friendly name for the trap filter. This name shows up in the trap console filter combo box.
PortsAllowString - List of portsRead
Write
List of UDP or TCP ports which are allowed. By default all traps on the standard UDP SNMP port 162 are allowed.
PortsDenyString - List of portsRead
Write
List of UDP or TCP ports which are blocked.

TrapSpeakDictionary

Advanced feature of Unbrowse SNMP. The Trap Speak feature allows you to put Unbrowse SNMP in a corner and speak out traps information as they are received. This allows you to monitor traps in a hands off manner in a lab environment. The Trap Dictionary allows you to convert specific text strings to speech friendly phrases. For example : You can convert "10.17.20.4-FastEthernet/0" to "East Wing Link to second floor"

Events

None

Properties and Methods

NameParametersAccessDescription
EntriesCollection of TrapSpeakDictionaryEntry objectsReadAll trap speak dictionary entries
LookupString - Key

String - Return value
NALookup the trap speak phrase for a given key
AddString - Key

String - Trap Speak Phrase
NAAdd a trap speak dictionary entry. The speak phrase will replace the key.
RemoveString - KeyNARemove the trap speak dictionary entry corresponding to the key
CheckDuplicateKeyString - Key

Bool - Return value
NAUse this method to check if a trap speak dictionary entry already exists for the given key

TrapSpeakDictionaryEntry object

The dictionary is a collection of these Key -> Speech phrase objects.

Events

None

Properties and Methods

NameParametersAccessDescription
KeyStringReadThe Key
SpeakText
StringRead
Write
The speech phrase

Enumerations

TrapSeverity

/* trap/alarm severity levels */
typedef enum {
        VTRAP_SEVERITY_UNASSIGNED               =0,
        VTRAP_SEVERITY_INFO                     =1,
        VTRAP_SEVERITY_MINOR                    =2,
        VTRAP_SEVERITY_MAJOR                    =3,
        VTRAP_SEVERITY_CRITICAL                 =4,
        VTRAP_SEVERITY_CLEAR                    =5,
        VTRAP_SEVERITY_CUSTOM                   =6,
        VTRAP_SEVERITY_USER1                    =7,
        VTRAP_SEVERITY_USER2                    =8
} VTrapSeverity;