Problem with Node-Down-Configuration using situation
-
Hi
I have been trying to trigger a SYS_NODE_DOWN event by checking if another Node is not down. I have implemented as per manual and various other posts, but still cannot get it to work.
I have attempted to do this by creating a situation, as per thread https://www.netxms.org/forum/configuration/node-down-config-question/, however I want to report only if nodeB is not down (nodeB being the remote router, and NodeA is a device on the remote network).
In a previous thread, Victor stated that you should be able to see situation, instance and attribute from console https://www.netxms.org/forum/configuration/action-to-return-value/, however I can only see the situation and instance, but not the attribute - maybe this is the problem?(see attachment).
My situation created is:
Event: SYS-NODE-DOWN, Situation Name = NodeDown, situation instance = %n, Attribute: status = 1. This will create a NodeDown situation instance for each node with a status = 1 for a sys_node_down
Event: SYS-NODE-UP, Situation Name = NodeUp, situation instance = %n, Attribute: status = 0. This will create a NodeDown situation instance for each node with a status = 0 for a sys_node_upI have setup an event process policy for a separate host that I want to report on if the router (dev2rtr) is NOT down:
My script in this event processing policy is:// We only want to send alert if router is not down sub main() { s = FindSituation("NodeDown", "dev2rtr"); if (s != NULL) { if (s->status == 1) return 0; // Don't match rule } return 1; // Match rule }I am using version 1.08 on a windows platform.
Appreciate any help with this,
Steve...
-
Hi!
Try to use GetSituationAttrubute(s, "status") instead of s->status - there was a bug report that latter method of accessing situation's attributes still not working, although I was thinking that I have fixed it for 1.0.8 - I still didn't check that myself (see this: https://www.netxms.org/forum/configuration/logwatch-function/msg4934/#msg4934).
Best regards,
Victor -
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login