- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
05-21-2025 07:55 AM
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
Solved! Go to Solution.
- Labels:
 - 
						
							
		
			SAMP
 - 
						
							
		
			Stale licenses
 
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
05-21-2025 12:37 PM
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
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
07-01-2025 12:33 PM
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
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
05-21-2025 12:37 PM
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
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
07-01-2025 12:19 PM
Dennis,
I apologize for the late response. Do you know how we can fix this issue so that it does not count cell phones?
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
07-01-2025 12:33 PM
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
