Code for multiple subagents each providing one row of a table

Pete Gillin <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I am a Net-SNMP rookie, I hope someone can point me in the right
direction.

Short version: I have a MIB which describes a table, and I want a
number of subagents on the machine to each provide one row of that
table. When we send requests to snmpd to walk the table, it should
communicate with each subagent and pull the rows into a table. Is that
possible? What functions should I be looking at? Is there a mib2c
configuration which will provide stub code for my subagents?

Here's some background...

I am integrating SNMP subagent capability into an existing custom
server, to provide certain custom metrics.

In my first trial, the MIB specifies scalars such as
myEnterprise.myQueryServer.metrics.dataStoreSize, and the subagent does
netsnmp_register_scalar with an appropriate callback. (This code is
developed from stubs generated by mib2c with mib2c.scalar.conf.) This
works fine, with snmpwalk showing the correct value for the scalar
myEnterprise.myQueryServe.metrics.dataStoreSize.0.

However, we sometimes have multiple instances of the same type of
server running on the same machine. The above is obviously no good
now. Instead, we want a MIB which specifies a table such as
myEnterpirse.myQueryServer.table, with one row for each instance. Then
the metrics for the Nth instance on this machine would be entries such
as myEnterprise.myQueryServer.table.metrics.dataStoreSize.N. I'm
having difficulty finding out how to register the subagent callbacks
correctly.

Thanks a lot for any help,

Pete.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.