-
Incident report
-
Resolution: Fixed
-
Trivial
-
2.0.0rc1
Running: zabbix-2.0.0rc1
We currently have an A10 AX2500 loadbalancer, and i'm trying to monitor it using SNMP. Because the config can be quite dynamic, i opted to install zabbix 2.0 to test it out, and espescially to test the new snmp discovery.
The discovery worked fine with my switches, powerbars etc, but it refused to work with the A10.
The reason for this is that the A10 doesn't return an integer for 'SNMPINDEX' but a string. An snmpwalk/table looks like this:
$ snmpwalk -v 1 -c something a10-ax2500 .1.3.6.1.4.1.22610.2.4.3.4.1.2 A10-AX-MIB::axVirtualServerName."TWK.RS" = STRING: TWK.RS A10-AX-MIB::axVirtualServerName."TWEAKERS.NET" = STRING: TWEAKERS.NET ... etc $ snmptable -v 1 -c something a10-ax2500 .1.3.6.1.4.1.22610.2.4.3.4.1.2 -Ci index axVirtualServerName axVirtualServerAddress axVirtualServerEnabled axVirtualServerHAGroup axVirtualServerDisplayStatus "TWK.RS" TWK.RS ip enabled allUp "TWEAKERS.NET" TWEAKERS.NET ip enabled allUp
As you can see, the index isn't an integer, it is a string. However, in checks_snmp.c:781 i read this:
zbx_json_addstring(&j, "{#SNMPINDEX}", &p[1], ZBX_JSON_TYPE_INT); zbx_json_addstring(&j, "{#SNMPVALUE}", snmp_value.str, ZBX_JSON_TYPE_STRING);
Aka, the index can only be an integer, which isn't true, it can also be a string
After adding
zbx_json_addstring(&j, "{#SNMPOID}", snmp_oid, ZBX_JSON_TYPE_STRING);
i could get my discovery working properly and creating the right items (and i had to type a lot less in the OID field )
So please fix it that the index can be a string, or add the SNMPOID macro (or do both )