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. How to list not binded nodes

How to list not binded nodes

Scheduled Pinned Locked Moved Support
7 Posts 4 Posters 28.3k 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.
  • D
    D
    davidfs
    wrote on last edited by
    #1

    Hi, I'd like to know how to list nodes that are unbinded.
    I'd like to list or filter them, so new discovered network devices can be bound easily to some Infrastructure Services.
    Thanks.

    1 Reply Last reply
    0
    • D
      D
      Dawid Kellerman
      wrote on last edited by
      #2

      Hi don't know if it is the right way but I always just go to agent tunnels and then order them by state brings any unbound ones to the top and you can deal with them.
      Where I am internet links go up and down resulting in TLS errors and stuff on my netxms alarms but it generally sort themselves It is something I keep an eye on though.

      Regards Dawid

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

        If you our out after binding new nodes that have not been put into other containers you can use this on a container you name ex "_NewNode"
        It will only bind if the node is not part of any other container.
        And if you use auto unbind it will unbind when its put into other container.

        for (p : $node->parents) {
          if ( (p->type == 5 or p->type == 14)
          && ( p->name != "_NewNode") ) {
            return false;
          }
        }
        
        return true;
        
        1 Reply Last reply
        0
        • D
          D
          davidfs
          wrote on last edited by
          #4

          @dawid-kellerman said in How to list not binded nodes:

          Hi don't know if it is the right way but I always just go to agent tunnels and then order them by state brings any unbound ones to the top and you can deal with them.
          Where I am internet links go up and down resulting in TLS errors and stuff on my netxms alarms but it generally sort themselves It is something I keep an eye on though.

          Regards Dawid

          Hi, Thanks Dawid, but for the moment I'm not using agents, only snmp or status.
          For the moment I'm trying a solution with custom properties. See reply to Borgso.

          1 Reply Last reply
          0
          • D
            D
            davidfs
            wrote on last edited by
            #5

            @borgso said in How to list not binded nodes:

            If you our out after binding new nodes that have not been put into other containers you can use this on a container you name ex "_NewNode"
            It will only bind if the node is not part of any other container.
            And if you use auto unbind it will unbind when its put into other container.

            for (p : $node->parents) {
              if ( (p->type == 5 or p->type == 14)
              && ( p->name != "_NewNode") ) {
                return false;
              }
            }
            
            return true;
            

            Hi Borgso, your example helps me a lot. One of the things l want to do is to create list of nodes and where are binded.
            However I've tried another solution to get new nodes: I add a custom atribute Binded = 0 on Entire Network and add a custom atribute Binded = 1 on Infrastrucutre Service (or whatever the contanier I llike.) if I make them inheritable, it will be applied to all nodes. If the node falls under Infrastructure Service, It will have the atribute = 1

            So I make a dashboard with a query with this code:

            if ($object->type != NODE)
            	return false;
            return GetCustomAttribute($node, "Binded") == "0";
            

            Don't know if this approach is correct, but I'm searching to get an inventory of my network (and also some monitoring), and would like to see list of nodes, and have the hability to filter them from various parameters (status, contanier, subcontainers,node types,localization, custom atributes, etc...)

            If someone can recomend alternative aproaches, I'd like to hear. I'm new to netxms, and not sure how to aproach making an inventory.
            Thanks.

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

              Approach with custom attributes is quite OK - that way scripts can be simplified.

              You can also run this script on any node (and you can even make an Object Tool that would execute this scrip):
              for (n: GetAllNodes())
              {
                if (!n->isParent(FindObject("Infrastructure services")))
                {
                  println(n->name);
                }
              }

              And there's a good place - Tools->Find Object. Switch to query tab there and put the following query:
              type == NODE and !$node->isParent(FindObject("Infrastructure services"))

              It will find all nodes that are not present under "Infrastructure services" and it's an interactive list - you can right-click nodes and do some operations with them.

              1 Reply Last reply
              0
              • D
                D
                davidfs
                wrote on last edited by
                #7

                @filipp-sudanov said in How to list not binded nodes:

                Approach with custom attributes is quite OK - that way scripts can be simplified.

                You can also run this script on any node (and you can even make an Object Tool that would execute this scrip):
                for (n: GetAllNodes())
                {
                  if (!n->isParent(FindObject("Infrastructure services")))
                  {
                    println(n->name);
                  }
                }

                And there's a good place - Tools->Find Object. Switch to query tab there and put the following query:
                type == NODE and !$node->isParent(FindObject("Infrastructure services"))

                It will find all nodes that are not present under "Infrastructure services" and it's an interactive list - you can right-click nodes and do some operations with them.

                Many thanks, Filipp.
                Thats a very valuable information. I'll do that way too. This aproach will be useful for other tasks.

                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