Author Topic: Inter-dependent status  (Read 3320 times)

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Inter-dependent status
« on: October 25, 2011, 01:33:35 pm »
Dear all,

 I'm not sure how to create alarms that are conditional on multiple object status' and would be grateful if someone can point me on the right path.

 The NetXMS server is sat on a server on one network connected to the Internet by connection A, most of the managed node are on separate remote networks that are themselves connected to the Internet by connections B, C, D etc..

 Currently I have alarms generated on NODE_DOWN that email me an alert, however I do not want this email alert if the server connection (A) is down, i.e. the alarm (or alert) should only be asserted if the remote node goes down but connection A is up, or put another way if connection A is down do not generat any alarms for remote nodes.

 Thanks in advance for any help.

Regards,
David Hewison

 

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Re: Inter-dependent status
« Reply #1 on: October 25, 2011, 04:56:39 pm »
Hi!

Basically you have two ways:

1. Use situations. Create situation which will reflect connection A status, and in rule for processing SYS_NODE_DOWN event add additional filtering script which will check the status of situation, and only pass event through if connection A status is up.
2. Just find a local node/DCI reflecting current state of connection A in filtering script for SYS_NODE_DOWN, and use it to choose if event should pass or not.

How do you monitor state of connection A?

Best regards,
Victor

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Inter-dependent status
« Reply #2 on: October 25, 2011, 05:07:21 pm »
Hi Victor,

 I monitor the status of connection A by pinging the ISP gateway the router uses, I have a node 'ISP gateway' configured.

Regards,
David

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Inter-dependent status
« Reply #3 on: October 26, 2011, 11:56:02 am »
Hi Victor,

 How do I access the status of another node in a script ?

Regards,
David

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Re: Inter-dependent status
« Reply #4 on: October 26, 2011, 01:38:00 pm »
You can use function FindNodeObject and then use attribute status of that node. For example, if you have node named ISP_gateway, your script to check if it is down may looks like following:

Code: [Select]
gw = FindNodeObject($node, "ISP_gateway");
return gw->status == 4;

This script will return true if node named ISP_gateway has status "critical". DOn't forget to add node for which this script executes to the list of trusted nodes for node ISP_gateway, or disable trusted nodes checking completely by setting server configuration variable CheckTrustedNodes to 0.

Best regards,
Victor

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Inter-dependent status
« Reply #5 on: October 26, 2011, 04:43:00 pm »
Many thanks Victor, I will try this.

Regards,
David

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Inter-dependent status
« Reply #6 on: October 26, 2011, 05:10:40 pm »
Hi Victor,

 If I read the status of node "ISP_gateway" from an event processing rule triggered by a "NODE_DOWN" event does all the other nodes have to be in the trusted node list of node "ISP_gateway" ?

Regards,
David

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Re: Inter-dependent status
« Reply #7 on: October 26, 2011, 11:26:54 pm »
Yes, you have to add all other nodes to trusted nodes list on  ISP_gateway. So in your case it's probably easier to disable trusted nodes checking.

Best regards,
Victor