[collectd] Feature Proposal for snmp: Subid in InstancePrefix via text replacement

Luke Heberling collectd at c-ware.com
Thu Apr 28 21:17:29 CEST 2011


Hi List,

I've implemented a feature for the snmp plugin (see attached patch) and
would like to solicit opinions on it's possible inclusion upstream. It
is to have a special value, e.g. "__SUBID__" within the configured
InstancePrefix value that gets replaced with the table entry's subid.
For example, if you're collecting interface throughput with the standard
ifInOctets and ifOutOctets, you can set Instance to "IF-MIB::ifDescr"
and InstancePrefix to "__SUBID__: ". The resulting rrd combines the
subid, the constant string and the ifDescr like "$host/snmp/1: Joe
Customer.rrd".

I was motivated to implement this because:

* Having the interface name in the file name simplifies the front-end,
which needs no further information to present informative graphs.
* Having the interface name in the file name allows us to create a new
graph simply by relabeling, so when we repurpose a port for instance by
assigning a new customer to it we don't have one customer's history on
another customer's current graph.
* Having only the interface name isn't unique enough, since multiple
interfaces could have no name or be mistakenly labeled the same.

Thanks,
Luke Heberling
-------------- next part --------------
A non-text attachment was scrubbed...
Name: collectd_instance_prefix_subid.patch
Type: text/x-diff
Size: 2810 bytes
Desc: not available
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110428/aff51973/attachment.patch>


More information about the collectd mailing list