Hi,
I designed a template to monitor our switches and I need to allow the monitoring operator to choose on which interfaces set certain triggers on the used bandwidth. In particular, the operator, should fill a user macro to specify with interface and which limit.
The trigger we are currently using is:
({#IFNAME} = {{$IF_BW_UP_01:"{#IFNAME}"}}) and
(-1 <>{$IF_BW_UP_TH_01:"{#IFNAME}"}) and
(
{I_Template Module Interfaces SNMPv2:net.if.in[ifHCInOctets.{#SNMPINDEX}].avg(15m)} > ({$IF_BW_UP_TH_01:"{#IFNAME}"}*1000000)
or
{I_Template Module Interfaces SNMPv2:net.if.out[ifHCOutOctets.{#SNMPINDEX}].avg(15m)}>({$IF_BW_UP_TH_01:"{#IFNAME}"}*1000000)
)
and
{I_Template Module Interfaces SNMPv2:net.if.speed[ifHighSpeed.{#SNMPINDEX}].last()}>0
So the operator just fills the following macros with interface name and limit
$IF_BW_UP_01 = 1 (e.g., for HP/aruba switch)
$IF_BW_UP_TH_01 = 9 (e.g, 9Mbps)
The problem arises with juniper or cisco switch that uses string (not number) as interface name (e.g., Ge-0/0/3) because the "=" works only for numbers!
Any helps, hints or suggestions?
I designed a template to monitor our switches and I need to allow the monitoring operator to choose on which interfaces set certain triggers on the used bandwidth. In particular, the operator, should fill a user macro to specify with interface and which limit.
The trigger we are currently using is:
({#IFNAME} = {{$IF_BW_UP_01:"{#IFNAME}"}}) and
(-1 <>{$IF_BW_UP_TH_01:"{#IFNAME}"}) and
(
{I_Template Module Interfaces SNMPv2:net.if.in[ifHCInOctets.{#SNMPINDEX}].avg(15m)} > ({$IF_BW_UP_TH_01:"{#IFNAME}"}*1000000)
or
{I_Template Module Interfaces SNMPv2:net.if.out[ifHCOutOctets.{#SNMPINDEX}].avg(15m)}>({$IF_BW_UP_TH_01:"{#IFNAME}"}*1000000)
)
and
{I_Template Module Interfaces SNMPv2:net.if.speed[ifHighSpeed.{#SNMPINDEX}].last()}>0
So the operator just fills the following macros with interface name and limit
$IF_BW_UP_01 = 1 (e.g., for HP/aruba switch)
$IF_BW_UP_TH_01 = 9 (e.g, 9Mbps)
The problem arises with juniper or cisco switch that uses string (not number) as interface name (e.g., Ge-0/0/3) because the "=" works only for numbers!
Any helps, hints or suggestions?