problems with ClientFilter

problems with ClientFilter

Hello All,

I am new to the Adventnet world and having a problem which I hope you can help me with:

I have two devices in my network, both of them produce the same trap (which is an alarms, actually)

Advantnet gets the traps and at the end of the process, I suppose to be able to watch those alarms by selecting the "open alarms" branch in the tree.

A table indeed is being opened but...

if both devices send the same failure object trap, then the second trap CANCEL the first one and I see only one line in the table. more over - if the second device send a "clear trap" for this failure object, although the alarm in the table does not belong to it, the alarm is beeing clear as if it was...

This can be explained by looknig at the Alert Table Structure - it sais in the developer guide that the key of this table is a combinde key: Entity + OwnerName

While thte Entity is actually the "failure object" string, the OwnerName is actually... Null (or empty).

I hope until now everything was clear...

And now - to my problem: In order to have a workaround for this situation, I was thinking to catch the Event which the trapParser create (according to the user guide) and use the Event method's 'setOwnerName()' in order to set a unique OwnerName. I wrote a class which implements ClientFilter and locate it in the classpath of the server. I then used the EventFilterConfig tool which is under bin\admintools. event.filters file was updated with this line:

</FILTER>
<FILTER name="MyEventFilter" enable="true" source="MyFilterAction" stringseverity="  Major">
<FILTER_ACTION_NAME name="MyFilterAction"/>
</FILTER>


while in notifications.conf the following line was added:

<FILTER_ACTION className="com.adventnet.nms.eventdb.UserFilter" name="MyFilterAction" userclass="[path].MyEventFilter"/>

[path] = the real path to the class in my filesystem.

now, when running in debug mode I notice the the init() method of my ClientFilter is being called (when the server starts to run) BUT the method

public Event filter(Event event)

is never being called, although the trap is being sent from the devices!

Can anyone please explain me:

1) why does the filter method not work?

2) why OwnerName is empty?

3) is my theoretical solution (for now) to add event.setOwnerName([unique name]) is good enough? is there another solution for my problem.

 

I hope that although this is a long message somone will be able to help me with this problem.

 

Thank you in advanced.

                New to ADSelfService Plus?