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. Infrastructure Container Auto Binds

Infrastructure Container Auto Binds

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 16.8k 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.
  • S
    S
    Sorikan
    wrote on last edited by
    #1

    I have to think that others have gotten this to work, but neither myself, CoPilot or Grok have been able to. 

    'All' I want to do is bind nodes that may have, between various sites, an IP that could be in one of three subnets per site, and bind them to that specific container that has IP specific auto bind rules. 

    I cannot find any examples that point me in the right direction from within the past 2-3 years that get me any where.

    Does anyone have any code snippets that show this working like I am attempting to use it?

    Thanks!

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

      If I understand your correctly, this should be enough:

      InetAddress("10.5.3.0", 24).contains($node.ipAddress)
      

      This autobind script will collect all 10.5.3.0/24 nodes into container.
      $node.ipAddress is detected management address, if you want to do it based on the interfaces:

      for (i : $node.interfaces) {
        for (addr : i.ipAddressList) {
          if (InetAddress("10.5.3.0", 24).contains(addr)) {
            return true;
          }
        }
      }
      return false;
      
      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