
ZakiYoussef asked a question.
Hi Snow Experts,
the organization started a project to upgrade all windows 7 Devices to windows 10 but each upgraded device is coming to Snow Inventory as a new record (duplicated with the old record) although the hostnames are the same, only OS name record is changed.
so please let me know what configuration required to avoid duplicate records in Inventory.
Snow Inventory Agent version 6.7
Snow Inventory server agent : 6.5
Snow Inventory configuration: -
<AgentIdentity>
<HostNameOnly>
<SiteConfiguration expression="{A} AND {B}">
<IsVirtualized name="A">true</IsVirtualized>
<OperatingSystems name="B">
<OperatingSystem>AIX</OperatingSystem>
</OperatingSystems>
</SiteConfiguration>
</HostNameOnly>
Regards,
Zaki Sobhy
Hi Zaki,
You could switch to "Hostname only" mode temporarily or permanently.
This is described with examples in the Snow Inventory Server User Guide, chapter 7.8.
https://community.flexera.com/s/article/UserGuideSnowInventoryServer6
This should allow you to set the proper settings.
AIX surely will not be helpful as a criteria.
Regardless of this, I am pretty sure that changing the setting will not consolidate existing duplicates, this will be most likely somethin that needs to get fixed first.
Kind regards,
Axel
Thank you Axel for your answer,
The hostname only mode is already applied as per the configuration descried in the post, could you please let me know what definitely need to be changed in that configuration as I am confused on this.
Also do you have a way to find out the duplicated computers and delete it from Inventory?
Appreciate your kind response.
Regards,
Zaki
Hi Zaki,
The hostname mode only configuration which you have mentioned only work for AIX operating system and there is one change is required.
Snow Inventory configuration: -
<AgentIdentity>
<HostNameOnly>
<SiteConfiguration expression="{A} AND {B}">
<IsVirtualized name="A">true</IsVirtualized>
<OperatingSystems name="B">
<OperatingSystem>AIX</OperatingSystem>
</OperatingSystems>
</SiteConfiguration>
</HostNameOnly>
IsVirtualized is deprecated in the latest release of Inventory Servers I think 6.3 onwards so the same will not work with the latest versions of inv servers.
Whenever any unique parameters changed within pre-reported machines then the new entry will be created into the snow, in my view as you mentioned you are upgrading all of your windows 7 devices with Windows 10 then you can remove the same after windows 10 devices reported the equivalent of old one.
if you want to use the hostname mode only configuration for the windows os then refer to the SI6_UserGuide_InventoryServer user guide page no. 35.
Thanks,
Kishan Pant
Hello Kishan,
Thanks for your answer,
I replaced the current configuration with the below :
<AgentIdentity>
<HostNameOnly>
<SiteConfiguration expression="{A}">
<SiteNames name="A">
<SiteName>*</SiteName>
</SiteNames>
</SiteConfiguration>
</HostNameOnly>
</AgentIdentity>
Will it be applied to all Sites and OSs ? or do you think is it enough not to detect any duplicated devices again ?
Appreciate your support.
Hi Zaki,
<AgentIdentity>
<HostNameOnly>
<SiteConfiguration expression="{A}">
<SiteNames name="A">
<SiteName>*</SiteName>
</SiteNames>
</SiteConfiguration>
</HostNameOnly>
</AgentIdentity>
The above only applied for the site names, if you want to cover the OS then use below:
<AgentIdentity>
<HostNameOnly>
<SiteConfiguration expression="{A} AND {B}">
<SiteNames name="A">
<SiteName>*</SiteName>
</SiteNames>
<OperatingSystems name="B">
<OperatingSystem>Windows*</OperatingSystem>
<OperatingSystem>AIX</OperatingSystem>
............
</OperatingSystems>
</SiteConfiguration>
</HostNameOnly>
</AgentIdentity>
NOTE: you can use OR in place of AND, depend upon the criteria to check. ........ Add Operating systems that want to check with hostnameonly.
Thanks,
Kishan Pant
Hi Zaki
In the User Guide there are some examples, it depends on what exactly you want to achieve:
7.8.1.2 CONFIGURATION EXAMPLES
EXAMPLE 1
Target: All computers in all sites.
<Configuration>
<AgentIdentity>
<HostNameOnly>
<SiteConfiguration expression="{A}">
<SiteNames name="A">
<SiteName>*</SiteName>
</SiteNames>
</SiteConfiguration>
</HostNameOnly>
</AgentIdentity>
</Configuration>
EXAMPLE 2
Target: All computers in MySite, and with a configuration that is either MyConfig1 or
MyConfig2.
<Configuration>
<AgentIdentity>
<HostNameOnly>
<SiteConfiguration expression="{A} AND {B}">
<SiteNames name="A">
<SiteName>MySite</SiteName>
</SiteNames>
<ConfigNames name="B">
<ConfigName>MyConfig1</ConfigName>
<ConfigName>MyConfig2</ConfigName>
</ConfigNames>
</SiteConfiguration>
</HostNameOnly>
</AgentIdentity>
</Configuration>
Regarding the duplicates, this will require some database scripting. Snow support should be able to provide a script for this purpose, unfortunately I don't have it at hand currently.
Kind regards,
Axel
Regarding de-duplication of data in SnowLicenseManager (and SnowInventory), I wrote a stored procedure that identifies any duplicates and deletes them from both databases. It will keep the most recent record for any particular hostname (as defined by LastScanDate on dbo.tblComputer)
You can find the procedure SnowSuperDeDuper (patent pending😁) here if you want to use it. There is a table to log deletions to (delete the lines from the stored procedure if you don't want to do that). There are some optional parameters to limit when the deletions will process (if you have a lot, they can take a while to process so its best to limit execution so as not to crash into any other Snow processes that might occur (e.g. DUJ).
As an example if you want to run the process but limit it to office hours (e.g. 9 till 5) then call it like so...
EXEC dbo.SnowSuperDeDuper 9, 17
Disclaimer, as always...don't just blindly run this in your environment without testing first. e.g. this assumes the Snow instance in questions is for a single customer, I have paid no heed to CID.
You can identify what records it will delete by just running the SELECT statement as follows...
SELECT c.ComputerID,
ISNULL(m.ClientID, 0) As ClientID,
'<item id="' + CAST(ISNULL(m.ClientID, 0) AS VARCHAR(10)) + '"/>' AS ClientXMLDelete,
c.HostName,
c.LastScanDate,
c.ClientVersion,
c.ClientConfigurationName,
c.ScanIdentifier,
c.BiosSerialNumber,
c.Model,
c2.rnk
FROM SnowLicenseManager.dbo.tblComputer c INNER JOIN
(SELECT ComputerID, HostName, LastScanDate, BiosSerialNumber,
RANK() OVER(PARTITION BY Hostname ORDER BY LastScanDate DESC) As rnk
FROM SnowLicenseManager.dbo.tblComputer) c2 ON c.ComputerID = c2.ComputerID
LEFT JOIN SnowLicenseManager.inv.tblComputerInvSlmMap m ON m.ComputerID = c.ComputerID
LEFT JOIN SnowInventory.inv.DataClientView2 d on m.ClientId = d.ClientId
WHERE c2.rnk > 1
ORDER BY c.LastScanDate DESC
Hi Zaki
What version of the agents were on the old Windows 7 machines? was it still a version 5.x or 6.x agent.
An agents uniqueness is handled by the Inventory server seeing this information in the Manifest of the generated Snowpack file:
Site Name
Host Name
Bios Serial + Bios Vendor
SID on Windows Machines
Any one of these can change and the server will just update the current record but if two change then it will create a new record in INV and thus SLM.
So in your case the SID has certainly changed but have you changed any other agent config like the Sitename/Hostname?
Hello Joe,
Thanks for your answer,
the agent version installed on the old and new windows machines is 6.0, Only the OS changed. the hostname and site name are the same. so it shouldn't be duplicated.
Thanks for the extra information.
If only the OS has changed and all other information is static then something else has gone on and i would suggest contacting support.
I would be wary of using Hostname only mode to fix this until you find the actual cause as you may introduce other issues in your data quality by enabling it system wide and not targeting it specifically at the machines in question.
Common uses for Hostname Only mode
1. Merge data from two computers with same host name
2. Change of hostname must create a new record
3. Cloned Virtual machines with identical hardware
So 1. is for sort of you but this scenario is around you have say change a hostname and windows SID but still want to tie the historical computers information with this new rebuilt computer.