[AGENT++] About Oid Collections and target Collections

Jochen Katz katz at agentpp.com
Thu Sep 7 22:34:58 CEST 2006


Hi,

> Shouldn't they be used as collection of oid/targets that the current manager
> will listen to?

yes. But if you set both, the trap has to match both to pass the filter.

> If this is true, why can I get a trap only when those collections are empty?

Possibly the contents of your collections does not match the trap. Don't
use UdpAddress, because the agent may send from any port. You can either
run the trap receiver within a debugger and set a breakpoint at
CNotifyEvent::notify_filter() and step through the code, or add some
debugprintfs in this function to see why the targets or oids don't match.

> And another thing, I noticed that trap/inform will be received regardless of
> whether the v3MP is defined or not.

If you have enabled SNMPv3 you _have_ to create a v3MP object. If you
don't define users, no SNMv3 message can be received/sent (beside
reports and discovery).

> For example, at manager that listens for trap/inform I have completely
> commented v3MP definition and usm declarations.

> with username and password, the trap is still received no matter that
> username and password are not the same at manager and agent.
> 
> Am I doing something wrong?

It seems so, because without v3MP object you will get a crash if a v3
message is received/sent.

Please try to modify the snmpTraps and receive_trap examples step by
step. If you then also get this behaviour, I can tell you more.

Regards,
  Jochen



More information about the AGENTPP mailing list