I'm trying to import some Dell MIBs into Zabbix 6.2. I used Sean Bradley's SMTP2ZABBIX script to convert them to XML. Zabbix said, "Imported successfully," but none of the items that had index numbers (such as Ethernet ports numbers) imported. In the zabbix_server.log, I see lots of errors like these...
.
Should those brackets be in there?
If you attempt to query it as shown, it produces an error...
.
...however, if you remove the brackets from the end, it works...
[root@mgt03 zabbix]# snmpget -v3 -l authPriv -u all-mibs-user -a SHA -A "redacted" -x AES -X "redacted" -On sw7r0 .1.3.6.1.2.1.2.2.1.10.41
.1.3.6.1.2.1.2.2.1.10.41 = Counter32: 0
The OID is obviously there in the switch, but for some reason Zabbix is putting brackets around the last part. This makes me feel like there's possibly some kind of bug in the import routine, or there is some problem with the item prototype in the XML code. Basically, nothing in the template that has the variable [{#SNMPINDEX}] imported properly.
.
<value_type>CHAR</value_type>
</item_prototype>
.
135360:20221207:190120.653 item "sw7r0:.1.3.6.1.2.1.2.2.1.10.[41]" became not supported: No Such Instance currently exists at this OID
Should those brackets be in there?
If you attempt to query it as shown, it produces an error...
.
[root@mgt03 zabbix]# snmpget -v3 -l authPriv -u all-mibs-user -a SHA -A "redacted" -x AES -X "redacted" -On sw7r0 .1.3.6.1.2.1.2.2.1.10.[41]
.1.3.6.1.2.1.2.2.1.10.[41]: Unknown Object Identifier (Index out of range: [41] (ifIndex))
.1.3.6.1.2.1.2.2.1.10.[41]: Unknown Object Identifier (Index out of range: [41] (ifIndex))
...however, if you remove the brackets from the end, it works...
[root@mgt03 zabbix]# snmpget -v3 -l authPriv -u all-mibs-user -a SHA -A "redacted" -x AES -X "redacted" -On sw7r0 .1.3.6.1.2.1.2.2.1.10.41
.1.3.6.1.2.1.2.2.1.10.41 = Counter32: 0
The OID is obviously there in the switch, but for some reason Zabbix is putting brackets around the last part. This makes me feel like there's possibly some kind of bug in the import routine, or there is some problem with the item prototype in the XML code. Basically, nothing in the template that has the variable [{#SNMPINDEX}] imported properly.
.
<item_prototype>
<name>HOST-RESOURCES-MIB::hrStorageType[{#SNMPINDEX}]</name>
<type>SNMPV2</type>
<description>The type of storage represented by this entry.</description>
<applications>
<application>
<name>dell-s5248f-on-EtherLike-MIB</name>
</application>
</applications>
<port>{$SNMP_PORT}</port>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<key>.1.3.6.1.2.1.25.2.3.1.2.[{#SNMPINDEX}]</key>
<snmp_oid>.1.3.6.1.2.1.25.2.3.1.2.{#SNMPINDEX}</snmp_oid>
<delay>1h</delay>
<history>2w</history>
<trends>0</trends>
<name>HOST-RESOURCES-MIB::hrStorageType[{#SNMPINDEX}]</name>
<type>SNMPV2</type>
<description>The type of storage represented by this entry.</description>
<applications>
<application>
<name>dell-s5248f-on-EtherLike-MIB</name>
</application>
</applications>
<port>{$SNMP_PORT}</port>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<key>.1.3.6.1.2.1.25.2.3.1.2.[{#SNMPINDEX}]</key>
<snmp_oid>.1.3.6.1.2.1.25.2.3.1.2.{#SNMPINDEX}</snmp_oid>
<delay>1h</delay>
<history>2w</history>
<trends>0</trends>
<value_type>CHAR</value_type>
</item_prototype>
Usually it is best to take existing templates for a start. I have understood that the snmp2zabbix conversion tools don't always work correctly.
Comment