"Discovery Source" ?

DanLevin
Kilo Expert

Hi everyone,


We are working exclusively with the Discovery tool, and our progress is coming nicely. However, I am having trouble with a report that I've created on the Configuration Item table that is designed to show all of the CIs that have been created by or updated by Discovery in the past X hours. The goal of the report is to display only CIs created or updated by Discovery, while CIs that have been created or updated by any other source should not be shown. While experimenting with this report, I have become curious as to the logic behind the how the "Discovery Source" field is populated.

 

As the Discovery tool is our only source of such activity, I would expect that each CI created or updated by Discovery to have a value of "Service-now" in the "Discovery Source" field. However, I see that the "Discovery Source" field appears to be empty for many of the records returned in this report.

 

To dig deeper, I added a filter to the report that says "Updated by" is "the account carrying out the discovery activity". Using this logic, only CIs that have been updated by Discovery should be returned, and the "Discovery Source" field should contain "Service-now" for all records. However, the "Discovery Source" field appears to be empty for the majority of the nearly 40,000 records returned by this report.

 

If I add an additional filter of "Discovery Source" is not "Service-now", 0 records are returned. All of this experimenting leads me to the question: Is there any reason why the "Discovery Source" field would be empty for some records in this report, when it must actually contain a value of "Service-now"?

 

Any help would be very much appreciated!

1 ACCEPTED SOLUTION

Jacob_Andersen
ServiceNow Employee
ServiceNow Employee

Transform maps and import sets are not used to set discovery values.   You need to look at the sensor scripts in the discovery application to modify data mappings.



Regarding the discovery_source field, that is set in script includes.   Here are some that set this value: https://[your_instance_name].service-now.com/sys_script_include_list.do?sysparm_query=scriptLIKEdisc...


View solution in original post

6 REPLIES 6

Jacob_Andersen
ServiceNow Employee
ServiceNow Employee

Transform maps and import sets are not used to set discovery values.   You need to look at the sensor scripts in the discovery application to modify data mappings.



Regarding the discovery_source field, that is set in script includes.   Here are some that set this value: https://[your_instance_name].service-now.com/sys_script_include_list.do?sysparm_query=scriptLIKEdisc...


Great! Thank you to William Sun and Jacob Andersen (Crossfuze)!



At Jacob's direction, I pulled up the "DiscoveryIDSensor" Script include, as it is the only one with a script that contains"discovery_source".



I'm no developer, so when I review the script itself, I get a little (okay, a lot) lost. I read through the comments in the script, and it would appear that the Script Include behaves exactly as I thought it would, by setting the "Discovery Source" for each CI it Discovers as "Service-now".



Am I incorrect in my assumptions here? I'm wondering if I may need to raise a ticket with Service-Now - as what I'm seeing in my instance does not appear to line up with the functionality laid out in the script.



Thanks again!