Multiple Node Status

Started by tamal_g, November 28, 2013, 12:05:31 PM

Previous topic - Next topic

tamal_g

Hi Victor,

I have created a node (Ex: NODE-A) of my device having IP address (192.168.200.130). My device is connected with another device by means of optical fibre. That device does not have any physical IP interface. But still I have created another node (Ex: NODE-B) with the same IP address of NODE-A. Both the devices are having their own set of SNMP traps which NODE-A sends to the server. SNMP traps of both the node's are always being sent by NODE-A.

My aim is to configure NetXMS server in such a fashion that when NODE-B specific trap comes I should be able to change the status of NODE-B only (although the trap source is NODE-A).

I have configured the specific traps and events accordingly. I have also configured the Event policies for all the traps but unfortunately I could only be able to change the status of NODE-A not NODE-B. I am not able to distinguish the traps specific for NODE-A and NODE-B.

Please help.

Regards,
tamal_g


Victor Kirhenshtein

Hi!

Currently there are no simple solution. What you possibly can do is to catch events from node A which are in fact related to node B, use NXSL script as action for them, and use PostEvent function (http://wiki.netxms.org/wiki/NXSL:PostEvent) to re-send same (or different) event on behalf of node B.

Best regards,
Victor

tamal_g

Thanks Victor.

I Have tried to implement as suggested by you. But the problem is all the event's source node is NODE-A and whenever I have passed the $node object, the $node->name is always having the name of NODE-A. I am not able to change the status of NODE-B with their specific traps.

Can you please give me some more details on how to implement PostEvent() function on this particular configuration?

Regards,
tamal_g

Victor Kirhenshtein

Hi!

Global variable $node always points to source node of event being processed, node A in your case. You have to find node object for node B using FindNodeObject (http://wiki.netxms.org/wiki/NXSL:FindNodeObject) function, like this:

nodeB = FindNodeObject($node, "NodeB");
PostEvent(nodeB, "MY_EVENT", null, ...); // add parameters as required

Best regards,
Victor

tamal_g

Once again thanks for your help.

Exactly the same logic what I implemented and it worked.

Thanks once again

Chz!!!

Regards,
tamal_g