OBLYTECH Logo
OBLYTECH Logo

Create standard-discovery pattern and schedule

To create a standard-discovery pattern and schedule in ServiceNow, build an Infrastructure pattern with the target CI type, define its input parameters, and test its identification steps. Then create a Serverless Discovery schedule, attach the pattern, supply parameter values, and run it to find application CIs whose host is unknown.

Choose the discovery route before building the pattern

Standard serverless discovery starts from information that can reach a resource, such as an address supplied to an HTTP operation. The schedule launches the pattern directly. This gives you a route to application CIs without first discovering the host and using a classifier to select the pattern.

Start with a short design record: the application CI you need, its intended CI type, the remote resource that exposes its details, and the parameters needed to reach that resource. Treat these as separate decisions. A reachable endpoint proves connectivity; it does not establish that the returned data describes the CI you intended to discover.

Before writing custom steps, review the available on-premise discovery patterns for existing coverage. Serverless discovery is relevant beyond public cloud: the pattern library includes a serverless route for Dell Data Domain systems registered in their management center. For provider-specific resources, check the cloud discovery pattern options before deciding that a custom endpoint pattern is necessary.

Agent Client Collector (ACC) application patterns run only after host discovery has completed, and they cover servers. If the host is still unknown, that prerequisite changes the design decision, so choose the execution route based on what you already know about the target.

Check the fields and pattern availability on your instance and release; the workflow here uses Brazil labels. For creating this standard serverless pattern and its schedule, the required role is cloud_admin, service_mapping_admin, or admin. Arrange basic authentication credentials for the HTTP calls before creating the schedule.

Create the standard-discovery pattern and schedule connection

Build the reusable pattern first, then connect it to a schedule. Keep the names descriptive enough that another administrator can distinguish the discovery logic from the execution records that supply its values.

  1. Go to All > Pattern Designer > Discovery Patterns and select New.
  2. Create an Infrastructure pattern. Select the CI type that represents the configuration items you intend to discover.
  3. Add an identification section, then save the pattern.
  4. Open Input Parameters and select New to define a parameter needed to reach the resource.
  5. Save the pattern, open Basic, and select the identification section name to enter the pattern designer.

For an endpoint-driven pattern, an input parameter named url can carry the resource address. The pattern defines the parameter; the execution configuration supplies its actual value later. This separation lets the same exploration logic serve different endpoints without embedding each endpoint into a separate pattern.

Design the identification steps around what the endpoint returns. For example, Http Get Call can retrieve remote content, with $url entered in its URL field. Plan which returned information you will use to explore the intended CI before adding further steps. The Pattern Designer authoring and validation guide provides the neighboring workflow for managing pattern work.

Debug the endpoint and inspect the returned content

Select Debug Mode and enter values for the pattern inputs. Standard serverless testing does not require a value for Proxy Host. For the HTTP example, enter the endpoint value and select Connect. Run the operation and inspect Output to see the returned content.

Use that first result as a checkpoint. Compare the response with the data your steps expect to explore. The Http Get Call step can be set to parse XML. If your endpoint returns a different format, change its parsing setting so it matches the response you receive. A connection that returns the wrong resource should be corrected before you build more exploration around it.

Keep a test record of the parameter values, operation result, and expected CI information. Record the parameter values, the Output you received and the CI details you expect. A scheduled run can then be compared with the debug run. Avoid treating a populated Output field as sufficient acceptance evidence. Check whether the content contains the identifiers and attributes your pattern needs.

If you change the endpoint value during debugging, carry that change into the execution configuration deliberately. Otherwise, the scheduled run may be testing a different resource from the one you inspected. Resolve an empty or unexpected response at the operation level before expanding the schedule to additional parameter sets.

Configure the Serverless schedule and launcher values

Go to All > Discovery > Schedules and select New. Set Discovery to Serverless. Save through the form header context menu so that the related records can be added. The schedule provides the trigger; the execution record selects the pattern and the launcher parameters provide its inputs.

  1. In Serverless Execution Pattern, select New.
  2. Enter a descriptive Name and select the pattern in Pattern.
  3. Keep Proxy Host blank here, because that field only applies to the proxy-host scenario.
  4. Leave Active ticked so this execution record runs, then save from the form header menu.
  5. In Discovery Pattern Launcher Parameters, add the parameters needed by the pattern and populate Value for each.
  6. Select Submit, then use Discover Now or allow the schedule to trigger.

An empty Proxy Host does not mean the execution record is inactive. Active controls whether the execution definition is used, while Proxy Host identifies a different discovery scenario. An empty value is the right setting for the standard serverless execution described here.

When a parameter represents a credential alias, its Value is the credential alias ID. Review that distinction during configuration: a descriptive credential name and the identifier required by the launcher are different inputs. For the url example, supply the actual endpoint address in Value rather than placing $url there.

A schedule can contain multiple serverless execution pattern records. The same pattern can be selected with different parameters. As an operating convention, use execution names that reveal which endpoint or resource set they represent. That makes it easier to investigate a single failed execution without confusing it with another run of the same pattern.

For help organizing this setup, see ServiceNow implementation.

Validate the scheduled run and investigate command failures

After execution, open Discovery status and examine the Discovery log, the devices list containing discovered CIs, and the ECC queue records. Compare those results with the CI type and resource data you selected during design. Check both the execution trail and the resulting records before accepting the schedule.

On this route the Shazzam probe does not start, and Discovery starts no classification probes, so their absence is not a failure signal. Their absence is therefore expected. Follow the schedule-to-pattern execution path when diagnosing the run. A missing classification event is not, by itself, evidence that this serverless schedule failed.

For command-level investigation, the Command List form identifies the Pattern, Step name, CI Type, Command, and Command Type. These fields let you associate a failed operation with its location in the pattern. The HTTP GET command category supports Basic Authentication credentials, not Token credentials, in this command-validation context.

The Command Validation Tasks form offers three MID Server Selection Method options. Choose one based on how your test network is set up, because two of them depend on MID Server settings.

  • Specific MID Server: pick a named server from the list.
  • Automatic MID Selection: Discovery chooses the server. It needs a MID Server that has IP ranges assigned or is set as the default for Discovery.
  • Try All Eligible MID Servers: the test runs on every eligible server. It has the same requirement, a MID Server with IP ranges assigned or set as the default for Discovery.

To test one failing command, leave Validate All Pattern Commands unticked, then choose that command in the Commands field. The field accepts only commands from the available list. Keep the validation question narrow: does the selected command run with the intended credentials and execution route? Then return to the full schedule to assess CI discovery. A successful command test answers a smaller question than a successful discovery run.

Plan acceptance and the CI lifecycle together

Before recurring execution, agree on evidence for acceptance: the input values used, the expected application CI, the observed Discovery status, and the resulting CMDB records. For multiple executions of one pattern, validate each parameter set rather than assuming that one successful endpoint proves the others.

Also decide how missing CIs will be handled. An Infrastructure pattern does not let you set a deletion strategy on its main CI, so do not promise automatic removal of that CI as part of this schedule. Do not promise automatic removal of that main CI as part of this schedule design. Keep the distinction between the main CI and related CIs visible in the operational handover.

For applicable CI types, pattern deletion strategies compare a run with earlier discovery results. On a first run there is no earlier result, so no deletion strategy takes effect yet. Judge that lifecycle behavior separately from connectivity acceptance, so a successful initial execution is not mistaken for proof of later cleanup behavior.

Keep is the out-of-the-box setting. It leaves the CI record in place and changes nothing else on it. Choose the lifecycle behavior according to the affected CI type and the evidence you need to retain for operations.

Mark as absent can remove network records. It generally sets Status to Absent, but records in cmdb_ci_network_adapter and cmdb_ci_ip_address are deletion exceptions. Review those types before treating absence marking as a way to preserve records.