- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2017 09:14 AM
I am importing asset data through a transform map/import set, and am setting my model category (Computer for instance), but yet, the CI that is created is not being set to the Computer class. It keeps creating a CI with the 'Configuration Item' class.
Any suggestions on what I should be including in my transform to get the CI to create properly? When we manually create a Computer Asset, the Ci is created correctly, so the Model Category is setup properly.
Thanks!
Brad
Solved! Go to Solution.
- Labels:
-
Enterprise Asset Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2017 11:59 AM
Ben,
I wanted to give you an update - we found the issue. In one of my field mappings, I was asked to populate the CI name based on some other criteria. Because we did this, the CI was then created before the AssetAndCISyncronizer could run - by then, there was already a blank shell of a CI in the CMDB.
We removed this mapping - and voila! The CI creates the way it should.
Thanks all for the responses.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2017 09:20 AM
In your transform map, your target table is probably set to cmdb_ci, which is fine. You'll need to use a transform script to push the data to the table of your choice. A script something like:
if (source.operating_system == "AIX" ||
source.operating_system == "HP/UX" ||
source.operating_system == "Solaris" ||
source.operating_system == "AIX")
target.sys_class_name = "cmdb_ci_unix_server";
if (source.operating_system == "Windows 2000 Server" ||
source.operating_system == "Windows 2003 Server" ||
source.operating_system == "Windows NT 4.0")
target.sys_class_name = "cmdb_ci_win_server";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2017 09:34 AM
In your transform map, add an on before script that sets the target CI class to personal computer
target.sys_class_name = "cmdb_ci_pc_hardware";
Thank You
Please Hit Like, Helpful or Correct depending on the impact of response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2017 12:25 PM
Thanks for the responses - but let me clarify some details I left out of my original post. My primary intent is to populate Assets that we are managing, so my target table is alm_hardware.
My target CI class is cmdb_ci_computer
I can try adding an on before script - but ideally, I want this to be dynamic and pickup the relationships that exist in the model category table, then I can throw whatever data I want, and they will all get added properly. With your script, I need to make sure I've included all potential CI classes that I might encounter.
I'm not a fan of having to hardcode the CI Classes that I'm targeting. Calling out the specific OSes isn't an option, as that would need too much maintenance. What happens when I encounter a printer?
If anybody else has suggestions, please fire away!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2017 06:37 AM