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.
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.
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 .
/opt/opennms/etc/org.opennms.features.topology.app.icons. <topology-namespace> .cfg
The list of icon files is as follows:
org.opennms.features.topology.app.icons.default.cfg = Default icon mapping
org.opennms.features.topology.app.icons.default.cfg
org.opennms.features.topology.app.icons.application.cfg = Icon mapping for the Application Topology Provider
org.opennms.features.topology.app.icons.application.cfg
org.opennms.features.topology.app.icons.bsm.cfg = Icon mapping for the Business Services Topology Provider
org.opennms.features.topology.app.icons.bsm.cfg
org.opennms.features.topology.app.icons.linkd.cfg = Icon mapping for the Linkd Topology Provider
org.opennms.features.topology.app.icons.linkd.cfg
org.opennms.features.topology.app.icons.vmware.cfg = Icon mapping for the VMware Topology Provider
org.opennms.features.topology.app.icons.vmware.cfg
Each file contains a mapping in the form of <icon key> = <icon id> . Junos Space mostly uses the Linkd Topology.
<icon key> = <icon id>
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
/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 .
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.
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.