IBM Support

gis function not creating geographical locations in ITNM 4.2 with csv file....and database filling the file system!

Technical Blog Post


Abstract

gis function not creating geographical locations in ITNM 4.2 with csv file....and database filling the file system!

Body

When using ITNM 4.2  with a csv file of locations I don't see any geographic locations
in the GUI.   The /home/db2inst1 disk area fills to 100% and then eventually drains back
to normal.   I am confident my stitcher changes are correct and I see post stitcher data
in ncim.geographiclocation.

 

There could be problems with your configuration so if the solution described here is not your issue take
a look at some of my previous articles on

Using a csv file to create Geographic locations

Using discovered sysLocation to create Geographic locations

To the question at hand, you cannot create duplicate fields within one line of a csv file.
For example

192.168.0.1,221B Baker Street,London,London,England,51.5555,-0.07777

In the fictional information above city is "London", but since there is no state you cannot use
"London" again.   An entry must exist, so you could change the 'state' London to "LN".

This was causing a query that essential put the database in a loop.  

In 4.2 fp4 the geographic stitchers have changes that should prevent this.   But not by changing the query
but hoping to identify records with this duplication field.  So although an upgrade to fp4 would be a good
idea, the best solution is to edit your csv file.  The stitchers in fp4 will update the disco log file for
you to examine your csv records for a future discovery.

Below I take my system where the problem exists and show the steps needed to right the system.


Stop ITNM

 


-bash-4.2$ cd $PRECISION_HOME
-bash-4.2$ cd bin
-bash-4.2$ ./itnm_stop -domain NCOMS ncp
Stopping Network Manager domain NCOMS
-bash-4.2$ cd $NCHOME
-bash-4.2$ cd var/precision/
-bash-4.2$ rm -f Store*NCOMS
-bash-4.2$


connect to your database, and delete your custom data populated by your csv file,
and our table which has location data after discovery.   The name of your table
would be found by examining the DNCIM stitcher you modified at the end of the Infer stitcher

-bash-4.2$ pwd
/opt/IBM/netcool/core/precision/disco/stitchers/DNCIM
-bash-4.2$ tail InferDNCIMObjects.NCOMS.stch
            }
            delete( slaEnabled );


            // Sample stitcher to create the geographic and regional hierarchies for a GIS mapping solution
            ExecuteStitcher('ACMEDeviceLocationEnrich', domainId, isRediscovery, dynamicDiscoNode );
        }
    }
}

-bash-4.2$


db2 => connect to NCIM

   Database Connection Information

 Database server        = DB2/LINUXX8664 10.5.3
 SQL authorization ID   = ITNMDB
 Local database alias   = NCIM

db2 => delete from ncim.geographiclocation
DB20000I  The SQL command completed successfully.
db2 => delete from ncim.acmegeolocation
DB20000I  The SQL command completed successfully.
db2 => select count(*) from ncim.geographiclocation

1
-----------
          0

  1 record(s) selected.

db2 => select count(*) from ncim.acmegeolocation

1
-----------
          0

  1 record(s) selected.

db2 =>


Next edit your csv changing all of the duplicate fields as described above.  My file is
called GIS2.csv.  Insert it into your table.


db2 => import from /opt/cust/data/new/GIS2.csv of del insert into ncim.ACMEGEOLOCATION(ip,address,city,state,country,latitude,longitude)
SQL3109N  The utility is beginning to load data from file
"/opt/cust/data/new/GIS2.csv".

SQL3110N  The utility has completed processing.  "83" rows were read from the
input file.

SQL3221W  ...Begin COMMIT WORK. Input Record Count = "83".

SQL3222W  ...COMMIT of any database changes was successful.

SQL3149N  "83" rows were processed from the input file.  "83" rows were
successfully inserted into the table.  "0" rows were rejected.


Number of rows read         = 83
Number of rows skipped      = 0
Number of rows inserted     = 83
Number of rows updated      = 0
Number of rows rejected     = 0
Number of rows committed    = 83

db2 =>

Next start ITNM and allow a discovery to finish.   You will know it's ready to test
again when our stitchers process your custom data and populate our table below

db2 => select count(*) from ncim.geographiclocation

1
-----------
         20

  1 record(s) selected.

db2 =>


At this point you can log into the GUI and review your geographic locations again.

 

 

 


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

ibm11082481