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. $node.ipAddr is unspec

$node.ipAddr is unspec

Scheduled Pinned Locked Moved Support
11 Posts 2 Posters 33.5k 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.
  • F
    F
    Filipp Sudanov
    wrote on last edited by
    #2

    Something like this was fixed recently, please try v5.2.1

    1 Reply Last reply
    0
    • S
      S
      saksham.adyso
      wrote on last edited by
      #3

      I've updated to the latest version. Unfortunately now nothing is being written. I tried to do a clean install of NetXMS and the result is the same.

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

        What is the name of the hook script that you are using?

        1 Reply Last reply
        0
        • S
          S
          saksham.adyso
          wrote on last edited by
          #5

          I use a custom script where I write the state of a variable to a file. I don't use the built-in hook script.

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

            From which place do you run your script?

            1 Reply Last reply
            0
            • S
              S
              saksham.adyso
              wrote on last edited by
              #7

              Script is in script library and I select this script for discovery filter.

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

                Yes, thanks for the info. In that script we have $node variable which contains object of DiscoveredNode class, please see here:
                https://netxms.org/documentation/nxsl-latest/#class-discoverednode

                We will improve the UI in a future version so that discovery filter script is editable right from Network Discovery page with hint on available variables in that editor.

                1 Reply Last reply
                0
                • S
                  S
                  saksham.adyso
                  wrote on last edited by
                  #9

                  I use exactly this $node variable in the script and write its ipAddr property to a file. In the old version the UNSPEC text was written to the file and in the latest version nothing was written. Same for the other variables of the $node object (DiscoveredNode).

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

                    Can you show full script that does writing to file?

                    1 Reply Last reply
                    0
                    • S
                      S
                      saksham.adyso
                      wrote on last edited by
                      #11

                      function main()
                      {
                      LogFile = IO::OpenFile("C:\\nx\\netxms.txt", "a");
                      if (LogFile != null)
                      {
                      LogFile.writeLine($node.ipAddr);
                      LogFile.close();
                      }
                      }

                      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