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. Threshold ranges possible?

Threshold ranges possible?

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 35.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.
  • M
    M
    Millenium7
    wrote on last edited by
    #1

    The current threshold options are somewhat limited especially because you can't do 'AND' or 'OR' operations with them
    So from what I gather its not possible to do a threshold range? i.e. 'last polled value between 15 and 20'

    I have some SNMP values that return -1, 0 or 4,294,967,295 (highest possible value) and I want to create alerts that exclude these
    And others return an incorrect value that I just want to discard. I.e. I have temperature alerts set up, anything >70 send a Slack alert, however when its returning 8,500 we've either created a miniature star or the sensor is faulty. As such I don't want to alert on anything >140

    Is there a way to do this?

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

      Since version 3.0 macros can be used in threshold's Value field. Particularly, this allows to use scripts in thresholds by creating a script and referencing it with %[script_name] macro. This way you can do all the customization in your script.
      UPD:
      More correct way would be to set threshold Function = Script and use a script this way. If script returns "true" it means, that threshold will get activated. Contents of "Value" field can be accessed from the  script.

      1 Reply Last reply
      0
      • M
        M
        Millenium7
        wrote on last edited by
        #3

        I guess its better than nothing but i'm not a fan of scripting when it can be avoided, its just messy, hard to read and hard to make changes or troubleshoot down the track (too many rabbit holes to follow to find what is responsible for what)

        Any plans to update threshold options and add the ability to specify multiple values?

        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