[collectd] double-quotes and backslashes in Values index

alex collectd at khalil.org
Fri May 16 15:06:54 CEST 2014


Hello,

This metric configuration for F5 loadbalancers used to work well in
5.0.0-1 (a backport for Ubuntu Lucid) but broke somehow in 5.4.0-3
(another backport for Ubuntu precise)

To reference it in collectd.conf for the plugin "snmp", we use this syntax
(with backslashed double-quotes in Values around the index of type string
which value is the character (not the number) "0" in this case).

Can we use still the string-typed index with some syntax change or patch?

<Plugin snmp>
    <Data "f5_cpu">
        Type "f5_cpu"
        Table true
        Instance "F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex"
        Values "F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuUsageRatio.\"0\""
    </Data>
</Plugin>

$ snmpwalk -v 2c -c pub host "F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuHostId"
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuHostId."0".1 = STRING: 0
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuHostId."0".2 = STRING: 0
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuHostId."0".3 = STRING: 0
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuHostId."0".4 = STRING: 0

$ snmpwalk -v 2c -c pub host "F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex"
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."0".1 = INTEGER: 1
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."0".2 = INTEGER: 2
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."0".3 = INTEGER: 3
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuIndex."0".4 = INTEGER: 4

$ snmpwalk -v 2c -c pub host "F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuUsageRatio.\"0\""
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuUsageRatio."0".1 = Counter64: 19
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuUsageRatio."0".2 = Counter64: 7
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuUsageRatio."0".3 = Counter64: 8
F5-BIGIP-SYSTEM-MIB::sysMultiHostCpuUsageRatio."0".4 = Counter64: 14


The MIBs file specifies an INDEX of type string (here "LongDisplayString")

---- from MIBs file  F5-BIGIP-SYSTEM-MIB.txt 

sysMultiHostCpuEntry OBJECT-TYPE
        SYNTAX  SysMultiHostCpuEntry
        STATUS current
        DESCRIPTION
                "Columns in the sysMultiHostCpu Table"
        INDEX {
                sysMultiHostCpuHostId,
                sysMultiHostCpuIndex
        }
        ::= { sysMultiHostCpuTable 1 } 

SysMultiHostCpuEntry ::= 
        SEQUENCE {
                sysMultiHostCpuHostId     LongDisplayString,
                sysMultiHostCpuIndex      INTEGER,
                sysMultiHostCpuId         Gauge
        }
-------





More information about the collectd mailing list