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

Test case:
map name - Ambit
node name - ubuntufrom 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) -
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 -
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 -
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
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