In some cases, it may be necessary to stop discovery from running. This KB goes over a few case scenarios and how to stop discovery.
Note: Any sample script in this KB is given only as a starting point. Sample scripts should be tested first in a non production instance and modified to meet each instance's requirements if necessary.
Using a list:
Using a fix script:
var dac = new SncDiscoveryCancel();
var status = new GlideRecord('discovery_status');
gs.log("Fix Script: Canceling discovery_status " + status.sys_id);
Discovery can be stopped for certain classes after a CI is classified via the Discovery Configuration Console.
To stop a discovery after a CI has been classified:
Note: Turning off all device types in the configuration console will not disable discovery. The Shazzam and Classification phases will still run. Discovery will stop once the devices are classified.
As part of the cloning process, Post-clone cleanup scripts are run on the target instance. A Post-clone cleanup script can be used to keep discovery from running on a target instance.
To create a Post-clone cleanup script:
var schedules = new GlideRecord('discovery_schedule')
Alternatively, use any of the previously mentioned methods to disable discovery once the cloning is complete.
Other relevant KB and documents: