Hello,
I am using the ZBX-CISCO-BGP4 template that can be found on Github to monitor various Cisco routers & switches that have BGP configured. One of the Item Prototypes that the Template looks at is the AS Name by using an external script:
Name: AS Name for IPv4 peer {#SNMPVALUE}
Key: as.name["-p","{#SNMPVALUE}"]
Looking at the Latest Values for the devices show that the as.name script is collecting the correct information, I would like to use the value of the AS Name in the Name line of the trigger to give me more information as it only contains the IP address of the down BGP peer.
The current Name line is: BGP peer {#SNMPVALUE} is DOWN
I have created a template macro that is called {$ASNAME} and has the value of as.name["-p","{#SNMPVALUE}"] then included the {$ASNAME} in the Name line: BGP peer {$ASNAME} {#SNMPVALUE} is DOWN but then it ends up sending the literal string of the $ASNAME macro: "BGP peer as.name["-p","{#SNMPVALUE}"] 10.20.30.40 is DOWN"
How do I get the Name to resolve the macro and send something like "BGP peer CUSTOMER1 10.20.30.40 is DOWN" where CUSTOMER1 is the result of the $ASNAME macro?
Many thanks for any suggestions or pointers to where I can learn more.
Jeff.
I am using the ZBX-CISCO-BGP4 template that can be found on Github to monitor various Cisco routers & switches that have BGP configured. One of the Item Prototypes that the Template looks at is the AS Name by using an external script:
Name: AS Name for IPv4 peer {#SNMPVALUE}
Key: as.name["-p","{#SNMPVALUE}"]
Looking at the Latest Values for the devices show that the as.name script is collecting the correct information, I would like to use the value of the AS Name in the Name line of the trigger to give me more information as it only contains the IP address of the down BGP peer.
The current Name line is: BGP peer {#SNMPVALUE} is DOWN
I have created a template macro that is called {$ASNAME} and has the value of as.name["-p","{#SNMPVALUE}"] then included the {$ASNAME} in the Name line: BGP peer {$ASNAME} {#SNMPVALUE} is DOWN but then it ends up sending the literal string of the $ASNAME macro: "BGP peer as.name["-p","{#SNMPVALUE}"] 10.20.30.40 is DOWN"
How do I get the Name to resolve the macro and send something like "BGP peer CUSTOMER1 10.20.30.40 is DOWN" where CUSTOMER1 is the result of the $ASNAME macro?
Many thanks for any suggestions or pointers to where I can learn more.
Jeff.