Asset and Configuration Item Install status mapping question

Sunny45
Kilo Guru

Hello 

I have requirement to change Asset status when CI status changes. (When CI changes to Absent, it should change to Missing status for Asset)

I see there are OOB mapping provided as below. For some reason it doesn't seems to be working from CI to Asset side. It works other way. (i.e. When I change Asset status to Missing, it changes CI status to Absent, but I want it other way if possible) 

Also these are OOB mapping and grayed out so can't modify. 

Any suggestion, how do I achieve my requirements? 

Please advise.

Thanks.

find_real_file.png

 

find_real_file.png

 

 

 

1 ACCEPTED SOLUTION

Hi,

If your device is on the hardware table or extended tables you should be using the "Hardware Status" field. You can see from the below that install_status does nothing to an asset on a table that extended cmdb_ci_hardware but hardware_status does

find_real_file.png

View solution in original post

6 REPLIES 6

Kieran Anson
Kilo Patron

Hi Surage,

The business rule Update Asset fields on change needs to be active for the field mapping to work. This in turn references the AssetAndCISynchronizer script include.

State mapping differs for assets that extend the hardware table and uses the alm_hardware_state_mapping instead.

Lastly, the OOB state mapping entries are protected by an ACL as to not allow someone to accidentally break the synchronization. You'll need to modify the write ACL on the table, deactive the record and then create your replacement to override it.

Hello Kieran,

Thanks for your response. I checked the BR " Update Asset fields on change" and it is active. 

Actually my requirement is I want to add new install status "Unknown" for CI and same goes for corresponding Asset record. So if CI status changes to "Unknow" Asset record also change to "Unknown" and vice versa. Basically sync in both direction. 

I tried adding new status on both CI (cmdb_ci) and Asset side (alm_asset). I also added Asset CI Install status mapping record as below, but for some reason I am not seeing any sync happening automatically. Is there any thing else I have to do on top of this? 

Please advise.

Thanks,

find_real_file.png

Hi,

For the CI you're testing the state change on, is it a hardware CI or a CI that extends the hardware table? If so , states are handled differently. You can check this by opening the xml of the CI record and search to see if the field "hardware_status" is present. If it is, the state mapping is done based on the alm_hardware_state_mapping table.

hi Kieran

The CI I am testing on belongs to Computer class. (cmdb_ci_computer) which extends hardware table, and the corresponding asset record belongs to alm_hardware table which also extends hardware table.

1) So I have added new install status on following choice lists. (snaps below).

cmdb_ci, cmdb, alm_asset, and alm_hardware.

 

2) After that I created mapping record on alm_asset_ci_state_mapping.

3) I wanted to create mapping record on alm_hardware_state_mapping but I don't see new choice option in there. (last snap). I could see only on alm_asset_ci_state_mapping table.

4) The sync still doesn't work in any direction.

Please advise what else I need to do? Do I need to add something in script include? I am completely lost now. 

Thanks.

find_real_file.png

find_real_file.png

 

find_real_file.png

find_real_file.png

find_real_file.png

 

 

 

 

find_real_file.png