Purging of installed software records

Robin Hearne
Tera Expert

I'm seeking a recommendation for how to handle the cleanup of Software Installation (cmdb_sam_sw_install) records when computers are retired from use and returned to stock.  There doesn't appear to be an out-of-the-box process to purge these, and neither does there appear to be any SAM Pro logic to ignore them.  As a result SAM Pro still thinks that the licences are being consumed.

 

Do I need to create custom Business Rules to delete these?  It seems like something that should be catered for out-of-the-box.

1 ACCEPTED SOLUTION

Robin Hearne
Tera Expert

I was able to find the answer to this and so I thought I'd post it here in case anyone else needs guidance in the future.

 

The key to this is the System Property com.snc.samp.exclude_device_flag which holds the name of a field on cmdb_ci_hardware to be used to identify computers that should be excluded from SAM.  When the 'SAM - Adjust installs for excluded Cis' job runs it will update the Software Installation (cmdb_sam_sw_install) records for excluded computers and set 'Active Install' to False.  This then ensures that those installations are excluded from the reconciliation process.

 

So what I have done is to create a BR on cmdb_ci_computer to set the field that I'm using to identify excluded computers to True or False based on the Install Status.

 

Thanks to the author of this post which got me to this answer:

https://www.servicenow.com/community/sam-forum/significance-of-quot-active-install-quot-field-on-the... 

View solution in original post

4 REPLIES 4

Yashsvi
Kilo Sage

Hi @Robin Hearne,

 

please check below link:

https://www.servicenow.com/community/itom-forum/how-are-software-uninstall-install-reconciled-agains...

 

Thank you, please make helpful if you accept the solution.

Thanks for the link.  That situation is different however as it related to when software is uninstalled, whereas my situation is for when a computer is retired.  The reconciliation could only be performed based on the disposition of the CI or Asset, not based on a discovery process. 

MikeW_SAMBeast
Giga Expert

Hi Robin - I use a fix script to delete software installations from CIs that are not "Installed".

Robin Hearne
Tera Expert

I was able to find the answer to this and so I thought I'd post it here in case anyone else needs guidance in the future.

 

The key to this is the System Property com.snc.samp.exclude_device_flag which holds the name of a field on cmdb_ci_hardware to be used to identify computers that should be excluded from SAM.  When the 'SAM - Adjust installs for excluded Cis' job runs it will update the Software Installation (cmdb_sam_sw_install) records for excluded computers and set 'Active Install' to False.  This then ensures that those installations are excluded from the reconciliation process.

 

So what I have done is to create a BR on cmdb_ci_computer to set the field that I'm using to identify excluded computers to True or False based on the Install Status.

 

Thanks to the author of this post which got me to this answer:

https://www.servicenow.com/community/sam-forum/significance-of-quot-active-install-quot-field-on-the...