IBM Support

ITNM 4.2 using SysLocation for ncp_gis geographical discovery

Technical Blog Post


Abstract

ITNM 4.2 using SysLocation for ncp_gis geographical discovery

Body

This blog entry will look at basic configuration and simple troubleshooting for the most common way to configure the geographical discovery.   Using location records from device data.

 

Quick link to device record geographical location discovery

 

First let's start at the end.  Whether I've used device data, or a csv file discovery of location information how can I tell if it made it through the discovery?

 

https://eforce.server.com:16311/ibm/console/nm_rest/topology/locations

 

  {"locations":[],"instrumentation":{"count":0,"processTime":0,"totalExecTime":0,"queryTime":0}}

 

I call this the 'rest test'.  If this comes back at '0' like above and you believe that correct location discovery data exists something has gone wrong.   So now let's move back to the beginning of the device discovery information.

 

From the doc link above, is the this statement true?

geographical data was added to the device record in the SysLocation field in the following format: location address;longitude;latitude.

 

Let's troubleshoot this in my lab

 

First according to the documentation above is the stitcher ready to use?

 

-bash-4.2$ pwd
/opt/IBM/netcool/core/precision/disco/stitchers
-bash-4.2$ tail PostLayerProcessing.stch
        }

        ExecuteStitcher('AddClass' );
        ExecuteStitcher('AddChassisIPTag' );

        // Sample stitcher to enrich geographic location based on the
        // syslocation of a device being is specific parsable format
        ExecuteStitcher('AddGeoLocationData');
    }
}
-bash-4.2$


Sure the 'AddGeoLocationData' stitcher has been uncommented out.

 

Next

 

-bash-4.2$ ./ncp_oql -username admin -domain ECOMS -service disco -latency 222222
ncp_oql ( IBM Tivoli Network Manager OQL Interface )
Copyright (C) 1997 - 2015 By IBM Corporation.  All Rights Reserved.  See product license for details.

IBM Tivoli Network Manager Version 4.2 (Build 34) 64 bit created by ncpbuild at 20:00:19 Thu Apr 20 BST 2017

Using no authentication
|eforce:1.> select * from ExtraDetails.returns where m_ExtraInfo->m_SysLocation is not null;
|eforce:2.> go

 

 

 

 

{
        m_Description='Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-IS-M), Version 12.3(23), RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by cisco Systems, Inc.
Compiled Tue 24-Jul-07 15:4';
        m_DownloadFdbData=1;
        m_ExtraInfo={
                m_IfNumber=11;
                m_IpForwarding=1;
                m_SysContact='Mr. Lab manager';
                m_SysLocation='Atatark Cultural Center Gamusuyu Mh 34437 Beyoulu Istanbul Turkey;28.98790969;41.03670138';
                m_SysServices=78
        };
        m_HaveAccess=1;
        m_LastRecord=1;
        m_ManagerId='';
        m_Name='192.168.0.1';
        m_ObjectId='1.3.6.1.4.1.9.1.209';
        m_Protocol=1;
        m_ReturnTime=1498063068;
        m_UniqueAddress='192.168.0.1';
        m_UpdAgent='ExtraDetails';
}

{
        m_Description='Huawei-3Com Versatile Routing Platform Software Version 3.10
Quidway S3928P-PWR-EI Product Version 3900-0013A
Copyright (c) 1998-2006, Hangzhou Huawei-3Com Tech. Co.,Ltd. All rights reserved.
Compiled Jan  9 2006 10:16:38 by wusijun, RELEASE SOFTWARE
';
        m_DownloadFdbData=1;
        m_ExtraInfo={
                m_IfNumber=35;
                m_IpForwarding=1;
                m_SysContact='Mrs Lab manager';
                m_SysLocation='Room Blue37 4th Floor, Southbank, London, UK';
                m_SysServices=78
        };
        m_HaveAccess=1;
        m_LastRecord=1;
        m_ManagerId='';
        m_Name='192.168.0.2';
        m_ObjectId='1.3.6.1.4.1.2011.10.1.15';
        m_Protocol=1;
        m_ReturnTime=1498063097;
        m_UniqueAddress='192.168.0.2';
        m_UpdAgent='ExtraDetails';
}

 

The first entry of the two looks good, but look at the second.  The SysLocation field is missing longitude and latitude.  This one will not pass through the discovery.

 

You can skip to the final table in -service disco to see how this stitcher processed these fields.

 

|eforce:1.> select m_ExtraInfo->geographicLocation from workingEntities.finalEntity where m_ExtraInfo->geographicLocation->latitude='41.03670138';
|eforce:2.> go
.
{
        geographicLocation={
                latitude='41.03670138';
                locationDescription='Atatark Cultural Center Gamusuyu Mh 34437 Beyoulu Istanbul Turkey';
                locationName='Atatark Cultural Center Gamusuyu Mh 34437 Beyoulu Istanbul Turkey';
                longitude='28.98790969'
        };
}
( 1 record(s) : Transaction complete )
|eforce:1.>

 

Did this data make it to ncim?

 

db2 => describe table ncim.geographiclocation

                                Data type                     Column
Column name                     schema    Data type name      Length     Scale Nulls
------------------------------- --------- ------------------- ---------- ----- ------
ENTITYID                        SYSIBM    INTEGER                      4     0 No
LOCATIONID                      SYSIBM    VARCHAR                    255     0 Yes
LOCATIONDESCRIPTION             SYSIBM    VARCHAR                    255     0 Yes
LONGITUDE                       SYSIBM    DECIMAL                     11     8 Yes
LATITUDE                        SYSIBM    DECIMAL                     10     8 Yes
ALTITUDE                        SYSIBM    INTEGER                      4     0 Yes
TIMEZONEOFFSET                  SYSIBM    VARCHAR                      9     0 Yes
ALTITUDEUNITS                   SYSIBM    VARCHAR                     11     0 Yes

  8 record(s) selected.

db2 =>

 

 

      20138 -                                                                                                                                                                                                                                                               Atatark Cultural Center Gamusuyu Mh 34437 Beyoulu Istanbul Turkey                                                                                                                                                                                                 28.98790969  41.03670130           - -              -

 

 

This is meant as a quick introduction to the data flow and I'll stop here.  But be mindful of

ncim.entityData

ncim.collects

entitytype 111

ncim.mainNodeDetails

Take that entityId and you'll need to follow the path of that entityid in the tables above.

 

Check out my other blogs on geographical discovery

 

config.json and online maps

config.json with offline wms map

Using csv files for location data not 'sysLocation' as described above

 

 

 

 

 

 


image

 

Subscribe and follow us for all the latest information directly on your social feeds:

 

 

image

 

image

 

image

 

 

  

Check out all our other posts and updates:

Academy Blogs:https://goo.gl/eZjStB
Academy Videos:https://goo.gl/kJeFZE
Academy Google+:https://goo.gl/HnTs0w
Academy Twitter :https://goo.gl/DiJbvD
 


image
 

 

 

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

UID

ibm11082469