SrinivasRamanu1
ServiceNow Employee
ServiceNow Employee

Software Install Creation and deletion mechanism 

 

Auto Creation of software installation records 

 

  • ServiceNow discovery discovers the running process for the specific software application such as Microsoft SQL Server and creates a record on the CMDB process table (cmdb_running_process) table. 
  • Based on the running process a record is created on the CMDB application table(cmdb_ci_appl) with install status set as “in use”  
  • This automatically triggers creation of software installation record on the CMDB software install table (cmdb_sam_sw_install) 

 Image 16-11-2023 at 15.59.jpeg

 

 

Auto Deletion of software installation records 

 

The process for deleting the software installation is also automated. This is hugely important, as correct software license compliance should be calculated on “true” number of existing software records in the environment 

 

  • ServiceNow discovery discovers that the running process for the specific software application such as SQL Server is no longer present and thereby removes the record on the CMDB process table (cmdb_running_process) table. 
  • Based on the removed running process record, the existing record on  the CMDB application table(cmdb_ci_appl) is set with install status as “absent”  
  • This automatically triggers a business rule to remove the corresponding software installation record on the CMDB software install table (cmdb_sam_sw_install) 

 Image 16-11-2023 at 16.00.jpeg

 

 

 

 

Important to know 

 

ServiceNow SAM Pro determines license compliance of software deployed on hardware CIs such as virtual machines, desktop etc. Best practice setup and management of retirement process of these hardware CIs from the CMDB is crucial for deterministic software license compliance calculation on SAM PRO. 

 

ServiceNow discovery would automatically discover the CI record and create the software install records. 

 

While “removing” or “deprovisioning” the hardware CIs the below steps need to be followed: 

 

  1. The SAM Manager/CMDB Manager is tasked with manually marking the asset state as retired, leading to the automatic classification of the Configuration Item (CI) state as retired. This, in turn, triggers the automatic removal of software installation records linked to the CI. 
  2. Collaborating with the infrastructure administrator, the SAM Manager ensures the proper elimination of CIs from the environment or network, effectively deprovisioning the CI/asset. 
  3. In subsequent ServiceNow discovery runs, the CI record remains undiscovered, and its historical software installation records are removed. This process guarantees a precise assessment of the license compliance position. * 

 

*Failure to remove the asset/CI from the network while the discovery process persists will result in the CI being rediscovered and consequently utilizing licenses. Therefore, it is advised to adhere to best practices by removing the CI from the network to prevent unwarranted license compliance complications. 

7 Comments
gvk
Tera Contributor

Nice article, but in my environment this is not the expected behavior. For example, the oracle financial suite is running as a process but no corresponding record was created in cmdb_sam_sw_install table

Community Alums
Not applicable

Thanks for the explanation @SrinivasRamanu1 but IMHO i think its missing a couple of useful points.

The reason Discovery creates these software entries is because the pattern that is triggered from the running process, also triggers a Post script called 'Sync Installed Software' - for Patterns 1.10.1 this only applies to

  • Oracle DB On Unix,
  • Oracle DB On Windows,
  • MSSql DB On Windows,
  • MailBox On Windows,
  • WebLogic,
  • My SQL server On Windows and Linux,
  • GlassFish Server,
  • Amazon AWS Relational Database Service,
  • Windows OS - Servers,
  • Scan Container Image

(@gvk this is why Oracle Financials does not create a software entry)

 

For example

  • 'MSSQL DB on Windows' Pattern collates all the process and edition data, and updates the MS-SQL instances table [cmdb_ci_db_mssql_instance].
  • The post script 'Sync Installed Software', leveraging supporting data from [cmdb_sam_sw_name_mapping], then creates a software installation [cmdb_sam_sw_install] with the correct edition and version details - these software installs are identifiable by the field 'created by application pattern' = 'true'
  • The software install is then linked to the [cmdb_ci_db_mssql_instance] record - this is how when the process no longer exists, and the SQL instance record deleted, so is the Software Installation. 
Community Alums
Not applicable

Nice Article!!

How the software installation and uninstallation works if we have multiple discovery sources (eg. ServiceNow Discovery, Tanium) 

Jacques Clement
Kilo Sage
Kilo Sage

Very useful thread, thanks.

Does anyone know if file-based discovery and/or ITOM content service could be used to also feed the Software Installation table with open source packages like Angular, Bootstrap, React, etc. I am interested to then connect this to APM Technology Portfolio Management.

Parul Chaudhary
Tera Guru

Hi @SrinivasRamanu1 ,

 

Thank you, this is very helpful.

 

Also curious to know if this is applicable to all the discovery sources, even File based discovery or any other third-party discovery source?

Additionally, would you be able to provide details of the business rules which triggers the deletion in cmdb_sam_sw_install table when underlying process is not discovered and are they enabled by default? 

 

Thank you,

Parul Chaudhary

 

shrihari_ni
Tera Contributor

Hi @Parul Chaudhary 

 

BR 'Sync Installed Software' setup on cmdb_ci_appl table gets triggered to delete the record from 'cmdb_sam_sw_install' table.

 

This BR is set to trigger on update and delete of the record. Looks for condition - 

current.version.changes() || current.edition.changes() || current.operation() === 'delete' || current.install_status.changes()

 

 

Thanks

Shrihari

 

Richo1
Tera Expert

Hi,

Does this also apply to software, which is discovered via ACC-V?

 

Thanks.