OBLYTECH Logo
OBLYTECH Logo

Horizontal Discovery MID Server Selection for Service Mapping

Horizontal discovery scans a range of addresses and writes configuration items into the CMDB. For Service Mapping, the MID Server doing that work is chosen by application, IP range, capability and cluster rules. When subnets overlap, that choice can land on the wrong server, so this page covers how each rule applies and how to steer it.

How horizontal discovery moves from a scan to a CMDB update

Horizontal discovery runs in four phases. A Shazzam probe and port probes first scan the targets over protocols such as WMI, HTTP, SSH and SNMP. A classification probe then reads details such as the operating system version, which sets the class of CI that gets created. The identification and exploration phases are where the two approaches differ. For the sensors and probes that do this work, see the discovery probes and sensors guide.

Aspect Probe-based Pattern-based
Phases that use the mechanism Four phases Identification and exploration
Building support for a new CI type Custom probes and sensors, using Java and JavaScript Steps and values in the pattern designer
ECC queue records to troubleshoot One per probe launched One for the pattern
Feature coverage Standard network and CI discovery Standard discovery plus cloud discovery, configuration file tracking and CI deletion strategies

Patterns plug in through the Horizontal Pattern probe. You add it as a trigger probe on the classifier for the CI type, and it launches the pattern you name. Its sensor performs the CMDB writes. A pattern sets which credentials it uses, so when a pattern finds a server but not the application running on it, check the credentials the pattern is set to use.

How a discovery schedule picks its MID Server

A horizontal schedule offers three choices: auto-select, a specific MID Server, or a specific MID Server cluster. Each behaves differently. For the wider concept behind schedules, see the discovery schedule explainer.

Auto-select order

Auto-select works through this sequence and stops at the first step that matches.

  1. Discovery looks for a MID Server with the Discovery application and an IP range covering the target.
  2. Failing that, it looks for a MID Server with the ALL application and a matching IP range.
  3. If several qualify, it takes the first one that is Up, choosing at random when several are Up.
  4. If none is Up, it tries the default MID Server for Discovery if that server is Up. Only when no default is set for Discovery does it try the default for ALL, if that server is Up.
  5. Failing that, it looks again for servers in Paused or Upgrading status. Those servers do not process commands until they return to Up.

Auto-select does not handle IPv6 targets, so schedules with IPv6 addresses need a specific server or cluster.

Clusters and pinned servers

A load-balancing cluster picks a member at random from the best available status tier. A failover cluster picks the Up member with the lowest order value. The default MID Server is ignored for clusters. The MID Server cluster guide compares those designs in more depth.

If the MID Server chosen for a Quick Discovery belongs to a load balanced cluster and becomes unavailable, the instance does not assign another member of that cluster, so you must pick a different server yourself.

Splitting the port scan

The port scan divides target addresses equally among qualifying servers. The Shazzam batch size sets how many addresses each probe covers. For example, 16,000 addresses spread across three servers with a batch size of 5,000 gives two servers one probe each, and the third server two probes covering 6,000 addresses.

Setting up a horizontal discovery schedule

Creating a schedule needs the discovery_admin or admin role. Narrow the targets to the networks that need scanning, and test credentials before the first run, since bad credentials are a common reason discoveries fail.

The Discovery Schedules module offers New for a horizontal schedule, Quick Discovery for one IP address, and a wizard for cloud resources. The schedule form controls how devices are identified (by IP address or other identifiers), whether credentials are tried in device probes, which MID Server handles each discovery type, and how many Shazzam probes run. Global Excludes keeps listed addresses out of schedules, discovery attributes set CI fields such as location, and discovery behaviors add load balancing or several credentials. Hosts for those servers are sized in the MID Server requirements guide.

Quick Discovery for one address

Quick Discovery scans a single address without a schedule, which suits a device that has just joined the network. A single IPv6 address works, but a network such as a /24 is refused. If a MID Server that is Up is assigned to the subnet, the form fills in the MID Server field, and you can overwrite it.

Choosing a MID Server for Service Mapping

Service Mapping matches a server to an endpoint on three criteria: application, capability and IP range. For the broader role of these servers, see the MID Server explainer. Set the application to Service Mapping to reserve a server for it, or to ALL to let any application use it. The IP range confines the server to the addresses it should reach.

Criterion Settings What it controls
Application Service Mapping, or ALL Which requests the server accepts
Capability ALL, or a mix of SSH, WMI, SNMP and Cloud Provisioning and Governance Which protocols the server can use
IP range A subnet or address range Which endpoints the server reaches
Default MID Server One per application The fallback when nothing matches

Service Mapping picks the server whose criteria best match the request. If none match, it uses the default MID Server. If no MID Server matches the request and there is no default, the discovery cannot start, so define a default.

Deployments upgraded to Istanbul or earlier use the legacy algorithm

An instance can use either the new or the legacy selection algorithm. To switch to the new algorithm, clear the Enable Legacy MID selection algorithm check box under Service Mapping > Administration > Properties. The legacy algorithm picks servers whose application is ServiceMapping or ALL, matches the IP range, and then falls back to the default. With no default and no ranges configured, it picks a random server. Earlier releases dedicated servers through the capability parameter, and the upgrade moved those servers to the Service Mapping application setting. The newer algorithm adds capability as a criterion.

Steering Service Mapping with horizontal discovery subnets

Overlapping subnets and reused IP addresses are a common trap. A server matched by IP range may be the wrong one, and the resulting map is incomplete or inaccurate. Two properties let Service Mapping reuse what horizontal discovery already learned.

  • sm.topdown.reuse_mid_from_hd_schedule. Top-down discovery reuses the subnet MID Server that a horizontal schedule used for that range. This takes less time and misidentifies less often. It needs an executed horizontal schedule that targets the range.
  • sm.network_location.detect_host_by_location. A Network Location field appears on the entry point form, so top-down discovery identifies the server and host from the location set on the horizontal schedule.

Full functionality needs CMDB CI Class Models 1.50.0 or later. The property sa.mapping.legacy_mid_selection must be false. If it is true, the legacy algorithm runs and both affinity properties have no effect.

Reading logs and tuning large payloads

Probe-based runs write one Discovery Log entry per action, covering classification failures, CMDB updates and authentication failures. Pattern-based runs write one horizontal discovery log for the whole run. Open a discovery status record from Discovery > Status and read its Discovery Log list. An entry whose ECC queue input shows HorizontalDiscoveryProbe opens the pattern log, and the Debug button on an Identification Section steps through it.

Pattern errors usually fall into a few groups: authentication, authorization or permission problems, missing valid credentials, an IP address the MID Server cannot reach, or a command with wrong syntax. If the server itself is the problem, the MID Server troubleshooting guide covers servers that are down or not visible.

Probe-based logs are retained for 30 days by default. The age is set in seconds on the sys_auto_flush record for discovery_status.

Payload splitting

Load balancers and switches can return very large payloads. The Horizontal Pattern probe splits them into chunks, checking total size first and then related item counts. A switch with 50,000 related items and a chunk size of 100 becomes 500 ECC queue pages, each holding a copy of the parent CI.

Property Default Effect
mid.discovery.max_total_items_size_per_page 3,145,728 bytes (3 MB) Caps total item size per page; checked first
mid.discovery.max_ci_count_per_page 500 Caps CIs per page
mid.discovery.max_relation_count_per_page 10,000 Caps relations per page
mid.discovery.max_related_count_per_page 100 Caps related items per chunk
mid.discovery.should_minify_pattern_payload false Trims JSON whitespace when true

Pattern Orchestrator is the other tool for large data, passing batches from a parent pattern to a child pattern.

Frequently asked questions

Which MID Server does auto-select use?

It first picks a server with the Discovery or ALL application whose IP range covers the target. The first Up server wins, chosen at random if several are Up. If none is Up, it falls back to the default server, and then to Paused or Upgrading servers.

Why does Service Mapping pick the wrong MID Server on overlapping subnets?

Overlapping ranges make several servers candidates. Enable the MID affinity property so the server from an executed horizontal schedule covering that range is reused, and confirm the legacy selection property is false.

Can I run discovery on one address without a schedule?

Yes. Quick Discovery targets one IP address with no schedule, and a script can start it too.

Does auto-select work with IPv6 targets?

No. Discovery auto-select does not support IPv6, so schedules with IPv6 addresses need a specific MID Server or a cluster.