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. Graph - Stop graphing when some value

Graph - Stop graphing when some value

Scheduled Pinned Locked Moved Support
9 Posts 4 Posters 49.0k 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.
  • A
    A
    Asterix
    wrote on last edited by
    #1

    Hi,
    is possibile to stop graphing when some value is returned?
    In my case Ubiquiti device return -1000 of signal strenght when remote device is not connected via radio.

    I need to stop graphing instead of get -1000


    value.png

    exampleStopGraph.jpg

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

      Use a transform script to return "null" when wrong value is received:

      if ($1 < -100) {
        return null;
      } else {
        return $1;
      }
      
      1 Reply Last reply
      0
      • A
        A
        Asterix
        wrote on last edited by
        #3

        When null is returned on the chart it goes a position itself as value 0

        Version 3.6.303

        Other methods?

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

          Null means data collection error - no value will be stored in the DB, no value will be shown on the chart.
          The DCI will show "<<ERROR>>" in Last Values.

          If you want 0, simply return 0 in the transform script.

          1 Reply Last reply
          0
          • A
            A
            Asterix
            wrote on last edited by
            #5

            I've tried, but in last value I get "0" instead of <<ERROR>>
            This is the Transformation
            return ($1 < -100) ? null : $1;

            Why?


            Graph.jpg

            LastValue.jpg

            Transformation.jpg

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

              Try abort instead of return null:

              if ($1 < -100) {
                abort;
              } else {
                return $1;
              }
              
              1 Reply Last reply
              0
              • A
                A
                Asterix
                wrote on last edited by
                #7

                Thanks Filipp!

                It Works ! !

                1 Reply Last reply
                0
                • A
                  A
                  Asterix
                  wrote on last edited by
                  #8

                  However, there is an anomaly  😞
                  If the chart is zoomed out, it tends to close the line between the previous and last retrieved value.
                  See in my example 1H Graph and 4H same graph


                  Graph-1h.jpg

                  Graph-4h.jpg

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

                    Hi,

                    there is open change request for that: https://track.radensolutions.com/issue/NX-1826. Hopefully will fix it soon.

                    Best regards,
                    Victor

                    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