[SNMP4J] Sending a trap/notification to a subset of the SnmpTargetMIB
Matthias Wiesmann
matthias.wiesmann at gmail.com
Mon Aug 15 03:45:17 CEST 2005
Hello Franck,
thanks again for your prompt answer.
I'm sorry but I don't see how the current code can solve my problem.
If I understand the code, NotificationOriginatorImpl.notify does the
following:
- It gets from the notification MIB the list of tags
- It looks up those tags in the Taget MIB
- It looks up the relevant parameters in the Parameter MIB
- It calls method sendNotification that will construct the
notification/traps and send them
My problem is that I would like to decide at runtime which tags to
send notifications to, e.g send to a programatically decided subset of
the notification MIB. I don't see a way to specify a tag or a set of
tags to which notifications should be sent to. None of the parameters
that the NotificationOriginatorImpl.notify method takes has any effect
on which tag / adresses will be selected.
I could reconfigure the Notification MIB according to my needs before
each sending, but this would be very resource intensive, and basically
exclude using multiple parallel threads. As I might be sending a quite
high rates (I'm sending heartbeats), I very much would like to avoid
this solution.
Maybe I'm overlooking something and I'm very dense, if this is the
case I really apologise .
Best regards
Matthias Wiesmann
> Hello Matthias,
>
> What you are trying to accomplish is already there. Please
> take a look at the SnmpNotificationMIB class. It is used
> by the default notification originator to determine the targets
> a trap/notification needs to be sent to.
> So it's just a matter about configuring some SNMP tables...
>
> Best regards,
> Frank
>
> [...]
More information about the SNMP4J
mailing list