Вы находитесь на странице: 1из 15

 

ServiceNow  Integration  to  HP  uCMDB  


HP  uCMDB  data  population  &  update  
Oliver  Schmitt  

ABSTRACT  
ServiceNow   does   not   have   an   integration,   which   integrates   from  
ServiceNow  to  HP  uCMDB.  At  the  moment  HP  has  integrated  to  our  Direct  
WebServices.   There   are   a   couple   of   disadvantages   with   this   integration.  
The   customer   needs   deep   knowledge   on   the   uCMDB   side   around   Jython  
and  XSLT  to  configure  the  transformation  of  relations  and  CIs.  In  addition,  
the   integration   transforms   every   single   CI   and   sends   it   to   our   Direct  
WebServices   sequentially.   This   document   will   introduce   a   new   way   of  
populating   uCMDB   data   (CIs   /   Relations)   into   ServiceNow   by   simply  
configuring  the  mapping.  In  addition,  deletes  (CIs  which  hasn’t  been  found  
by  discovery  for  a  period  of  time)  can  be  tracked  and  set  accordingly  to  a  
CMDB   process.   Even   if   the   customer   likes   to   use   the   uCMDB   still   as   the  
master  source  of  CI  data,  the  integration  can  be  used  to  push  back  (update)  
CIs  in  the  uCMDB.  
 

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
Table  of  Contents  
Overview  ...........................................................................................................................................  3  
Installation  .......................................................................................................................................  4  
Prerequisites  ..........................................................................................................................................  4  
Setup  uCMDB  side  .................................................................................................................................  4  
Setup  ServiceNow  side  ..........................................................................................................................  5  

Configure  the  uCMDB  side  ..........................................................................................................  7  


Create  integration  TQL  ..........................................................................................................................  7  
Configure  fields  for  export  .....................................................................................................................  8  

Configure  ServiceNow  side  .........................................................................................................  9  


Create  iTQL  record  .................................................................................................................................  9  
Configure  the  mapping  ..........................................................................................................................  9  
Schedule  ..............................................................................................................................................  11  

Update  the  uCMDB  .......................................................................................................................  12  


Setup  ....................................................................................................................................................  12  

Delete  Mechanism  ........................................................................................................................  13  


Prerequisites  ........................................................................................................................................  13  
Setup  ....................................................................................................................................................  13  
Scheduling  ...........................................................................................................................................  14  
Deletion  Process  ..................................................................................................................................  14  

Benchmarks  and  Notes  ..............................................................................................................  15  


Benchmarks  .........................................................................................................................................  15  
Notes  ...................................................................................................................................................  15  
 

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
Overview  
An  overview  of  how  the  integration  works  

1. Create  and  setup  an  integration  TQL  on  the  uCMDB  side  with  the  CIs,  Attributes  and  
relations  to  export  
2. Setup  the  mapping  for  those  CIs  to  the  appropriate  tables  and  fields  in  ServiceNow  
3. Schedule  or  execute  the  job  
4. The  uCMDB  Probe  on  the  MidServer  will  use  the  uCMDB  Java  API  to  connect    
5. The  data  will  be  extracted  from  the  defined  TQL  and  send  back  to  ServiceNow  in  XML  chunks  
6. After  completion  of  the  extract  from  the  uCMDB  the  mapping  mechanism  will  map  the  
uCMDB  CIs  to  the  defined  CMDB  Tables  in  ServiceNow  
7. Review  the  data  and  map  another  iTQL  

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
Installation  
This  section  describes  how  to  install  the  package  to  make  it  work  between  both  parties.  

Prerequisites  
• A  ServiceNow  Midserver  is  required  in  order  to  run  the  integration  
 

Setup  uCMDB  side  


Please  follow  these  instructions  in  detail  to  set  the  integration  up  on  HP  uCMDB.  

1. Open  the  uCMDB  UI  and  login  with  admin  permissions  


2. Go  to  “Administration”  and  click  on  “User  and  Roles”  
3. Create  a  new  User  and  set  the  name  and  password  
4. Click  on  the  newly  created  user  and  the  on  the  register  “Roles”  
5. Give  the  user  all  roles  

   

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
Setup  ServiceNow  side  
Please  follow  these  instructions  in  detail  to  set  the  integration  up  on  ServiceNow.  

1. Deploy  (Preview  and  Commit)  the  UpdateSet  “uCMDB  Integration  Release  2.xml”  

2. Go  to  the  new  application  “Integration  –  HP  uCMDB”  and  click  “Properties”    
3. Fill  in  the  following  fields  with  the  appropriate  values:  
a. uCMDB  Host  =  the  DNS  name  or  IP  of  the  uCMDB  Server  
b. uCMDB  Port  =  the  port  number  of  the  uCMDB  Server  
c. uCMDB  username  =  the  name  of  the  user  we  just  set  up  in  the  last  chapter  
d. uCMDB  password  =  the  password  of  the  user  we  just  set  up  in  the  last  chapter  
e. SSL  Configuration:  If  the  uCMDB  server  is  configured  to  use  SSL  check  “Yes”  
f. Midservername  =  You  need  to  enter  the  name  of  the  MidServer  that  should  be  used  
for  the  integration  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
4. Go  to  this  URL:  http(s)://<ucmdb_server>:<port>  
5. Click  on  “API  Client  Download”  and  download  the  file  “ucmdb-­‐api.jar”  

 
6. Go  to  the  Application  “Mid  Server”  and  click  on  “JAR  Files”  
7.  Create  a  new  record  and  attach  the  “ucmdb-­‐api.jar”  and  save  it  

 
8. It  is  highly  recommended  in  regards  to  performance  to  ask  Support  or  Professional  Services  
to  create  an  index  on  the  following  tables:  
g. Table:  cmdb_ci,  Field:  u_ucmdbid  
h. Table:  cmdb_rel_ci,  Field:  u_ucmdbid  

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
Configure  the  uCMDB  side  
This  section  describes  in  detail  what  is  necessary  to  set  up  on  the  uCMDB  side  to  allow  an  extract  
from  ServiceNow.  

Create  integration  TQL  


In  order  to  make  data  available  to  the  “outside  world”  you  need  to  setup  so  called  integration  TQLs.  
Only  integration  TQLs  are  visible  for  extraction  from  an  external  tool.  

1. Open  the  uCMDB  UI  and  go  to  the  “Modeling  Studio”  
2. Click  on  “New”  and  select  “Query”  
 

 
 
3. Add  all  relevant  CIs  and  relate  them  if  needed.  Here  a  simple  example  

4. Save  the  query  and  give  it  a  unique  name.  In  addition,  make  sure  the  query  is  of  the  type  
“Integration”.  

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
Configure  fields  for  export  
 

1. Open  your  newly  created  integration  TQL  


2. Right  click  on  one  of  the  nodes  in  your  iTQL  (here  the  Windows  CI)  
 

 
 
3. Click  on  “Advanced  layout  settings”  and  check  on  every  field  das  should  be  extracted  
 

 
 
4. Repeat  that  for  every  node  and  select  the  appropriate  fields  you  like  to  extract  
5. Save  the  TQL  

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
Configure  ServiceNow  side  
This  section  describes  how  the  mapping  on  the  ServiceNow  side  needs  to  be  set  up.  

Create  iTQL  record  


 
1. Go  to  the  Application  “Integration  –  HP  uCMDB”  and  click  on  “iTQL”  
2. Create  a  new  record  and  give  it  the  exact  name  like  it  was  set  up  in  the  uCMDB.  In  our  
example  that  would  be  “WindowsAndUnix”.  Add  a  more  detailed  description  and  submit  the  
record.  
 

 
 

Configure  the  mapping  


 
1. Open  the  iTQL  record.  In  our  example  “WindowsAndUnix”  
2. Go  to  the  related  list  “Mapped  Cis”  and  create  a  new  record  
3. Enter  the  name  of  the  CI  that  you  like  to  map  in  this  TQL  and  set  up  the  table  in  ServiceNow  
where  it  should  be  mapped.  In  this  example  we  have  two  CIs:  Windows  and  Unix  
4. The  names  used  for  the  mapping  must  be  from  the  uCMDB  CI  Model  (internal  names,  not  
the  display  values)  
5. Repeat  that  step  for  each  CI  you  like  to  map.  
 

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
6. Go  back  to  the  iTQL  (“WindowsAndUnix”)  
7. Go  to  the  related  list  “Mapped  Attributes”  and  create  a  new  record  
8. Select  on  of  the  mapped  CIs  that  was  just  created  and  enter  the  name  of  the  uCMDB  
field/Attribute  you  like  to  map.  Again,  the  name  should  be  the  internal  name  from  the  CI  
Class  Model,  not  the  display  label.  In  addition,  map  it  to  the  field  in  ServiceNow  where  you  
like  to  see  the  value  populated.  
Note:  If  a  more  complex  transformation/mapping  is  required  you  can  check  the  “Advanced”  
box  and  create  a  script  which  is  used  for  the  mapping  of  that  field.  

 
9. Submit  the  record.  
10. Repeat  that  process  for  each  field/attribute  that  should  be  mapped.  
Note:  For  demo  purpose  the  fields  will  be  mapped  to  the  name  field  

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
11. If  there  are  any  relations  involved  in  the  mapping,  open  to  the  iTQL  record    
12. Go  to  the  related  list  “Mapped  Relations”  and  create  a  new  record  
13. Enter  the  name  of  the  uCMDB  relation  and  map  it  to  the  ServiceNow  relation  

Schedule  
When  everything  is  finished  you  can  decide  to  either  run  the  job  manually  by  clicking  in  the  iTQL  
record  on  “Execute  Now”  or  create  a  schedule.  

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
Update  the  uCMDB  
To  close  the  lifecycle  of  a  CI  customers  might  require  pushing  modifications  of  CIs  back  to  the  
uCMDB.  A  lot  of  customers  are  keeping  the  uCMDB  as  a  master  source  of  CI  data.  Therefore  this  part  
of  the  integration  can  be  used.  

Setup  
• Subscribe  to  a  specific  CI  class  by  clicking  the  “Subscribe  to  CI”  module  

• Go  to  the  record  and  create  the  attributes  you  want  to  map  against  the  uCMDB  

• If  you  finished  the  mapping  of  all  attributes  the  integration  will  automatically  trigger,  on  
every  update  of  a  CI  record  from  that  specific  table,  an  update  against  the  uCMDB.  

Note:  Be  careful  if  other  sources  are  imported  in  a  subscribed  table,  like  an  ImportSet.  Make  
sure  that  reconciliation  is  only  triggered  if  there  really  is  an  update.  Otherwise  the  integration  
logic  will  send  something  automatically  to  the  uCMDB.  

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
Delete  Mechanism  
The  deletes  of  specific  CIs  or  Relations  cant  be  retrieved  without  extensive  effort  over  the  uCMDB  
API,  therefore  a  JDBC  integration  can  be  done.  It  is  lean  and  requires  just  access  to  one  DB  table.  

Prerequisites  
• An  SQL  user  must  be  provisioned  by  the  customer  with  the  following  properties:  
o Read  Access  to  uCMDB  History  DB/  Schema  (name  needs  to  be  set  during  
installation  of  the  uCMDB)  
o Read  Access  to  the  table  “HISTORY_EVENTS”  
• A  ServiceNow  Midserver  is  required  in  order  to  run  the  integration  
 

Setup    
Please  follow  these  instructions  in  detail  to  set  the  integration  up.  

1. Open  the  “uCMDB  History  Integration”  Data  Source  and  set  up  the  following  
a. Use  MID  Server:  Setup  the  MidServer  which  was  installed  in  the  customer  
environment  and  is  able  to  connect  to  the  uCMDB  Database  
b. Format:  Enter  the  correct  Database  type  
c. Database  name:  Name  of  the  uCMDB  History  database,  which  is  set  during  the  
installation  
d. Database  port:  The  correct  port  to  connect  to  the  Database  
e. User  name:  The  user  who  can  access  the  HISTORY_EVENTS  table  
f. Password:  The  corresponding  user  password  
g. Server:  Name  or  IP  of  the  database  server  
h. SQL  Statement:  It  is  H IGHLY  recommended  to  N OT  touch  the  SQL  Statement.  
 

   

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
Scheduling  
Go  once  over  the  scheduled  job  and  set  an  appropriate  user  for  the  Import  and  a  timeframe  in  which  
the  import  should  run.  

Deletion  Process  
To  see  which  CIs  and  Relations  have  been  deleted  and  when  in  the  uCMDB,  two  fields  are  available  
on  the  cmdb_ci  and  cmdb_rel_ci  table.  They  are  called  “uCMDB  Delete”  and  “uCMDB  Delete  Data”.    

It  is  recommended  to  create  a  process  around  what  should  happen  to  these  CIs.  Recommended  
solutions  are  the  following:  

• Extention  of  the  ImportSet:  


o OnComplete  check  for  a  specific  time  on  both  tables  and  delete  all  CIs,  which  have  
been  marked  as  deleted  and  who  are  beyond  this  frame  
• Scheduled  job:  
o A  job  who  runs  once  a  week  and  does  the  above  

   

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

 
Benchmarks  and  Notes  
Just  some  notable  facts  and  how  the  integration  runs.  

Benchmarks  
Some  facts  from  load  tests:  

• Initial  load  /  first  run  of  a  mapped  TQL:  


o 10600  Unix  CIs  inserted,  with  1  field  mapped  
o 10600  Windows  CIs  inserted,  with  2  fields  mapped  
o 10600  Relations  (between  Unix  and  Windows)  
o Total  CIs:  31800  
o Total  time:  32  minutes  (on  hosted  demo  instance)  
• Updates  after  initial  run:  
o 10600  updates  on  Unix  Cis  after  adding  a  new  field  
o Total  CIs:  10600  updates  
o Total  time:  4  minutes  
• Deletes:  
o 5000  deletes  on  Unix  servers  
o Total  time:  3  minutes  

Notes  
The  integration  was  tested  with  HP  uCMDB  9.02  and  with  ServiceNow  Calgary  P2H5  release.  

4810 Eastgate Mall • San Diego, CA 92121 • www.servicenow.com

Вам также может понравиться