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. Error in Transformation Script

Error in Transformation Script

Scheduled Pinned Locked Moved Support
9 Posts 3 Posters 21.9k 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.
  • dushyantmdaveD
    dushyantmdaveD
    dushyantmdave
    wrote on last edited by
    #1

    Hello Victor,

    I have configured netxms 1.2.2 with OID .1.3.6.1.2.1.67.2.1.1.1.5.0
    when I am shutting down my radius server the OID value showing too high tps in the value column

    when I am using following transformation script
    if ($1 > 5000)
      return 0;

    it is not working in transformation script

    Thanks & Regards,
    Dushyant Dave


    AnyC00102.JPG

    AnyC00103.JPG

    1 Reply Last reply
    0
    • S
      S
      SKYnv
      wrote on last edited by
      #2

      post script pls

      1 Reply Last reply
      0
      • B
        B
        bdefloo
        wrote on last edited by
        #3

        Hello Dave,

        I've tried out
        if ($1 > 5000)
          return 0;

        on a test DCI (on v1.2.3, though), and it seems to work as expected.
        Are you sure the script is applied to radiusAccServTotalResponses, and not just only to the Requests DCI?
        Also keep in mind that the script does not work retroactively; it will only change the results of the DCI after the change was made.

        If you can post some screenshots of the General and Transformation tabs of the DCI, maybe we can find something out of the ordinary there.

        1 Reply Last reply
        0
        • dushyantmdaveD
          dushyantmdaveD
          dushyantmdave
          wrote on last edited by
          #4

          please find the script:

          sub main()
          {
            if ($1 > 5000)
                return 0;
          }

          1 Reply Last reply
          0
          • dushyantmdaveD
            dushyantmdaveD
            dushyantmdave
            wrote on last edited by
            #5

            Please find attached screenshots version 1.2.2


            AnyC00104.JPG

            AnyC00105.JPG

            1 Reply Last reply
            0
            • dushyantmdaveD
              dushyantmdaveD
              dushyantmdave
              wrote on last edited by
              #6

              you mean to say, I have to user version 1.2.3?
              I can't see the history after putting this script.

              1 Reply Last reply
              0
              • S
                S
                SKYnv
                wrote on last edited by
                #7

                can yo check this?

                if ($1 > 5000)
                return 0;
                else
                return $1;
                
                1 Reply Last reply
                0
                • S
                  S
                  SKYnv
                  wrote on last edited by
                  #8

                  also you can debug with this trace function

                  sub main()
                  {
                  trace(1, "Raw value=".$1);
                  if ($1 > 5000)
                  return 0;
                  }
                  

                  and if you start netxmsd with debug level 1 option you see raw value=xx in netxms logfile.

                  and set data type to integer because original data type is Counter 32bits

                  1 Reply Last reply
                  0
                  • dushyantmdaveD
                    dushyantmdaveD
                    dushyantmdave
                    wrote on last edited by
                    #9

                    Hello SKYnv,

                    I have tried following script and it is running successfully.

                    if ($1 > 5000)
                    return 0;
                    else
                    return $1;

                    thank you very much. 🙂

                    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