Want to update discovery source for SCCM integration

nikhilagr20
Giga Contributor

I am doing SCCM integration (2012R2) in ServiceNow. When I am getting data from SCCM & transform it into CMDB, Discovery Source is coming blank & Created By & Updated By fields are getting "system" value instead of User I am using for integration.   How can I change it?

5 REPLIES 5

jake_mckenna
ServiceNow Employee
ServiceNow Employee

Discovery Source is not populated by default on the SCCM transform so you are going to need to add that field to the field mappings. Also as a side note you can also add a field mapping to Most recent Discovery and use the lastHWScan field coming over from SCCM.



If the created by and updated by are not being populated correctly i would check and validate that the user on the import you are using is still available in the system. If this is something wrong with the run as user this might be the cause. Also if the transform is kicked off by you or anyone else i believe that will override the results also.


Do you have an example field map script to update the Discovery Source field on the Computer ID transform map?


find_real_file.png


find_real_file.png


We also changed our Computer Identity query to fetch username from a different location.   Since we use Discovery for servers, we also filtered out Servers from the SCCM query.



find_real_file.png


SELECT


v_GS_COMPUTER_SYSTEM.Name0 as name,


v_GS_COMPUTER_SYSTEM.domain0 as domain,


v_GS_COMPUTER_SYSTEM.Model0 as model,


v_GS_COMPUTER_SYSTEM.Manufacturer0 as manufacturer,



v_GS_COMPUTER_SYSTEM.ResourceID,


v_R_System.User_Name0 as username,



v_GS_COMPUTER_SYSTEM.NumberOfProcessors0 as numberofprocessors,


v_GS_SYSTEM.SystemRole0 as SystemRole,


v_GS_OPERATING_SYSTEM.Caption0 as caption,


v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 as chassistype,


v_GS_WORKSTATION_STATUS.LastHWScan,


v_GS_PC_BIOS.SerialNumber0 as BIOSSerialNumber,


v_GS_COMPUTER_SYSTEM_PRODUCT.IdentifyingNumber0 as SystemSerialNumber,


v_GS_COMPUTER_SYSTEM_PRODUCT.UUID0 as UUIDSerialNumber,


v_GS_SYSTEM_ENCLOSURE.SerialNumber0 as ChassisSerialNumber,


v_GS_BASEBOARD.SerialNumber0 as BaseboardSerialNumber



FROM v_GS_COMPUTER_SYSTEM


LEFT JOIN v_GS_WORKSTATION_STATUS ON v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_WORKSTATION_STATUS.ResourceID


LEFT JOIN v_GS_SYSTEM ON v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_SYSTEM.ResourceID


LEFT JOIN v_GS_PC_BIOS ON v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_PC_BIOS.ResourceID


LEFT JOIN v_GS_OPERATING_SYSTEM ON v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_OPERATING_SYSTEM.ResourceID


LEFT JOIN v_GS_COMPUTER_SYSTEM_PRODUCT ON v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_COMPUTER_SYSTEM_PRODUCT.ResourceID


LEFT JOIN v_GS_SYSTEM_ENCLOSURE ON v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_SYSTEM_ENCLOSURE.ResourceID


LEFT JOIN v_GS_BASEBOARD ON v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_BASEBOARD.ResourceID



LEFT JOIN v_R_SYSTEM ON v_GS_COMPUTER_SYSTEM.ResourceID = v_R_SYSTEM.ResourceID


WHERE v_GS_SYSTEM.SystemRole0 <> 'Server'



Way back in Calgary or Fuji, the "Used last run datetime" function did not work for us.   I still have it off, even though I am running SCCM 2012 v2 (Version 4.1.0)


Hi Peter,



I have done this step and update the value & now the   discovery Source is getting updated with SCCM as Value.


however even after doing this I am unable to set up data source precedence from Multi Datasource like SCCM and Discovery , I checked the table "cmdb_datasource_last_update" but not every entry is present of the change and entry which are present are only for CI on which "Horizontal Pattern probe" are called . any Idea if i might have missed something. I want my Datasource data not to be overwritten from other sources, but from the Table "cmdb_datasource_last_update" i am unable to make out if Reconcilcation and Datasource Precedence work as intended.



Regards,


Jason Aranha