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. Node down - but for how long? And high latency notification

Node down - but for how long? And high latency notification

Scheduled Pinned Locked Moved Support
7 Posts 5 Posters 33.4k 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.
  • M
    M
    millerpaint
    wrote on last edited by
    #1

    Greetings,

    Can someone explain how I can accomplish two things:

    1. I am currently sending node down/up email notifications, which works great.  How can I add the number of hours/minutes/seconds that the node was actually down?  Of course, this would be based on when NetXMS saw the node go down and then come back up.

    2. How can I trigger an email notification when a circuit is experiencing higher than normal latency - say over 75ms, for longer than 1 minute?

    Any help is appreciated!

    -Kevin C.

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

      Hi!

      1. On SYS_NODE_DOWN event you can set some custom attribute for the node to current time, executing script like this:
      SetCustomAttribute($node, "DowntimeStart", time());
      

      then, you can use macros which call script in notification on SYS_NODE_UP, like this: %[GetDowntimeText]

      and script (GetDowntimeText in our example) in script library like this:

      return SecondsToUptime(time() - GetCustomAttribute($node, "DowntimeStart"));
      
      1. You can use PING subagent to do regular pings and set threshold for rtt > 75. Ping subagents described here: http://wiki.netxms.org/wiki/Subagent:Ping.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • P
        P
        Percy
        wrote on last edited by
        #3

        hi Millerpaint,

        can you please help me to form the DCI for the node down. what to use in DCI Parameter and does it require any script.

        thank you

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

          There is no DCI for "node down". DCI is just collecting inspected parameter value over time and can have action based on threshold of these values.

          Not sure what you need then but for the record, how to recreate "Node Down" discussed in this topic:

          • in Script Library create script called "OnNodeDown" - SetCustomAttribute($node, "DowntimeStart", time());
          • in Actions Configuration create Action "OnNodeDown" - Type: Execute NXSL Script, Script name: OnNodeDown
          • in Event Processing Policy edit node down rule (usually no.1) and add Action - Server Action - OnNodeDown

          This is just the part that "writes" exact time when node went down.

          To calculate downtime and include it in the SYS_NODE_UP event:

          • create a script "DownTime" - return SecondsToUptime(time() - GetCustomAttribute($node, "DowntimeStart"));
          • add macro to desired place (action, event...) - %[DownTime]

          There can be some errors when calling the DownTime macro and no "DowntimeStart" value exists, but these should not happen eventually (script can be adjusted to handle these events too).

          With regards,
          Milan

          1 Reply Last reply
          0
          • N
            N
            Nikk
            wrote on last edited by
            #5

            Hi,

            This script was working for a long time, but now we are receiving error:
            "Script (DownTime) execution error: Error 5 in line 1: Invalid operation with NULL value"

            Script:

            return SecondsToUptime(time() - GetCustomAttribute($node, "DowntimeStart"));

            Has something changed there, and this script doesn't work anymore?
            Server version 2.0.1

            Best regards,
            Nikk

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

              Hi,

              do you have attribute DowntimeStart set on that node? Will it work if you run the following script on a node:

              println GetCustomAttribute($node, "DowntimeStart");
              

              via "Execute server script" menu?

              Best regards,
              Victor

              1 Reply Last reply
              0
              • N
                N
                Nikk
                wrote on last edited by
                #7

                Hi Victor,

                Yes, that attribute is set and the script works as well. But since that day I haven't received this alarm anymore.
                And it seems that it is working fine now.

                I guess i will need to set up event for this alarm, and monitor this for a while.

                Thank you!

                Best regards,
                Nikk

                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