On 13 March 2010 01:34, Rana Dhekial <[email protected]> wrote: > I have to create custom OID out of existing OIDs in an an SNMP agent. > Essentially it will be something like > > value of Custom OID 1 = value of (Existing OID 1+ Exsisting OID 2 - Existing > OID 3)
Is this a single OID calculation, or a table of them? Are you looking for a general-purpose mechanism, or is it just this particular calculation that you need to support? If this is a one-off, then the simplest approach would be to extend the MIB which defines the base table, to include an additional column for this new value. Then tweak the code that implements this table to support this new column. You'd have access to the underlying data for the three existing OIDs, so it would be trivial to perform this calculation on those values, and return the result. This goes slightly against the ethos of SNMP, which tends to provide the basic management data, and allow client-side management tools to manipulate, combine and display this informationas appropriate. But there's technically nothing difficult about providing such a consolidated value directly from the agent. If you're looking for a more generalised approach, then have a look at the DISMAN-EXPRESSION-MIB. There's a preliminary implementation of this in the Net-SNMP agent, but it's never received much attention. That should allow you to do this combination, driven purely from the agent configuration, without needing to define new MIB objects, or write any code whatsoever. Dave ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ 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
