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. Custom network map Object Filter

Custom network map Object Filter

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 9.6k 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.
  • B
    B
    bohdan
    wrote on last edited by
    #1

    Hello.

    Always I try to add filtering script  in my custom map via NetXMS console, I get popup: Request time out. Console is not frozen but all other operations are time outed since mentioned operation. I can close console but it is not possible to reconnect with console anymore. nxshell also can't connect, probably any client can't connect to server. I don't see any error in server log and debug messages about continuing discovery and monitoring are written to log, so server is not crashed. I have to restart netxms server to be able connect with console again.

    What I need to do:
    My custom map contains a lot of nodes drag-and-dropped from subnets, but I need to display only nodes with concrete Custom Attribute.
    May be there is some other way how to create filtered custom map via nxshell but I din't find out how to do that. I need to create custom map via filter like I can do it for  infrastructure Service Container.

    I have NetXMS 1.2.13. I have discovered, that  same problem is also in my older version 1.2.9
    Simplified filter I use to simulate problem: return $node->isSNMP;

    Can anybody help me with this problem ?

    Thanks in advance,
    Bohdan

    1 Reply Last reply
    0
    • B
      B
      bohdan
      wrote on last edited by
      #2

      Solution 🙂

      Test case:
      map name - Ambit
      node name - ubuntu

      from org.netxms.client.maps.elements import NetworkMapObject
      
      mapaAmbit = s.findObjectByName("Ambit")
      mapaId = mapaAmbit.getObjectId()
      md = NXCObjectModificationData(mapaId)
      page = mapaAmbit.createMapPage()
      elementId = page.createElementId()
      myObject = s.findObjectByName("ubuntu")
      myObjectId = myObject.getObjectId()
      
      ne = NetworkMapObject(elementId,myObjectId)
      ne.setLocation(150,150)
      page.addElement(ne)
      
      md.setMapContent(page.getElements(),page.getLinks())
      s.modifyObject(md)
      
      1 Reply Last reply
      0
      • V
        V
        Victor Kirhenshtein
        wrote on last edited by
        #3

        Hi!

        I cannot reproduce console freeze on my development system - so there are chance that your problem will gone after upgrade. However, filtering script will not help you - it is intended for automatically populated maps and filters what object should be added to the map by server. It will not affect manually added objects. You can use nxshell as proposed in previous post to populate map (or delete unwanted objects).

        Best regards,
        Victor

        1 Reply Last reply
        0
        • B
          B
          bohdan
          wrote on last edited by
          #4

          Hi.

          Is it possible to automatically  populate custom network map with nodes containing particular custom attribute, for example Location=Bratislava ?
          I can do that by python script from my previous post, but I think something similar to automatic binding of nodes to container.

          Best regards,
          Bohdan

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

            Hi!

            No, it's not possible. Custom maps was intended for manual population. You can create IP or link layer map with automatic population and filters.

            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