Example basic threshold expression

Use this example basic threshold expression to understand how to compose complex basic threshold expressions.

Data types

Poll definitions can use data of type multibyte, long64, text, int, uint, and ulong64.

Sample: Using multibyte data

The following example retrieves an SNMP value in multibyte (hex string) format.

eval(multibyte,'&SNMP.VALUE.snmpEngineID')
V4.2 Fix Pack 17:The following examples automatically convert retrieved data from Hex string format to decimal format:
eval(int,"&SNMP.VALUE.cbgpRouteNextHop")
eval(uint,"&SNMP.VALUE.cbgpRouteNextHop")
eval(long64,"&SNMP.VALUE.cbgpRouteNextHop")
eval(ulong64,"&SNMP.VALUE.cbgpRouteNextHop")

Sample: snmpInBandwidth

The snmpInBandwidth poll definition is one of the default poll definitions. This poll definition defines the checking of incoming bandwidth utilization. An alert is raised when incoming bandwidth usage exceeds 40%. The following expression shows how to use eval statements to define this condition and is defined within the Poll Data tab under the Expression radio button.
((eval(long64,"&SNMP.DELTA.ifInOctets") / eval(long64,"&POLL.POLLINTERVAL"))
/(eval(long64,"&SNMP.VALUE.ifSpeed")))
*800
Within the Threshold tab, the threshold is set to trigger if the value of this expression is greater than 40.