You can't, any trap is sent to all managers. You'd have to run different instances of the adapter on different ports to achieve this effect.
Thanks for the reply.
But won't it be good if the traps could have been sent only to the chosen manager, i.e one or more of them specified in managers.xml? Does this qualify for a feature request ?
I don't know how common this requirement is, i.e. I don't remember of any SNMP agent that sends different traps to different managers.
What is your use case?
My requirement is exactly what you understood.
We have numerous SNMP managers which are capable in handling different SNMP traps.
We should send only the relevant ones to the specific SNMP manager.
Is there is any other way we can implement this ?
Currently the managers are de-coupled from the trap mapping, which in general is a good thing. To do what you suggest we would have to "name" the managers, then optionally provide a named manager (or worse a list of managers :) along with each trap mapping.
That would require some changes in the internal APIs, so issue a JIRA feature request and if we get enough votes on it we might consider implementing it (or you can volunteer and write it yourself :)
I'd say that if you have a couple of managers, just use a corresponding number of snmp-adaptors. The overhead of the adaptor is not big, just a couple of threads...
I'm still curious about your use case. Can you provide some more details why you have this particular setup?