[AGENT++] MibTable and subagents

Frank Fock fock at agentpp.com
Thu Apr 5 20:37:49 CEST 2007


Hi Razvan,

Please find my comments inline:

Razvan Cojocaru wrote:
> I'll try to reformulate my mishaps :-) : I'm using a MibTable with an
> overridden update() method in an AgentX++ subagent, connected to
> Net-SNMP's snmpd.
> 
> Unfotunately when I try to snmpwalk the table, nothing shows up. It's as

Have you checked that the table has been registered successfully at
the master agent?

> if the table is empty. The code is pretty straightforward, a la the
> dynamic_table example in the agent++ (not agentX++) directory. When my
> binary is a standalone SNMP server it all works fine, but as soon as I
> switch to SubAgentXMib & friends, the tables all look like they're
> empty. Traps works from the subagent, and MibLeaves work from the subagent.

The NET-SNMP master agent does not handle search ranges correctly.
The NET-SNMP subagent does not handle search ranges correctly either,
but I have implemented a workaround for that in the AgentX++ master.
Thus, the better working combination might be AgentX++ master and
NET-SNMP subagent - although this depends on your system and
requirements.

> 
[snip]
> My questions are: should I _always_ use AgentXSharedTable for subagents,
> even if I _don't_ need to populate the same table from different agents?

AgentXSharedTable should be used for really shared tables only,
because of its processing overhead.

> Should I implement MibTable::reinit() in my table class? If so, what is
> the best code to put there?

The reinit() should contain code that needs to be run when
a table is registered (again) at the master agent. For
normal (non-shared) tables, you does not necessarily put
anything in there.
> 
> Obviously, I need dynamic tables that work with subagents, as well as
> with standalone agents. All the table information (row population) can
> be done from a single subagent. What is the best way to achieve that,
> and how?

By theory, the table implementation should be the same for
a subagent and stand-alone agent. If does not work with
NET-SNMP counter-part, the concrete reasons for that need to
be debugged and solved.

Best regards,
Frank

> 
> Thank you.
> 
> 

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the AGENTPP mailing list