Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Problem with Node-Down-Configuration using situation

Problem with Node-Down-Configuration using situation

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 13.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    S
    SteveK
    wrote on last edited by
    #1

    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_up

    I 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...


    situations.JPG

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • S
        S
        SteveK
        wrote on last edited by
        #3

        Hi Victor,

        Thanks for the reply.

        I still am having problems with my implementation, should I be able to see the attributes in situation manager?, as I can see the instance, but cannot see the attribute.

        Many thanks,
        Steve..

        1 Reply Last reply
        0
        • S
          S
          SteveK
          wrote on last edited by
          #4

          Hi Victor,

          Sorry I missed the bit in the post you referred to about situation attributes. Thanks for your help.

          Steve...

          1 Reply Last reply
          0

          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
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups