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 script

Threshold script

Scheduled Pinned Locked Moved Support
11 Posts 6 Posters 67.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
    multix
    wrote on last edited by
    #2

    Hi
    in treshold section, you must select "script" from function, samples=1, activation event and deactivation event as your choice.

    Press Script Button and write :

    dcival=GetDCIValue($node, FindDCIByName($node, "Status")); (Status=your DCI name)
    if (dcival>0 && decimal <1) return true;
    return false;

    1 Reply Last reply
    0
    • C
      C
      cserzs
      wrote on last edited by
      #3

      Hi,

      Thank you very much for your answer. I have tested your script but I found that the value of dcival in each case were "(null)". Please find the details in the attachment. However the dci value was about 2.8

      What could be the problem?

      BR,
      Zsolt


      dcival.jpg

      1 Reply Last reply
      0
      • A
        A
        Alex Kirhenshtein
        wrote on last edited by
        #4

        There is a space in DCI name, please verify that you have space in configuration too.

        1 Reply Last reply
        0
        • C
          C
          cserzs
          wrote on last edited by
          #5

          Hello,

          Yes, in the DCI name also exist the space character before "(A)" substring. However I modified the DCI name to "MUXD_CurrentPA" and I checked the script with this name as well. The result was also the "(null)" value.

          BR,
          Zsolt

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

            Hi,

            can you show a screenshot of DCI "MUXD_CurrentPA" configuration?

            Best regards,
            Victor

            1 Reply Last reply
            0
            • C
              C
              cserzs
              wrote on last edited by
              #7

              Hi,

              Please find in the attachement.

              BR,
              Zsolt


              dci_config1.jpg

              dci_config2.jpg

              1 Reply Last reply
              0
              • T
                T
                tomaskir
                wrote on last edited by
                #8

                Use FindDCIByDescription.

                The field you are searching for is the description, not the name.

                1 Reply Last reply
                0
                • C
                  C
                  cserzs
                  wrote on last edited by
                  #9

                  Hi,

                  Thank you very much it is works well.

                  Regards,
                  Zsolt

                  1 Reply Last reply
                  0
                  • K
                    K
                    KjellO
                    wrote on last edited by
                    #10

                    In transformation and threshold scripts, think you can simply use the "$1" to get last collected value.

                    dcival = $1;
                    

                    If you wish to process values from another DCI you must of course use the FindDCI* methods, but here it looks like you are interested in the value from this particular DCI itself.

                    Best regards,
                    Kjell

                    1 Reply Last reply
                    0
                    • C
                      C
                      cserzs
                      wrote on last edited by
                      #11

                      Hi,

                      Yes you're right, this is a useful advice.

                      thanks a lot,
                      Zsolt

                      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