I am trying to add Cisco Discovery Protocol details to the Cisco switch template. In the network discovery LLD rule, the SNMP index returned is valid both for the interface info(which works just fine) AND the CDP info. The base OID for the CDP value I'm returning is 1.3.6.1.4.1.9.9.23.1.2.1.1.6. Unfortunately, the CDP element appears to have a dynamic trailing value after the index.
Sample Valid interface OID, SNMPINDEX 2 and 27:
Index 2
snmpwalk -v1 -cpxxxx -On x.x.x.x .1.3.6.1.2.1.2.2.1.7.2
.1.3.6.1.2.1.2.2.1.7.1 = INTEGER: up(1)
snmpwalk -v1 -cpxxxx -On x.x.x.x 1.3.6.1.4.1.9.9.23.1.2.1.1.6.2
.1.3.6.1.4.1.9.9.23.1.2.1.1.6.2.64 = STRING: "MySwitchName1"
Index 25
snmpwalk -v1 -cpxxxx -On x.x.x.x .1.3.6.1.2.1.2.2.1.7.25
.1.3.6.1.2.1.2.2.1.7.1 = INTEGER: up(1)
snmpwalk -v1 -cpxxxx -On x.x.x.x 1.3.6.1.4.1.9.9.23.1.2.1.1.6.25
.1.3.6.1.4.1.9.9.23.1.2.1.1.6.2.50 = STRING: "MySwitchName2"
Notice the trailing '64' and '50' that are appended in the return value. I'm assuming this is breaking the item, unless zabbix just doesn't allow the snmpindex variable to be used in a different OID branch on the same discovery rule.
Anyone have any ideas? Is there a way to truncate the "return" OID, or have a mask included in the item OID?
Sample Valid interface OID, SNMPINDEX 2 and 27:
Index 2
snmpwalk -v1 -cpxxxx -On x.x.x.x .1.3.6.1.2.1.2.2.1.7.2
.1.3.6.1.2.1.2.2.1.7.1 = INTEGER: up(1)
snmpwalk -v1 -cpxxxx -On x.x.x.x 1.3.6.1.4.1.9.9.23.1.2.1.1.6.2
.1.3.6.1.4.1.9.9.23.1.2.1.1.6.2.64 = STRING: "MySwitchName1"
Index 25
snmpwalk -v1 -cpxxxx -On x.x.x.x .1.3.6.1.2.1.2.2.1.7.25
.1.3.6.1.2.1.2.2.1.7.1 = INTEGER: up(1)
snmpwalk -v1 -cpxxxx -On x.x.x.x 1.3.6.1.4.1.9.9.23.1.2.1.1.6.25
.1.3.6.1.4.1.9.9.23.1.2.1.1.6.2.50 = STRING: "MySwitchName2"
Notice the trailing '64' and '50' that are appended in the return value. I'm assuming this is breaking the item, unless zabbix just doesn't allow the snmpindex variable to be used in a different OID branch on the same discovery rule.
Anyone have any ideas? Is there a way to truncate the "return" OID, or have a mask included in the item OID?
Comment