DX Infrastructure Management

Tech Tip: Importing CA UIM devices into CA Service Desk Manager (CMDB) 

10-23-2017 12:47 PM

There is no out of the box integration to import CIs/Devices from UIM into CA Service Desk Manager CMDB.  However, it is possible to do with a little preparation using the CMDB GRLoader tool.

This may be useful if you are using the Service Desk Gateway probe ('sdgtw' probe).  Using this method,  you can now create tickets linked to the correct CI in Service Desk.

This example will bring over: 

 

In this example, UIM is using an Oracle 12c database server.

CA SDM (CMDB) is using MS SQL 2014.

 

First, identify the database query that will pull the desired information from the UIM database.

For example, this query will work against a MS SQL or Oracle UIM database:

/** 'ci' is required to tell CMDB to load a CI object **/
SELECT 'ci' as object_type,
/** ip addresses is stored as "alarm_id" in CA CMDB **/
ip as alarm_id,
/** Tell CMDB these are to be loaded as "Server" CIs **/
'Server' as class,
name as name,
mac as mac_address,
dns_name as dns_name
FROM CM_COMPUTER_SYSTEM;

 

The reason for the aliased columns is to output the data into the CMDB column names.

Once you verify that query returns results, the next step is to prepare to run the GRloader command

At a command prompt:

 1- nxcd java\lib\

 2- C:\PROGRA~2\CA\SERVIC~1\java\lib\>grloader -u ServiceDesk -p password -s http://localhost:8080 -dbdriver oracle.jdbc.OracleDriver -dburl "jdbc:oracle:thin:@databaseHostname:1521/pdborcl.ca.com
" -dbuser CA_UIM -dbpswd password -dbstmt "SELECT 'ci' as object_type, 'Server' as class, ip as alarm_id, name as name,mac as mac_address,dns_name as dns_name FROM CM_COMPUTER_SYSTEM" -a -n -E -e jdbc_error.xml

 

 

If successful, you should see output like the following:

 

GRLoader is smart enough to update an existing CI if it already exists.

Check the output file for errors: jdbc_error.xml

 

There are many configuration items for GRLoader.  For more information: 

General Resource Loader - GRLoader - CA Service Management - 17.0 - CA Technologies Documentation 

The GRLoader Command - CA Service Management - 14.1 - CA Technologies Documentation 

 

Sample GRLoader command for Oracle:

grloader -u ServiceDesk -p password -s http://localhost:8080 -dbdriver oracle.jdbc.OracleDriver -dburl "jdbc:oracle:thin:@databaseHostname:1521/pdborcl.ca.com
" -dbuser CA_UIM -dbpswd password -dbstmt "SELECT 'ci' as object_type, 'Server' as class, ip as alarm_id, name as name,mac as mac_address,dns_name as dns_name FROM CM_COMPUTER_SYSTEM" -a -n -E -e jdbc_error.xml

 

for MS SQL and MySQL examples, please reference the documentation for GRLoader.

 

GRLoader has the functionality to load the data into a staging area (see TWA options) before loading into the CMDB, which is not shown above.

 

You may script and schedule this command to run as a cron job  or automated task, to get regular updates from UIM

CA Service Management

 

Statistics
0 Favorited
14 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

10-24-2017 12:55 PM

It is the same steps, query, etc...

Just need to change this argument:

-dburl "jdbc:oracle:thin:@databaseHostname:1521/pdborcl.ca.com

for MS SQL, for example:

-dburl "jdbc:sqlserver://walsh04-F9388:1433;databaseName=CA_UIM;" 

10-24-2017 12:44 PM

Good One ,Can you please share the procedure of UIM having SQL database

10-23-2017 01:04 PM

Nice work Shawn_Walsh!!

Related Entries and Links

No Related Resource entered.