HostMonitor offers several macro variables you may use. quote from the manual:
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
=============================================
The following variables applicable for "SNMP Trap" test only, they represent parameters of the last filtered message (filtered message is the one that have passed all conditions of the test item filter). When HostMonitor launches action in response to received trap message, it substitutes macro variable with its value pertinent to the trap message being received.
%TrapHost% Represents IP address of the host that have sent the message
%TrapHostInfo% If you have specified host name or description in HOSTINFO.LST file, HostMonitor will get information from the file and replace IP address with appropriate description. See HOSTINFO.LST file for details (it's a text file)
%TrapType% Represents type of the trap. It provides information about generic type and enterprise specific number. Generic type could be one of the following: Cold Start, Warm Start, Link Down, Link Up, Auth Failure, EGP Loss and Specific. Enterprise specific number is only applicable when generic trap type is Enterprise Specific, otherwise enterprise specific number is 0
%TimeTicks% Represents time ticks. Time ticks is the time interval (measured in hundredth of seconds) since the initialization (boot, start-up) of the entity that have sent the trap.
%Enterprise% Enterprise field contains an OBJECT IDENTIFIER which names the device that sends the trap
%EnterpriseName% Using the database of compiled MIB files HostMonitor may translate Enterprise OID from its numeric form to a MIB name. If you need to extend the database, include information about MIBs supported by some specific SNMP enabled device, use MIB Browser
%EnterpriseNameShort% Similar to %EnterpriseName% but shows the name without names of parent nodes.
E.g.
* %Enterprise% = 1.3.6.1.4.1.3955.5
* %EnterpriseName% = iso.org.dod.internet.private.enterprises.linksys.etherHub
* %EnterpriseNameShort% = etherHub
Each trap message may contain one or several variables that provide information about the event. Following macro variables allow you to access that information:
%MibOid% Represents OID (object identifier) of the variable
%MibName% Using the database of compiled MIB files HostMonitor may translate %MibOID% from its numeric form to a MIB name. If you need to extend the database by including information about MIBs supported by some specific SNMP enabled device, use MIB Browser
%MibNameShort% Similar to %MibName% but shows the name of the variable (plus possible index) without names of parent nodes.
E.g.
* %MibOID% = .1.3.6.1.2.1.2.2.1.8.1
* %MibName% = iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.1
* %MibNameShort% = ifOperStatus.1
%MibType% Type of the variable
%MibValue% Variable value
%MibRelative%
Relative value of the variable. This macro is applicable when you check incoming trap messages for some specific variable and compare current value of the variable with its previous value (see "Message contains OID" option in the Trap Filter dialog).
%MibRelative% may represent:
* simple difference between current and previous value (if you use "increases by", "decreases by" or "changes by" compare option)
* relative difference as a percentage of previous value (if you use "increases by (%)", "decreases by (%)" or "changes by (%)" compare option)
* average increase/decrease of the counter per second since previous message (if you use "increases /sec", "decreases /sec" or "changes /sec" compare option)
%TrapAllValues% This macro returns information about ALL variables received within Trap message (%TrapAllValues% returns "oid=value" line(s); if there is more than 1 variable in SNMP Trap message, lines will be separated by #13#10 characters).
Note: %MibOid%, %MibName%, %MibType%, %MibValue% variables provide the information about specific OID variable (if you have set "Message contains OID" option of the test filter) or the information about 1st variable within SNMP Trap packet.
%TrapAllValues_Name% Using the database of compiled MIB files HostMonitor may translate %MibAllValues% from its numeric form to a MIB name. If you need to extend the database by including information about MIBs supported by some specific SNMP enabled device, use MIB Browser.
%TrapAllValues_NameShort% Similar to %TrapAllValues_Name% but shows the name of the variable (plus possible index) without names of parent nodes.
E.g.
if %TrapAllValues% returns
1.3.6.1.2.1.2.2.1.7.1 = 1
1.3.6.1.2.1.2.2.1.2.1.8.1 = 1
then %TrapAllValues_Name% will show
iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifAdminStatus.1 = 1
iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.1 = 1
and %TrapAllValues_NameShort% will return
ifEntry.ifAdminStatus.1 = 1
ifEntry.ifOperStatus.1 = 1
=============================================
Regards,
Max