[collectd] syntax to collect snmpd 'extend' script results ?

L. Gabriel Somlo gsomlo at gmail.com
Mon Jul 6 18:32:49 CEST 2009

The one problem I still have is string-to-integer conversion. The
"extend" snmp commands return their data as type STRING:

$ snmpwalk -c public -v2c remote_server nsExtendOutput1Line
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."script1" = STRING: 1481653
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."script2" = STRING: 141774
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."script3" = STRING: 5242

I have the types.db entry set up like so:

snmp_extend	script1:COUNTER:0:U, script2:COUNTER:0:U, script3:COUNTER:0:U

and /etc/collectd.d/snmp.conf like this:

<Data "snmp_ext">
  Type "snmp_extend"
  Table false
  Values "NET-SNMP-EXTEND-MIB::nsExtendOutput1Line.\"script1\"" "NET-SNMP-EXTEND-MIB::nsExtendOutput1Line.\"script2\"" "NET-SNMP-EXTEND-MIB::nsExtendOutput1Line.\"script3\""

When I try to graph the collected rrd, it's empty, and I suspect
that's because STRINGS get converted to 0 when a counter or gauge is
expected.  Any ideas on how to force the STRING result from
snmp[walk|get] to be interpreted as an integer by collectd's snmp
module ?

I'm getting syslog messages that look like this:

	snmp plugin: I don't know the ASN type `129'

which I think might be related...


More information about the collectd mailing list