Hi All
I'm trying to setup CDP neighbor discovery within zabbix. I have been able to get the CDP neighbor name and remote port but am stuck on the local port.
Within the OID for CDP neighbor it gives the SNMPINDEX as 10101**.5** where the last .5 is different for each neighbor. When I look up the local port, I need to somehow extract the part before the .5 to lookup the CDP neighbor.
As a start I have:
ITEM (Cisco IOS: SNMP walk CDP neighbor) that walks a bunch of OID's that has all the network interfaces and the relevant CDP information
DISCOVERY RULE (CDP neighbor discovery) that is a dependant item of the item. Preprocessing the step of "SNMP walk to JSON" which extracts the CDP information. In here is where I tried to create the field that links to the OID without the .5
ITEM PROTOTYPE (CDP Neighbor1 {#SNMPINDEX} connected to {#CDPREMNAME} on {#CDPREMPORT}) - I am using [HASHTAG="t5074"]snmpindex[/HASHTAG] as a check which is returning the 10101.5, but it can never extract the OID information. This has a preprocessing item "SNMP walk value" to a integer within a CDP OID item
Example OID and data:
- Local switch port: .1.3.6.1.4.1.9.9.23.1.1.1.1.6.10101 = STRING: "GigabitEthernet1/0/1"
- Remote Switch IP: .1.3.6.1.4.1.9.9.23.1.2.1.1.4.10101.5 = Hex-STRING: 40 40 40 40
- Remote Switch Name: .1.3.6.1.4.1.9.9.23.1.2.1.1.6.10101.5 = STRING: "REMOTE-SWITCH-SW064"
- Remote Switch Port: .1.3.6.1.4.1.9.9.23.1.2.1.1.7.10101.5 = STRING: "GigabitEthernet0/1"
- Remote Switch Model: .1.3.6.1.4.1.9.9.23.1.2.1.1.8.10101.5 = STRING: "cisco WS-C2960C-8TC-S"
So summary, the question is, How can I in the discovery rule, create an preprocessing step that extracts the SNMP Index without the .5 and extract the local interface ID?