The location field is passed from a discovery schedule to the CIs discovered by it. Sometimes, other fields in the discovery schedule would be of interest to the CI discovered. This document goes over how the location field is passed from the discovery_schedule to the CI discovered and presents a possible option to replicate this behavior for other fields.

How does discovery pass the location field to discovered CIs?

  1. DiscoverySensor populates status via getAgentCorrelator() function.
  2. DiscoverySensor.getLocationID() populates location. Shazzam probe extends DiscoverySensor and thus has location available to it.
  3. Shazzam sensor populates cidata via updateLocation() function, called from process_inner() function.
  4. Once cidata is populate it will keep on being passed all the way until the CI is updated.

Release or Environment

All currently supported environments.


To pass other fields from the discovery schedule, like discovery does with location OOB, would require to update the scripts mentioned. Note that such scripts would be owned by the team which customized it. A simpler option would be to pass fields to the CIs post discovery.

When a discovery for a device completes, a discovery.device.complete event is triggered. Script Actions process such events and take action. Therefore, another option would be to create a script action, "System Policy > Events > Script Actions", which would update such field accordingly when processing the discovery.device.complete.

In the following example, the script action dot walks to the schedule and collects the sys_updated_on field and logs it:

(function() { 
var updateOn = current.status.dscheduler.sys_updated_on + "";
gs.log("updateOn: " + updateOn, "updateOn");

Additional Information

For more information about script actions please see:

Article Information

Last Updated:2020-04-03 09:16:43