Hello everyone!
I need help in creating a correct item name with corresponding IP address for a router. My intention is to auto add a "pinger" for each router interface with corresponding name, like this:
- ping_ISP1 (icmpping[1.1.1.1]), ping_ISP2 (icmpping[2.2.2.2]), ping_BRIDGE0 (icmpping[10.0.50.1])
Here's what I did:
- made a template with SNMP LLD discovery:
Name: FACE_NAME_ADDR
Type: SNMPv2 agent
Key: ifAddr
SNMP OID: discovery[{#FAD},.1.3.6.1.2.1.4.20.1.1, {#FIX},.1.3.6.1.2.1.4.20.1.2, {#FNA}, IF-MIB::ifDescr]
- inside the discovery rule, there are two item prototypes:
first:
Name: ping_{#FIX}
Type: Simple check
Key: icmpping[{#FAD}]
Type of information: Numeric (unsigned)
second:
Name: name_{#FIX}
Type: SNMPv2 agent
Key: name.[{#FIX}]
SNMP OID: .1.3.6.1.2.1.2.2.1.2.{#FIX}
Type of information: Text
In that way it works ok - but that's not what I need. The described rule creates 3 pingers and 3 name-items:
ping_1 (icmpping[1.1.1.1])
ping_3 (icmpping[2.2.2.2])
ping_8 (icmpping[10.0.70.1])
name_1 {value is ISP1}
name_3 {value is ISP2}
name_8 {value is BRIDGE0}
What I need is a combination of those two items.
I tried:
- changing the second prototype to name_{#FNA}
- changing discovery rule to discovery[{#FAD},.1.3.6.1.2.1.4.20.1.1, {#FIX},.1.3.6.1.2.1.4.20.1.2, {#FNA}, .1.3.6.1.2.1.2.2.1.2.{#FIX}]
- using standard {#SNMPINDEX} macro
- searching ZabbixExchange
- searching this forum
with no result.
Is there a way to solve this? Or maybe an interactive way to resolve macro values?
I need help in creating a correct item name with corresponding IP address for a router. My intention is to auto add a "pinger" for each router interface with corresponding name, like this:
- ping_ISP1 (icmpping[1.1.1.1]), ping_ISP2 (icmpping[2.2.2.2]), ping_BRIDGE0 (icmpping[10.0.50.1])
Here's what I did:
- made a template with SNMP LLD discovery:
Name: FACE_NAME_ADDR
Type: SNMPv2 agent
Key: ifAddr
SNMP OID: discovery[{#FAD},.1.3.6.1.2.1.4.20.1.1, {#FIX},.1.3.6.1.2.1.4.20.1.2, {#FNA}, IF-MIB::ifDescr]
- inside the discovery rule, there are two item prototypes:
first:
Name: ping_{#FIX}
Type: Simple check
Key: icmpping[{#FAD}]
Type of information: Numeric (unsigned)
second:
Name: name_{#FIX}
Type: SNMPv2 agent
Key: name.[{#FIX}]
SNMP OID: .1.3.6.1.2.1.2.2.1.2.{#FIX}
Type of information: Text
In that way it works ok - but that's not what I need. The described rule creates 3 pingers and 3 name-items:
ping_1 (icmpping[1.1.1.1])
ping_3 (icmpping[2.2.2.2])
ping_8 (icmpping[10.0.70.1])
name_1 {value is ISP1}
name_3 {value is ISP2}
name_8 {value is BRIDGE0}
What I need is a combination of those two items.
I tried:
- changing the second prototype to name_{#FNA}
- changing discovery rule to discovery[{#FAD},.1.3.6.1.2.1.4.20.1.1, {#FIX},.1.3.6.1.2.1.4.20.1.2, {#FNA}, .1.3.6.1.2.1.2.2.1.2.{#FIX}]
- using standard {#SNMPINDEX} macro
- searching ZabbixExchange
- searching this forum
with no result.
Is there a way to solve this? Or maybe an interactive way to resolve macro values?
Comment