StartDiscovery - Global
-
- UpdatedJan 30, 2025
- 2 minutes to read
- Yokohama
- API reference
The StartDiscovery script include provides methods to start discovery jobs.
Use this script include during the discovery scanning phase.
StartDiscovery - addAdditionalIP(String status, String ip, String sensor)
Adds an IP (or comma-separated list of IPs) to an existing discovery (used by networks discovery).
Name | Type | Description |
---|---|---|
status | String | The discovery status |
ip | String | An IP address, or a comma-separated list of IP addresses. |
sensor | String | The discovery sensor |
Type | Description |
---|---|
void |
StartDiscovery - discoverFromSchedule(String ip, Boolean samePhase, String sensor)
Handles discovery of devices (whether basic or advanced) from a schedule.
Name | Type | Description |
---|---|---|
ip | String | An IP address, or a comma-separated list of IP addresses. |
samePhase | Boolean | |
sensor | String | The discovery sensor |
Type | Description |
---|---|
void |
StartDiscovery - getCancelScript()
Returns the cancel script.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The cancel script |
StartDiscovery - scheduleCancelJob()
If the schedule specifies a cancel time, if necessary, schedules a job to cancel the discovery.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
void |
Example
The following example shows how to use the scheduleCancelJob() method to cancel a current discovery job.
Output:
StartDiscovery - startFromIP(DiscoverySchedule schedule, String ip)
Starts a discovery for a single IP using the specified schedule to get information such as MID servers and behaviors.
Name | Type | Description |
---|---|---|
schedule | DiscoverySchedule | DiscoverySchedule instance for the schedule to use. |
ip | String | IP address to discover. Format: dot-formatted string |
Type | Description |
---|---|
String | Sys_id of the status record created. |
Example
This example uses the startFromIP() method to obtain the record that contains the discover information.
Output:
StartDiscovery - startFromSchedule(GlideRecord schedule, GlideRecord job)
Invoked by the discovery script include to kick off a scheduled (or discover now) discovery.
Name | Type | Description |
---|---|---|
schedule | GlideRecord | The instance of discovery_schedule that this discovery is based on. |
job | GlideRecord | The instance of sys_trigger that triggered this discovery. |
Type | Description |
---|---|
void |
On this page
- StartDiscovery - addAdditionalIP(String status, String ip, String sensor)
- StartDiscovery - discoverFromSchedule(String ip, Boolean samePhase, String sensor)
- StartDiscovery - getCancelScript()
- StartDiscovery - scheduleCancelJob()
- StartDiscovery - startFromIP(DiscoverySchedule schedule, String ip)
- StartDiscovery - startFromSchedule(GlideRecord schedule, GlideRecord job)