SAM-Stale VMS or Host consuming License

oberlel
Tera Contributor

Hi All

In our Health Check/SAM-Stale VMS or Host consuming licenses, we are seeing multiple cells phones listed. 

Has anyone experienced this behavior?

1. What could possible be causing a phone to be considered a VM or Host.

2. We have cell phones flagged to exclude from SAM. 

 

I have confirmed the devices are set to true to exclude from SAM.

 

Thanks

 

 

 

2 ACCEPTED SOLUTIONS

dreinhardt
Kilo Patron

Hi @oberlel,

the following script is used to determine the CIs for this check (Script Include: SAMPHealthScanUtil)

 

	findStaleCIsConsumingLicenses: function (finding) {
		var ciGr = new GlideRecord('cmdb_ci_hardware');
		ciGr.addJoinQuery('cmdb_sam_sw_install', 'sys_id', 'installed_on');
		ciGr.addQuery('last_discovered', '<=', gs.daysAgo(3 * 30));
		ciGr.query();
		while (ciGr.next()) {
			finding.setCurrentSource(ciGr);
			finding.increment();
		}

 

As soon the cell phone is linked with a install record older 90 days it will be shown as part of the results. Exclude from SAM is a attribute used by the reconcile only and isn't taken into account for any health check scripts.

 

Best, Dennis

View solution in original post

Hi @oberlel,

as mentioned above, the script is scoped to software installs without any additonal filters - you can adjust the health check script to exclude CI classes from beeing processed.

 

Best, Dennis

View solution in original post

3 REPLIES 3

dreinhardt
Kilo Patron

Hi @oberlel,

the following script is used to determine the CIs for this check (Script Include: SAMPHealthScanUtil)

 

	findStaleCIsConsumingLicenses: function (finding) {
		var ciGr = new GlideRecord('cmdb_ci_hardware');
		ciGr.addJoinQuery('cmdb_sam_sw_install', 'sys_id', 'installed_on');
		ciGr.addQuery('last_discovered', '<=', gs.daysAgo(3 * 30));
		ciGr.query();
		while (ciGr.next()) {
			finding.setCurrentSource(ciGr);
			finding.increment();
		}

 

As soon the cell phone is linked with a install record older 90 days it will be shown as part of the results. Exclude from SAM is a attribute used by the reconcile only and isn't taken into account for any health check scripts.

 

Best, Dennis

Dennis,

I apologize for the late response. Do you know how we can fix this issue so that it does not count cell phones?

Hi @oberlel,

as mentioned above, the script is scoped to software installs without any additonal filters - you can adjust the health check script to exclude CI classes from beeing processed.

 

Best, Dennis