NetXMS Support Forum

English Support => General Support => Topic started by: tamal_g on November 28, 2013, 12:05:31 PM

Title: Multiple Node Status
Post by: tamal_g on November 28, 2013, 12:05:31 PM
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

Title: Re: Multiple Node Status
Post by: Victor Kirhenshtein on November 28, 2013, 01:31:02 PM
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 (http://wiki.netxms.org/wiki/NXSL:PostEvent)) to re-send same (or different) event on behalf of node B.

Best regards,
Victor
Title: Re: Multiple Node Status
Post by: tamal_g on November 29, 2013, 12:01:42 PM
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
Title: Re: Multiple Node Status
Post by: Victor Kirhenshtein on November 29, 2013, 03:25:01 PM
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 (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
Title: Re: Multiple Node Status
Post by: tamal_g on November 29, 2013, 05:26:21 PM
Once again thanks for your help.

Exactly the same logic what I implemented and it worked.

Thanks once again

Chz!!!

Regards,
tamal_g