CIS-DF Hub Part 3: Discovery Discovery Architecture
⬡ Part 3 · Topic 1

Discovery Architecture — How ServiceNow Finds What's on Your Network

ServiceNow Discovery is the technology that actively scans your network to find computers, servers, network devices, storage, and the software running on them — then automatically creates or updates CI records in the CMDB. This topic covers the two types of Discovery, the complete scan lifecycle, and the architectural components that make it work.

📋 9 sections ~32 min read 🎯 ~19% exam weight (INGEST domain) 🏷 Discovery · Horizontal · Vertical · Schedule · Phase

What Is ServiceNow Discovery?

In Part 2 you learned that Service Graph Connectors pull data from external APIs — they ask a cloud provider or monitoring tool "what do you know about your assets?" Discovery is different: it goes out and asks the assets themselves. It scans IP addresses directly, connects to each device or server, and reads its configuration.

Think of the difference this way:

  • SGC: Asks the hotel's front desk for a guest list
  • Discovery: Knocks on every door and asks who's there directly

Discovery can find things that APIs don't expose: the exact version of software running on a server, the precise CPU model, all installed services, running processes, open ports, configuration file contents. This depth of data is why Discovery remains essential even when SGCs are in use.

💡
Key Concept — Discovery Complements SGC, Doesn't Replace It Many organizations use both. SGC for AWS tells you which EC2 instances exist and their AWS-level properties (instance type, AMI, tags). Discovery then scans those same EC2 instances via their IP addresses to find OS-level details (exact kernel version, installed packages, running services). IRE (Identity & Reconciliation Engine — covered fully in Part 4) reconciles both data streams onto the same CI record, preventing duplicates and resolving field-level conflicts between sources.

ServiceNow Discovery has been part of the platform since the Eureka release (2013) and has gone through major evolution. The modern Discovery platform (Washington DC and later) uses a pattern-based approach that is more robust than the older probe/sensor approach. Both exist today; the exam covers both.

Horizontal vs. Vertical Discovery — The Two Phases

Every Discovery run executes in two phases, which ServiceNow calls Horizontal Discovery and Vertical Discovery. Understanding the difference is critical — it's one of the most commonly tested Discovery concepts.

Horizontal Discovery — Finding What Exists

Horizontal Discovery sweeps across a range of IP addresses to answer one question: "What is at this IP address, and is it alive?"

It's called "horizontal" because it scans broadly across many IPs — a wide sweep across your network. Horizontal Discovery uses two mechanisms:

  • Port scanning: Sends TCP connection attempts to common ports (22 for SSH, 135/445 for Windows, 161 for SNMP, 443 for HTTPS). An open port means something is listening.
  • ICMP ping: Sends a ping to check if the IP is reachable. Note: many firewalls block ICMP, so Discovery doesn't rely on ping alone.

The output of Horizontal Discovery is a list of discovered devices with their IPs and open ports. At this stage, Discovery doesn't know much about them — just that they exist and are reachable.

🔍
Analogy — Horizontal vs. Vertical Discovery Imagine you're a census worker in an apartment building. Horizontal Discovery is walking down the hallway and knocking on every door to see which apartments are occupied (you note: "apartment 4B has someone home, 4C does not"). Vertical Discovery is then going inside each occupied apartment and doing a full inventory: names, ages, employment, all the details. Two phases — breadth first, then depth.

Vertical Discovery — Classifying and Detailing What Was Found

Vertical Discovery goes deep into each device found by Horizontal. It answers: "What exactly is this device? What is it running? What are all its properties?"

It's called "vertical" because it digs down into each individual device. Vertical Discovery uses the open ports found by Horizontal to choose the right protocol to connect with:

  • Port 22 open → try SSH → if successful, run shell commands to get OS, CPU, memory, disk, installed software
  • Port 135/445 open → try WMI (Windows Management Instrumentation) → get Windows-specific inventory
  • Port 161 open → try SNMP → get network device details (MIBs for switches, routers)
  • Port 443/80 open → try HTTPS/HTTP → identify web servers, application servers

The output of Vertical Discovery is a rich CI record with populated fields: OS name and version, CPU count and model, memory, storage, running services, installed software, network interfaces, and more.

Dimension Horizontal Discovery Vertical Discovery
Question answered "What IP addresses are alive?" "What exactly is at each IP?"
Breadth vs. depth Wide sweep — many IPs, shallow info Narrow focus — one device, deep info
Protocols used ICMP ping, TCP port scan SSH, WMI, SNMP, HTTPS, JDBC, and more
Output List of live IPs with open ports Full CI attributes, relationships, installed software
Credentials needed None (ping and port scan are unauthenticated) Yes — SSH credentials, WMI credentials, SNMP community strings
Runs before or after First (Phase 1) Second (Phase 2)
Exam Trap — Horizontal Finds the IP, Vertical Gets the Details If horizontal Discovery finds a device but vertical Discovery fails, you get a CI with an IP address but no details (no OS, no software). This is called a partial discovery. Common causes: firewall blocks the deep-scan port, credentials are wrong, or the device type isn't supported. The exam tests "why would Discovery find a CI but not populate its details?"

Discovery Schedules — Controlling When and Where Discovery Runs

Discovery doesn't run randomly — it's controlled by Discovery Schedules. A schedule defines:

  • What to scan: IP ranges, specific IP addresses, or networks
  • When to scan: Cron-based schedule (daily at 2 AM, every 4 hours, weekly)
  • Which MID Server to use: Based on IP range assignment
  • Behaviors: Whether to run full scan or targeted behaviors

Schedule Types

  • IP Range Schedule: Scans all IPs in a specified CIDR range (e.g., 10.0.0.0/24). Most common type. Can specify multiple ranges.
  • Single Device Schedule: Scans a specific IP or hostname. Used for targeted rescans after configuration changes.
  • CMDB CI Schedule: Re-scans CIs that already exist in the CMDB. Useful for verifying that known CIs haven't changed.

Discovery Schedule Configuration Fields

Field Purpose Example
Name Human-readable label for the schedule "Datacenter East — Nightly Full Scan"
Discover What to scan (IP ranges, specific IPs) 10.10.0.0/16
Run Frequency (Daily, Weekly, Periodically) Daily at 02:00
MID Server Which MID Server(s) handle this range MID-US-East-01
Behaviors Which discovery behaviors to apply (controls depth) All Devices
Status Active/Inactive Active
💡
Tip — Schedule During Off-Peak Hours Discovery generates significant network traffic during horizontal scanning (sending packets to every IP in the range). Schedule Discovery for off-peak hours (nights, weekends) to avoid impacting business traffic. For sensitive environments, limit the scan rate in the Discovery behavior settings.

The Complete Discovery Run Lifecycle

When a Discovery Schedule fires, it goes through a precise sequence of phases. Understanding this lifecycle helps you diagnose what went wrong when Discovery produces incomplete results.

1
Phase 1 — Initiation
Schedule Fires & Run Begins
A Discovery Schedule triggers (time-based or on-demand). ServiceNow immediately creates a Discovery Status record in the instance — this is your single diagnostic view for the entire run.
Step 1: Schedule fires Step 2: Discovery Status record created
2
Phase 2 — Horizontal Discovery
Network Scan — Find Live IPs
The target IP ranges are split into parallel chunks and dispatched to one or more MID Servers via the ECC Queue. Each MID Server pings its assigned IPs and runs port scans to identify which hosts are alive and what services they expose. This is called horizontal because it scans broadly across the network.
Step 3: IP ranges chunked Step 4: Chunks → MID via ECC Queue Step 5: MID pings + port scans Step 6: Live IPs identified
3
Phase 3 — Vertical Discovery
Deep Device Probing
For each live IP, the MID Server matches credentials from the Credential Store, then runs Probes (legacy) or Patterns (Discovery 2.0) directly on the device. Probes/Patterns collect detailed OS, hardware, installed software, and relationship data. Raw output is returned to the ServiceNow instance over the ECC Queue.
Step 7: Credentials matched Step 8: Probes / Patterns execute on device Step 9: Raw data returned to ServiceNow
4
Phase 4 — Processing & CMDB Write
Sensors → IRE → CMDB → Complete
Sensors (JavaScript on the instance) parse the raw probe/pattern output into structured CI payloads. Each payload is sent to IRE, which identifies existing CIs, reconciles field values by source authority, and detects duplicates. The final CI record is created or updated in the CMDB, and the Discovery Status record is stamped Complete.
Step 10: Sensors parse → CI payload Step 11: CI payload → IRE Step 12: IRE Identify + Reconcile + Dedup Step 13: CMDB record created / updated Step 14: Discovery Status → Complete

Discovery Status — Monitoring a Run

Every Discovery run creates a Discovery Status record visible at Discovery → Discovery Status. This record shows:

  • Number of IPs scanned
  • Number of CIs created / updated / skipped
  • Number of errors per phase
  • Which MID Servers participated
  • Timeline: when each phase started and completed

The Discovery Status is your primary diagnostic tool. When Discovery doesn't create a CI you expected, check the Discovery Status record for that IP.

Exam Pattern — Discovery Troubleshooting Steps When a device isn't discovered: 1. Check Discovery Status → is the IP in scope? 2. Is the IP reachable? (Did horizontal succeed?) 3. Did vertical probe execute? (Is the probe log present?) 4. Do credentials exist for this device type? 5. Is there an Identification Rule for the CI class? The exam presents these as elimination questions.

Discovery Behaviors — Controlling What Gets Scanned

A Discovery Behavior is a named configuration that controls which probes and patterns run during Discovery. Think of it as a "scan profile" that you attach to a schedule.

Default behaviors shipped by ServiceNow include:

  • All Active Servers: Discovers servers via SSH and WMI; collects full OS inventory
  • Network Devices: Focuses on SNMP-based discovery of switches and routers
  • Cloud Compute: Optimized for cloud instances; uses cloud APIs plus agent
  • Agentless: Credential-based scan without installing anything on the target

What a Behavior Controls

Behavior Setting Effect
Probes / Patterns included Which data collection modules run on matching devices
Port scan list Which ports to check during horizontal discovery
CI classes to create Which CMDB tables this behavior populates
Relationship discovery Whether to follow relationships (e.g., find software running on found servers)
Excluded IP ranges IPs to skip even if they're in the schedule's range
💡
Key Concept — Behaviors Control Scope, Credentials Enable Access Behaviors tell Discovery what to try. Credentials tell Discovery how to authenticate when it tries. A behavior can include the SSH probe, but if no SSH credentials are stored for that target's IP range, the probe will fail authentication and return nothing useful. Both must be configured correctly.

Discovery Inclusions, Exclusions, and CI Identification

Including and Excluding Specific IPs or Ranges

Within a Discovery Schedule, you can add:

  • Include ranges: Specific CIDR blocks or IP ranges to scan (e.g., 10.0.1.0/24 and 10.0.2.0/24)
  • Exclude ranges: Specific IPs or ranges to always skip, even if they fall within an included range (e.g., 10.0.1.50 is a fragile legacy system — never scan it)
  • IP classification rules: Mark certain IP ranges as "printers only" or "network devices only" to limit which probes run

How Discovery Identifies CI Types

During Vertical Discovery, after connecting to a device, Discovery must decide: "Is this a Windows server? A Linux server? A Cisco router?" This classification is done through CI Type Identification, which checks:

  1. What ports are open?
  2. What protocol responded (SSH replied with Linux banner vs. WMI replied with Windows data)?
  3. What did the initial fingerprint probe return?

Based on this, Discovery selects the appropriate probes (or patterns) to run in depth.

The Classification Hierarchy

CI type classification follows the CMDB class hierarchy (fully covered in Part 5):

  • Linux server with Apache → cmdb_ci_linux_server + cmdb_ci_appl_apache
  • Windows server → cmdb_ci_win_server
  • Cisco switch → cmdb_ci_network_adapter → parent class chain to switch-specific table
Warning — Wrong CI Class Means Wrong Fields If Discovery classifies a Linux server as a generic cmdb_ci_computer instead of cmdb_ci_linux_server, Linux-specific fields (kernel version, distribution) won't be available. This usually happens when the SSH credentials fail and Discovery can't get enough data to make the correct classification. Always verify CI class assignment after a Discovery run.

Discovery vs. Service Graph Connectors — When to Use Which

Dimension ServiceNow Discovery Service Graph Connector
How it works Actively scans IPs, connects to devices directly Polls an external API (cloud, ITSM, monitoring tool)
Best for On-premise servers, network devices, any IP-addressable device Cloud resources (AWS, Azure, GCP), SaaS tools, monitoring platforms
Data depth Very deep — OS-level data, processes, files, registry, software API-defined — whatever the provider exposes
Credentials needed SSH, WMI, SNMP, JDBC per device type API key / OAuth for the source system
Requires MID Server? Yes — always for on-premise Only for on-premise sources
Goes through IRE? Yes — Discovery data is processed by IRE Yes — always
Finds relationships? Yes — can trace running processes, connections, dependencies Limited — depends on what the API exposes
Impact on target Generates network traffic; can stress fragile devices API call only; no direct connection to the device
💡
Tip — Use Both Together for Complete Coverage Best practice is to use SGC for cloud resources (AWS EC2 inventory via SGC) and Discovery for deep OS-level data (then scan those same EC2 instances via SSH to get kernel version, installed packages). IRE reconciles both data streams onto the same CI record — the AWS-created CI gets enriched with Discovery data.

Discovery Troubleshooting — Common Failure Patterns

Scenario 1: IP Is in Scope but No CI Created

Discovery Status shows the IP was scanned but no CI was created.

  • Check if horizontal succeeded: is the device pingable / are ports open?
  • If ports are open: check if credentials are configured for that IP range
  • If credentials exist: check if an Identification Rule exists for the expected CI class
  • Check MID Server logs for connection errors

Scenario 2: CI Created but Missing Fields

A CI exists for the server but CPU, memory, and software are blank.

  • Horizontal succeeded but vertical probe may have partially failed
  • Most likely: wrong credentials (SSH key format issue, expired password)
  • Or: firewall allowed port 22 connection but blocked specific commands
  • Check the probe log in the Discovery Status for the specific error message

Scenario 3: Duplicate CIs Created

Discovery creates a second CI for the same physical device.

  • IRE Identification Rules may be missing or misconfigured for that CI class
  • The device may have multiple IPs, and Discovery found it on two different IPs without correlating them
  • A device was renamed — old CI still exists; Discovery created a new one with the new name
  • Resolution: use IRE Deduplication features (Part 4)

Scenario 4: Discovery Runs Slowly

  • Too many IPs in one schedule chunk — split into multiple smaller schedules
  • Too few MID Servers — add more to distribute load
  • Network is slow — Discovery is I/O bound when connecting to many devices
  • Vertical Discovery timing out — some devices respond slowly to probes; increase timeout values
Exam Pattern — Discovery Partial vs. Full Failure Know the difference: if no CIs are created for a range, suspect the MID Server (is it up? is it validated? does it own this IP range?). If some CIs are created but missing detail, suspect credentials (wrong username/password for vertical probes). If duplicates appear, suspect Identification Rules.

Discovery Architecture — Key Facts

  • Horizontal Discovery: Phase 1. Scans IP ranges for live devices (ping + port scan). Unauthenticated. Wide sweep.
  • Vertical Discovery: Phase 2. Deep dives into each live device using SSH, WMI, SNMP. Needs credentials. Generates full CI attributes.
  • Partial discovery: Horizontal succeeded (IP is found) but vertical failed (no detailed attributes). Usually a credentials or firewall issue.
  • Discovery Schedule: Defines what to scan (IP ranges), when, and which MID Server. Attached Behavior controls depth.
  • Discovery Behavior: Named profile controlling which probes/patterns run and which CI classes to create.
  • Discovery Status: Per-run record showing IPs scanned, CIs created, errors. Primary diagnostic tool.
  • Discovery always goes through IRE. Same as SGC. Deduplication and reconciliation apply.
  • MID Server always required for on-premise Discovery. It executes the probes from inside the network.
  • Duplicate CIs → check Identification Rules. Missing details → check credentials. No CIs at all → check MID Server.

Term Grid

Horizontal Discovery
Phase 1 of Discovery. Scans IP ranges with ping and port scans to find live devices. No credentials needed. Breadth-first.
Vertical Discovery
Phase 2 of Discovery. Deep-scans each live device using SSH/WMI/SNMP with stored credentials. Produces full CI attributes.
Discovery Schedule
Configuration defining which IP ranges to scan, when to run, which MID Server to use, and which Discovery Behavior to apply.
Discovery Behavior
Named scan profile controlling which probes and patterns run, which ports to check, and which CI classes to create.
Discovery Status
Per-run record showing timeline, IPs scanned, CIs created/updated, and all errors. Primary diagnostic tool for failed Discovery.
Partial Discovery
A CI is created with IP address but no detailed attributes because horizontal succeeded but vertical failed (credentials/firewall issue).

Practice Questions

Click any question to reveal the answer and explanation.

1. Discovery runs against a 10.0.0.0/24 IP range. Several CIs are created with IP addresses but without any OS details (CPU, memory, installed software are all blank). What is the most likely cause?
A) The Discovery Schedule is set to run only horizontal discovery
B) Credentials for SSH or WMI are missing or incorrect for those devices
C) IRE Identification Rules are not configured
D) The MID Server is offline
💡 CIs were created (horizontal worked), but details are missing (vertical failed). What does vertical need that horizontal doesn't?
Answer: B — CIs were created, so horizontal discovery succeeded (devices are reachable). Missing OS details means vertical discovery's deep probes failed. Vertical discovery requires credentials (SSH for Linux, WMI for Windows). Missing or wrong credentials is the most common cause of partially populated CIs. If MID Server were offline (D), no CIs would be created at all.
2. What is the primary difference between Horizontal and Vertical Discovery?
A) Horizontal scans on-premise devices; vertical scans cloud devices
B) Horizontal finds which IPs are alive; vertical classifies and details each found device
C) Horizontal requires credentials; vertical does not
D) Horizontal uses patterns; vertical uses probes
💡 Think breadth vs. depth.
Answer: B — Horizontal Discovery is Phase 1: it sweeps IP ranges with ping and port scans to find live devices (no credentials). Vertical Discovery is Phase 2: it connects to each live device using SSH/WMI/SNMP with credentials to collect detailed CI attributes. The terms describe breadth vs. depth, not location or technique type.
3. A Discovery run completes but no CIs are created for an entire IP range. The MID Server log shows connection refused errors to the ServiceNow instance. What is the most likely cause?
A) The IP range has no live devices
B) The Discovery Behavior is misconfigured
C) The MID Server cannot communicate with the ServiceNow instance (ECC Queue unreachable)
D) Identification Rules are missing
💡 "Connection refused to ServiceNow instance" is a specific MID Server communication failure.
Answer: C — The MID Server communicates with ServiceNow via the ECC Queue over outbound HTTPS (port 443). If the MID Server gets "connection refused" when trying to reach ServiceNow, no work can be sent or results received. This could be caused by a network outage, proxy misconfiguration, or the ServiceNow instance being unavailable. Nothing will be discovered until this channel is restored.
4. Where would you look first to determine whether a specific IP address was scanned during the last Discovery run and whether any errors occurred?
A) CMDB Identification and Reconciliation log
B) MID Server error log on the MID Server host
C) Discovery Status record in ServiceNow
D) Import Set row status in sys_import_set
💡 What record does ServiceNow create for every Discovery run?
Answer: C — The Discovery Status record is created for every Discovery run and shows exactly which IPs were scanned, which CIs were created or updated, and what errors occurred per IP. It's the primary diagnostic tool. The CMDB IRE log (A) shows IRE processing errors after data was collected. Import Set (D) is not used by Discovery at all.
5. A Discovery Schedule is configured with the "All Active Servers" behavior. An administrator wants to exclude a fragile legacy server at 10.0.1.45 from being scanned. What is the correct approach?
A) Remove 10.0.1.45 from the CMDB before running Discovery
B) Add 10.0.1.45 to the Exclusion list in the Discovery Schedule
C) Create a separate Discovery Schedule that only runs on 10.0.1.45 with an inactive status
D) Discovery cannot exclude individual IPs from within a range
💡 Discovery Schedules support both inclusion and exclusion lists.
Answer: B — Discovery Schedules have an explicit Exclusion list where you can add specific IP addresses or ranges that should never be scanned, even if they fall within the schedule's IP range. This is the correct, built-in mechanism. Removing a CI from the CMDB (A) doesn't prevent Discovery from scanning the IP — it would just create a new CI.
6. Discovery creates duplicate CIs for the same physical server — one with hostname "server01.corp.com" and one with hostname "server01". Both have the same IP address. What is the root cause?
A) The MID Server ran the Discovery job twice simultaneously
B) IRE Identification Rules for the server CI class are missing or not matching on hostname correctly
C) The Discovery Behavior is configured to always create new CIs
D) The server has two network interfaces with different IPs
💡 Duplicates despite same IP indicate IRE couldn't match the existing CI to the incoming data.
Answer: B — Duplicate CIs are an IRE Identification failure. IRE should match the incoming CI to the existing one using Identification Rules (e.g., match on IP address or serial number). If the rule matches on hostname and the hostname format changed (FQDN vs. short name), IRE sees two different CIs. The fix is to configure Identification Rules to use a more stable identifier, or add hostname normalization.

Practice Questions

4 questions · Select an answer to see the explanation immediately.

Discovery Architecture Quiz 1 / 4

A Discovery run shows a device with an IP found but no detailed CI attributes were collected. What is this Discovery result state called?

💡 Explanation

C is correct. "Partial Discovery" is the specific term for when horizontal discovery succeeded (the IP is found and the device is reachable) but vertical discovery failed (credentials or firewall blocked deep attribute collection). A and D are informal terms not used in ServiceNow. B is descriptive but not the official term. The root cause of partial discovery is almost always a credentials or firewall issue.

What is the difference between a Discovery Schedule and a Discovery Behavior?

💡 Explanation

B is correct. A Discovery Schedule defines the IP ranges to scan, the timing, and which MID Server to use. A Discovery Behavior is a named profile attached to the Schedule that controls depth — which probes and patterns run, which CI classes to create, and how deep to go. A is incorrect — they are separate configurations. C and D swap or misrepresent the roles.

Discovery is creating duplicate CI records for the same server. What is the first diagnostic step?

💡 Explanation

B is correct. Duplicate CIs are a symptom of IRE Identification Rules failing to match incoming data to existing records. The rule may be missing, using a bad identifier (like a changing IP), or the incoming payload may lack the expected attributes. MID Server logs (A) help with connectivity issues, not duplicates. Discovery Behavior (C) controls what is scanned, not how CIs are identified. Worker threads (D) are a performance setting.

Which phase of Discovery requires credentials to the target device?

💡 Explanation

C is correct. Horizontal Discovery uses ping and port scans — unauthenticated probes that only determine if a device is alive and listening. Vertical Discovery uses SSH, WMI, SNMP, and other protocols to deep-dive into device internals, and these all require valid credentials. This is why partial Discovery (horizontal success + vertical failure) almost always indicates a credential problem.

← Non-Discoverable CIs MID Server Deep Dive →