What are some ways for identifying how a client machine was discovered or added into the SMP Console
search cancel

What are some ways for identifying how a client machine was discovered or added into the SMP Console

book

Article ID: 258125

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

Is there a way to identify how a machine was discovered or added to the SMP Console?  When troubleshooting issues with merging or machine duplicates, it is useful to know how a machine was originally added to the system (Network Discovery, AD Import, Data Connector, Asset, etc.).

Environment

ITMS 8.5, 8.6

Resolution

In support, we need to query and narrow down the results from the database in regards to the machine.  Usually using queries like this one:

--Example 1:

select
c.Name ComputerName,
dc.Name DataClassName,
rus.[RowCount],
rus.CreatedDate,
rus.ModifiedDate,
rus.DataLastChangedDate,
c.Guid ComputerGuid,
dc.Guid DataClassGuid
from ResourceUpdateSummary rus
join vRM_Computer_Item c on c.Guid = rus.ResourceGuid
join DataClass dc on dc.Guid = rus.InventoryClassGuid
where c.Name like 'CL-W10-02-1703%'  --add the machine name
order by c.Name, rus.CreatedDate asc

Other queries that you could use to find references on how a machine was added:

--Example 2:

select vc.Guid, 

vc.Name,
p.Name as Product,
case when gad._ResourceGuid is not null then 'AD Import'
     when nd._ResourceGuid is not null then nd.[Discovery Method]
     when vc.ProductGuid = '43789921-77EC-44AE-AE49-5E703067D598' then 'Data Connector'
     when vc.ProductGuid = 'E81A4114-5D09-45DC-97F6-4B06F08C9AB0' then 'Asset / Resource Management'
   else 'Unknown'
end as [Discovery Method]

FROM vItem vc
join vComputerResource vr on vr.Guid = vc.Guid
join vProduct p on p.Guid = vc.ProductGuid
left join [Inv_Global_Active_Directory_Details] gad 
  on gad._ResourceGuid = vc.Guid
left join 
 (select _ResourceGuid, [Discovery Method]
  from [Inv_AeX_AC_Discovery] 
  ) nd on nd._ResourceGuid = vc.Guid
where vc.name like 'CL-W10-x64-02%' --add machine name

ORDER BY vc.Name

 

--Example 3:

declare @guid uniqueidentifier
set @guid = '34DF3D92-6A43-4979-9E8A-001239547084' -- Item Guid

select 
i.Guid, 
i.Name,
im.ImportMethod,

case when (im.ImportMethod is null OR im.ImportMethod = 0) then 'Local Object'
when im.ImportMethod = 1 then 'External or XML Import'
when im.ImportMethod = 2 then 'Standard Replication'
when im.ImportMethod = 3 then 'Hierarchy Replication'
end as [Import Method]

from vItem i
left join ItemImportMethod im on im.Guid = i.Guid

where i.Guid = @guid