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.
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") |
EventsNone
Properties and MethodsName | Parameters | Access | Description | Profiles | Collection of TrapProfile objects - Return | Read | All the trap profiles defined in Unbrowse SNMP.
Eg. For Each Prof In TrapMgr.Profiles - - - Next | Groups | Collection of TrapGroup objects | Read | All the trap groups defined in Unbrowse SNMP.
| Filters | Collection of TrapFilter objects | Read | All the trap filters defined in Unbrowse SNMP. | SpeakDictionary | Trap Speak Dictionary object | Read | The 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 | | NA | Load the Trap Configuration. This method must be called before any accessing other information. | Open | | NA | Same as load | Save | | NA | Save the changes made to the trap configuration. | NewTrapProfile | String - OID
TrapProfile object- Return value | NA | Create a new trap profile object. Each trap profile is associated with a single OID corresponding to the trap. | RemoveTrapProfile | String - Trap OID | NA | Removes 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. | NewTrapFilter | Trap Filter object - return value | NA | Creates a new trap filter object. | RemoveTrapFilter | String - name | NA | Remove the trap filter object with the given name. | NewTrapGroup | Trap Group object - return value | NA | Creates a new trap group. | RemoveTrapGroup | Trap Group object | NA | Removes the specified trap group object. | IsTrapProfilePresent | String - Trap OID
Bool - Return | NA | Return "True" if a trap profile exists for the specified Trap OID. | AddVarbindEnum | String - Varbind OID
Numeric - Enum Number
String - Enum Name | NA | This is an advanced feature of the Unbrowse SNMP trap receiver. Allows you to assign user friendly strings to varbind values. | LookupVarbindEnum | String - Varbind OID
Numeric - Enum Number
String - Return value | NA | Converts a varbind enum number to a user friendly name. |
TrapProfileTrap 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)
EventsNone
Properties and Methods
Name | Parameters | Access | Description | OID | String | | The trap OID of the trap. A trap profile is associated with a specific trap object. | Severity | TrapSeverity | Read Write | The default trap severity level assigned to this trap | DisplayFormat | String | Read Write | Trap Display format string. Controls how a trap is displayed.
See online help for all available formatting expressions. | SpeakFormat | String | Read Write | For the TrapSpeak feature. Controls what phrases are spoken when a particular trap is received.
See online help for available options. | TrapGroups | Collection of TrapGroup objects | Read | Collection of trap group objects | AddToTrapGroup | Trap Group object | | Add this trap to a trap group. | RemoveFromTrapGroup | Trap Group object | | Remove this trap from the specified trap group |
| String | Read | The Trap OID | HasSeverityExpression | Bool | Read | Does 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.. | TrapSeverityExpressionCount | Numeric | Read | The number of trap severity expressions. | GetTrapSeverityExpressionByIndex | Numeric - Index of trap sev expression
Numeric Ref - Varbind Index
String Ref - Operator string
Numeric - Varbind value
Trap Severity -
| NA | Get the trap severity expression by index.
| SeverityControlVariable | Numeric | Read 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. | AddTrapSeverityExpression | String - Operator
Numeric - Value of varbind
Trap Severity - Severity i
| NA | Adds a trap severity expression. | DefaultCustomSeverity
| Trap Severity | NA | If none of the trap severity expressions match. This is the severity attached to the trap. | CorrelationExpression | String | Read | Trap 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. |
TrapFilterManage trap filters. EventsNone
Properties and Methods Name | Parameters | Access | Description | HostsAllow
| String - List of hosts | Read Write | Filter traps to or from specific management stations (trap targets).
Allow List = Comma separated list of IP addresses | HostsDeny
| String - List of hosts | Read Write | Block traps sent to these hosts (trap targets)
Block List = Comma separated list of IP addresses | TrapOIDSAllow | String - List of OIDs | Read Write | Allow only these traps identified by the trap OID to make it past the filter.
Allow List = Comma separated list of trap OIDs | TrapOIDSDeny | String - List of OIDs | Read Write | Block these traps
Block List = Comma separated list of trap OIDs | AgentsAllow | String - List of agents | Read Write | Allows traps only from these SNMP agents
Allow List = Comma separated list of IP addresses | AgentsDeny | String - List of agents | Read Write | Block traps from these SNMP agents
Block List = Comma separated list of IP addresses | AllowNotifyPDU | Bool | Read Write | Controls whether NOTIFY traps are allowed | AllowTrapPDU | Bool | Read Write | Controls whether TRAP messages are allowed | AllowInformPDU | Bool | Read Write | Controls whether INFORM messages are allowed | AllowSNMPv1 | Bool | Read Write | Controls whether SNMPv1 version trap messages are allowed | AllowSNMPv2c | Bool | Read Write | Controls whether SNMPv2 version trap messages are allowed | AllowSNMPv3 | Bool | Read Write | Controls whether SNMPv3 version trap messages are allowed | Name | String | Read Write | A friendly name for the trap filter. This name shows up in the trap console filter combo box. | PortsAllow | String - List of ports | Read Write | List of UDP or TCP ports which are allowed. By default all traps on the standard UDP SNMP port 162 are allowed. | PortsDeny | String - List of ports | Read Write | List of UDP or TCP ports which are blocked.
|
TrapSpeakDictionaryAdvanced 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" EventsNone
Properties and Methods
Name | Parameters | Access | Description | Entries | Collection of TrapSpeakDictionaryEntry objects | Read | All trap speak dictionary entries | Lookup | String - Key
String - Return value | NA | Lookup the trap speak phrase for a given key | Add | String - Key
String - Trap Speak Phrase | NA | Add a trap speak dictionary entry. The speak phrase will replace the key. | Remove | String - Key | NA | Remove the trap speak dictionary entry corresponding to the key | CheckDuplicateKey | String - Key
Bool - Return value | NA | Use this method to check if a trap speak dictionary entry already exists for the given key |
TrapSpeakDictionaryEntry objectThe dictionary is a collection of these Key -> Speech phrase objects. EventsNone
Properties and MethodsName | Parameters | Access | Description | Key | String | Read | The Key | SpeakText
| String | Read Write | The speech phrase |
EnumerationsTrapSeverity/* 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;
|