Description

This article explains how to configure/change/map device or node icons automatically depending on the device type in the Network Monitoring Topology for Junos Space 21.1 and later releases.

Symptoms

In Junos Space Network Monitoring, you have an option in the UI to change the default icons for devices or nodes.

Note: This may become difficult if the number of devices is more.

Solution

Each Vertex/Node on the topology map is represented by an icon. The default icon is configured in the icon mapping file: /opt/opennms/etc/org.opennms.features.topology.app.icons. <topology-namespace> .cfg

The list of icon files is as follows:

  1. org.opennms.features.topology.app.icons.default.cfg = Default icon mapping

  2. org.opennms.features.topology.app.icons.application.cfg = Icon mapping for the Application Topology Provider

  3. org.opennms.features.topology.app.icons.bsm.cfg = Icon mapping for the Business Services Topology Provider

  4. org.opennms.features.topology.app.icons.linkd.cfg = Icon mapping for the Linkd Topology Provider

  5. org.opennms.features.topology.app.icons.vmware.cfg = Icon mapping for the VMware Topology Provider

Each file contains a mapping in the form of  <icon key> = <icon id> . Junos Space mostly uses the Linkd Topology.

Icon Resolution

The icon of a vertex is resolved as follows:

  • If a vertex ID to icon ID mapping is defined, the icon referenced by the icon ID is used.

  • If a mapping for the icon key determined by the Topology Provider for the vertex is defined, the icon referenced by the icon ID is used.

    • If no mapping exists and the icon key has more than one segment, reduce the icon key by the last segment and try resolving that icon key.

  • If no mapping is defined, the fallback icon key default is used.

An example for the Linkd Topology Provider is given below since Juniper Network devices mainly use Linkd: /opt/opennms/etc/org.opennms.features.topology.app.icons.linkd.cfg

  • linkd.system.snmp. 1.3.6.1.4.1.2636.1.1.1.2.103=switch

  • linkd.system.snmp.1.3.6.1.4.1.2636.1.1.1.2.25=legacy_atm_router

  • linkd.system.snmp.1.3.6.1.4.1.2636.1.1.1.2.145=database

  • linkd.system.snmp.1.3.6.1.4.1.2636.1.1.1.2.39=router

  • linkd.system.snmp.1.3.6.1.4.1.2636.1.1.1.4.132=legacy_workgroup_switch

If the Enterprise OID of a node is  1.3.6.1.4.1.2636.1.1.1.2.103 , the icon with ID " switch " is used.

To get the Enterprise OID of a node/device, you can open a particular node from  Network Monitoring > Node and check " SNMP Attributes " for  sysObjectID .

alt

To get the icon ID, navigate to Junos Space UI > Network Monitoring > Topology > Change Icon by clicking any node/device and hover your mouse on the required icon. You will get the icon ID as shown below:

In the following screenshot, the icon ID " switch " is being displayed, which is nothing but the icon ID.

alt

Edit the /opt/opennms/etc/org.opennms.features.topology.app.icons.linkd.cfg file and link the icon ID and device OID mapping. Save the file and then refresh the topology on the UI.

Note: A service restart is not required.