Blogs

ACERCA DE ESTE BLOG

Welcome to the Network and Service Assurance Blog, where you can read the perspectives from network and service assurance experts. This Blog provides insights into the network and service assurance solution, as well as technical details about specific IBM

Enlaces

TWEETS RECIENTES

Easy topology layers via ITNM collectors and without new stitchers

This article describes how you can easily add a new topology layer to IBM Tivoli Network Manager (ITNM) via the collector framework without having to use stitchers. ITNM's collectors provide a way of incorporating topology data into the discovery process from files, Element Management Systems, databases and so on. Collectors can also work in-parallel with ITNM's SNMP, Telnet & SSH based discovery capabilities that are typically used to obtain data directly from devices. ITNM v3.9 FP2 was used for this article.

The scenario described is one where you have the topology data you want to use already held in an external system and that you're able to create CSV text files containing the data needed by ITNM's Generic CSV collector. The business value of adding new topology layers to ITNM is that you can, for example, expedite the resolution of problems by visualising events in-context of resource and relationship information that would otherwise be outside of what ITNM provides out of the box.

In this article, we've got a fictional network topology layer, MyBusinessLayer, that we want to model and we want to do it without having to write any ITNM stitchers. The secret behind this technique is (a) to ensure the CSV files contain the new topology layer adjacency data and (b) to configure ITNM to directly map those adjacencies to the new topology. This technique is only really suitable if the source of topology data gives you the adjacencies explicitly.

The CSV Files

The first thing to do is ensure that the CSV files contain the new adjacency data that we'll map to the topology later on. An easy way to do this is to store the new adjacency data within ITNM's "ExtraInfo" freeform data field but how can the collector do that given the CSV format is very tabular in nature? The answer is via an XML fragment that describes the additional data to store in ExtraInfo for the record described by the line in the CSV file. In this article, I'll use interfaces.csv which describes ports and interfaces the collector should discover.

Here's an example line, where the columns defined in the line are:-

BaseName - the name of the device this interface line relates to.

IfIndex - the unique numerical index of this interface entry on the named device.

IfDescr - the description of the interface.

IfType - the numerical type of the interface as defined by IANA.

IfPhysAddress - the physical address of this port/interface.

IfName - the name of the interface.

IpAddress - the IP address of this interface.

IfOperStatus - the operational status of this interface.

Subnet - the IP subnet the IpAddress of this interface is in.

SubnetMask - the subnet mask of the Subnet this interface is in.

extraInfo - the ExtraInfo content for this interface record.

Note the XML fragment that's mapped to extraInfo at the end of the line and, in particular, the multiple <m_MyBusinessLayer> elements.

The <m_MyBusinessLayer> elements represent the relationships to other records in the resulting topology, regardless of whether they're discovered by the collectors or directly from the devices. There are two things to ensure:-

The name specified for each adjacency element corresponds to ITNM's configured naming convention.

A "dummy" element is created to ensure that m_MyBusinessLayer gets a list in ExtraInfo. This only really becomes relevant if you have one adjacency from the current record as you'd get a standard textual assignment if you didn't have the dummy entry - we need a list.

If you're familiar with Perl, a handy way of creating the necessary XML fragment format is as follows. The first method fragment would be called when you create the adjacencies. It pushes a dummy adjacency and the real one into an array reference called "interfaces" within the hash called scenario. It then uses the extraInfoToXML method below to convert the Perl hash to an XML fragment. There are, of course, efficiency gains to be had here but it serves as an example of the approach.

Now you've got the CSV file created, we need to tell ITNM to map the adjacencies stored in the <m_MyBusinessLayer> elements to the new topology layer. Follow these steps...

1.Create a new entityType in ITNM's NCIM database for the new topology layer. Use your favourite database client or ncp_oql to do this. For example, use entityType 90 for the new layer (check you are not using it first!).

2.Configure ITNM's ncp_model process to map the new ExtraInfo field to the new topology layer by editing the $NCHOME/etc/precision/ModelNcimDb.cfg file. (or your domain-specific version of it).

a. Add an insert to tell ncp_model about the new topology layer, the 606 is an example, it should just increment from previous entries - it just allows model to know about the layer in subsequent configuration.

3. Ensure the Collector drive file has a mapping for extraInfo by editing the /opt/IBM/tivoli/netcool/precision/collectors/perlCollectors/GenericCsv/exampleCsv.drv (driver) file or your version of it. For example, my entry for InterfaceData has the following entry to map the 11th item of the comma-delimited line to ExtraInfo:-

11 =>

{

Name => 'extraInfo',

Description => '',

MapsTo => 'extraInfo'

},

4. Finally, tell ITNM's GUIs about the new topology layer so you can use it in the hop view and filters etc. Edit the ncp_layertypes.properties file (and those for your locale) by editing the appropriate files in the /opt/IBM/tivoli/netcool/precision/profiles/TIPProfile/etc/tnm/locale directory. My file now reads:-

# NLS_MESSAGEFORMAT_NONE

# NLS_ENCODING=UNICODE

# The word connectivity. should be prefixed to each of the layer's entityId

# Add only those layers which u want to display in GUI. For ex: You can skip entityType 77 and 78

connectivity.107:Layer 1

connectivity.72:Layer 2

connectivity.73:Layer 3

connectivity.81:PIM

connectivity.83:IPMRoute

connectivity.-1:IP Subnets

connectivity.default:Default

connectivity.5736254:No Connections

# article demo

connectivity.90:My Business Layer

Now restart ITNM, run a discovery and see if your layer is populated. Verify the OQL record in ncp_model has your new adjacencies, for example:-