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. DCI Treshold

DCI Treshold

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 9.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.
  • D
    D
    DW
    wrote on last edited by
    #1

    Hi,

    im new to NetXMS and have troubles doing a treshold calculation

    im using "System.Update.LastInstallTime" to get the last installed Windows Updates and it transforms it into Date and Time - perfect!

    But now im trying to do a treshold checking for getting an alarm when Updates are not installed within the last 30 days (so 1 month in the past from now).

    Can anyone help me?

    Thank you in advance!

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      You probably have "Epoch time" units selected for that DCI, which makes it display as Date and Time. But the actual value is Unix time - if you open history for that DCI, you would see the values. Threshold operation is happening with that unix time value.

      So there's two ways how to do things:
      a) in transformation script of that DCI:

      return time() - $1;
      

      this way the DCI will have value of how many seconds ago the update last happened. You can use "Uptime" units to display that. And in threshold you would want to check if the value is bigger then 2592000   (which is 60 * 60 * 24 * 30).

      b) or you can have it without any transformation, and use script threshold:

      return time() - $1 > 2592000;
      

      or even

      return time() - $1 > $2 * 3600 * 24;
      

      and specify the threshold value in days in "Value" field of threshold properties.

      1 Reply Last reply
      0
      • D
        D
        DW
        wrote on last edited by
        #3

        Hi,

        thank you so if i want to display and want to get an alarm i should geht 2 DCI for that.

        i think my second question is also answered with that - having 1 DCI for Uptime (transformed) and 1 for treshold calculation? (sorry i wrote that down there before i read your post :))

        i want to know if a system is rebooting so i get the "System.Uptime" Value - this is converted with "SecondsToUptime($1)" to a readable format.
        When not using the "SecondsToUptime($1)" i get the value in seconds and i can use the <= 600 and get a alarm.
        But when using the readable format i think the $1 is converted before into a string and the "<= 600" isnt working also i cant use "0 days,  0:10" for that.

        1 Reply Last reply
        0
        • F
          F
          Filipp Sudanov
          wrote on last edited by
          #4

          Historically SecondsToUptime() function was introduced before measurement units were added. So currently you can select  "Uptime" in measurement units and have it without transformation script. Threshold <= 600 should work.

          Also, you can try threshold with function "Diff with previous value", 1 sample, < 0.

          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