NetXMS Support Forum

English Support => General Support => Topic started by: justrest on February 04, 2023, 04:25:43 AM

Title: Netowrk map related questions
Post by: justrest on February 04, 2023, 04:25:43 AM
A few questions about network map:
1、How to hide the link label in the network map by default, or the default abbreviation, such as gigabitethernetg1/0/1 can be shown as g1/0/1?
2、The default network topology will show subnets, can be canceled?
3、If I want to show only the devices directly connected to the root node in the network topology, how to filter it?
I look forward to your guidance, thank you very much!

Title: Re: Netowrk map related questions
Post by: Filipp Sudanov on February 06, 2023, 06:17:41 PM
3. There is filter script in map properties. It works in a way that this script is executed for each node that is about to be put on the map. If script returns true, node will be added to the map, if false, will not be added. Here's an example script:

rootNode = FindNodeObject($node, "your_root_node_name");
if (!rootNode) return false;

for (i : $node->children) {
  if (classof(i) == "Interface") {
    p = i->peerNode;
    if (p and p->id == rootNode->id) return true;
  }
}

return false;

This script finds your root node by name. Then for each node it's getting all interfaces, and check peer nodes for them. If your root node is peer node for one of the interfaces, script will return true.


1. and 2. seem to be not customizable, but I will check.

Title: Re: Netowrk map related questions
Post by: justrest on February 07, 2023, 12:59:55 AM
Okay,thank you very much!!
Title: Re: Netowrk map related questions
Post by: justrest on February 07, 2023, 03:22:30 AM
I found that only the physical interface can get the peernode, but seems the value fetched by the vlan interface or bridge-aggregation interface is null, how can I get all the directly connected devices?
Title: Re: Netowrk map related questions
Post by: Filipp Sudanov on February 08, 2023, 03:49:22 PM
1. It's taking interface names from node object when map is generated. You can have a script that is executed in Hook::CreateInterface (for newly created interfaces) or in Hook::ConfigurationPoll and rename interfaces there.

2. Subnets are always displayed.

3. Actually, instead of script it's possible to set discovery radius to 1.

vlans kinda go beyond the scope of L2 map - devices only report physical connections on it's ports. For bridged ports it depends - some equipment reports bridged ports, some do not.



Title: Re: Netowrk map related questions
Post by: justrest on February 09, 2023, 12:57:02 AM
Thank you very much for your advice! This is really the most powerful network manager I have ever tried!