[collectd] Using SNMP plugin with collectd
octo at collectd.org
Wed Oct 6 13:32:13 CEST 2010
On Sun, Oct 03, 2010 at 04:16:21PM +0000, Sen, Kakoli wrote:
> I have put the following block in Collectd.conf for capturing this data:
> <Data "hr_cpuLoad">
> Type "cpustats_percent"
> Table true
> Instance "HOST-RESOURCES-MIB::hrProcessorEntry"
> Values "HOST-RESOURCES-MIB::hrProcessorLoad"
with this configuration, the SNMP plugin will do two "SNMP walks", one
over "hrProcessorEntry" and one over "hrProcessorLoad", using successive
With GETNEXT, either OID will be used as the root of the respective
sub-tree. The first GETNEXT request will return the first leaf in the
tree, then the second leaf and so forth until the returned OID is
outside the scope of the sub-tree.
When all is done, you'll have two lists of values, one for "Instance"
and one for "Values". Ideally that's something like:
Values: 23, 42, 4711
Instance "foo", "bar", "qux"
The list of values returned from the "Instance" and the "Values" OIDs
will be matched together by their order. In our example:
As you can see, ideally both lists have the same number of items. With
your configuration, the "hrProcessorLoad" sub-tree is contained within
the "hrProcessorEntry" subtree, which is a very strong indicator that
something is wrong. In your case, the "Instance" list will probably
contain garbage, because your root is too wide up in the OID-tree. And
this is likely the source of your problems.
> We need the configuration to be generic, applicable to any windows
If you didn't set the "Instance" option, the plugin would use the last
part of the value OID as instance. For example, "hrProcessorLoad.42"
translates to ".184.108.40.206.220.127.116.11.18.104.22.168", the last part would be "42".
I guess this is your best shot at getting unique identifiers. I admit
that calling the CPUs "15" and "16" when there are only two CPUs total
is confusing, but I don't know any elegant and generic way to cope with
If that solution doesn't satisfy your needs, I recommend to take a look
at SSC Serv . It reports CPU usage broken up into IRQ, System and
User code and – of course – uses the usual zero-based numbering.
Florian octo Forster
Hacker in training
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 835 bytes
Desc: Digital signature
More information about the collectd