OBLYTECH Logo
OBLYTECH Logo

Discovery Probes and Sensors: Types, Permissions, Commands

Discovery probes and sensors split one job between two parts. A probe gathers raw information from a device, and a sensor turns that information into records in the configuration management database. Within the wider Discovery guides and services, this page covers which probe suits which device, the permissions Windows probes need, and the SSH and SNMP commands involved.

How probes and sensors hand work to each other

Every probe in Discovery must have a corresponding sensor to process the data it returns. Both take their instructions from the ECC queue, the exchange point between the ServiceNow instance and the MID Server. A worker job on the MID Server watches that queue for outgoing entries in the ready state, runs the probes they call for, and returns the results as incoming entries. The MID Server side of that exchange is covered in MID Server explained.

Inserting an incoming entry fires a business rule, which passes the data to a sensor processor. The processor hands the payload to the sensors interested in it, and those sensors update the CMDB. For when these runs happen, see the guide on how Discovery schedules its runs.

Probes and sensors drive the first two phases of discovery, scanning and classification. The details here reflect the Brazil release.

A probe may carry a post-processing script that runs on the MID Server and reshapes its data first. Without one, the sensor receives the raw collection and does the processing itself. Either way, the sensor writes to the CMDB.

Probe types and the devices they reach

The device family decides the probe approach. The usual pairings are these.

Device family Probe approach
Windows computers and servers Remote WMI queries and shell commands
UNIX and Linux servers Shell commands over SSH version 2, using any Bourne-compatible shell
Storage systems CIM and WBEM queries
Printers, switches, routers and other network gear SNMP queries
Uninterruptible power supplies SNMP queries
Web servers HTTP header examination

Some named probes cover specific jobs. The PowerShell probe runs PowerShell version 2 scripts on the MID Server host. The SSHCommand probe runs a shell command and returns its output. The WMIRunner probe fetches Windows data through WMI and supports IPv6. For a broader view of coverage, see the page on what Discovery can find and what it misses.

The vCenter probes scan virtual machines through VMware’s vSphere suite, each covering a different kind of data. The older single vCenter probe was deprecated in the Istanbul release and replaced by these narrower probes.

A multiprobe bundles simple probes so several queries run after one authentication. It needs a multisensor, which carries one script per contained probe plus a main script.

Reading and writing sensor settings

A sensor record has a short set of core fields. The name must be unique. Reacts to probe selects the probe whose payload the sensor processes. Sensor Class chooses a simple sensor or a multisensor, and the Import Export Map option is not currently used.

The Sensor type field decides how results are processed. The Javascript type handles returned data inside the sensor itself and is the common choice. The XML type breaks data into pieces, some of which can launch other probes. Classifier, Java and Multiline Text are not currently used.

Two related lists shape exploration. Responds to probes, shown on multisensors, lists the simple probes inside a multiprobe. Triggers probes lists the probes a sensor can start for further exploration.

Probe management and upgrades

Discovery seldom needs changes to probes or sensors out of the box. The usual reasons are setting probe parameters, aligning customised versions after an upgrade, or adding a probe the base system lacks. Probes must also be active on classifiers for Discovery to trigger them.

An upgrade updates Discovery’s probes and sensors, but customised ones do not upgrade with the instance. Copy your customisations to a text file, upgrade, and reapply them. Teams wanting a structured review of a customised setup can look at the Discovery health check.

Creating a custom probe follows a clear sequence, and the admin role is required. The worked example reads text files written by a Windows utility called BGInfo. In Discovery Definition, create a probe with a unique name, the type Probe, and Used by Discovery ticked, then set its ECC queue topic to the probe the MID Server runs, WMIRunner in this case. Add the script as a probe parameter. Next, create a sensor with the same name that reacts to the probe, using the JavaScript sensor type. Finally, place the probe in the Windows classifier.

Sensor transaction time limits

The Discovery Sensors Transaction Quota rule cancels any sensor transaction running longer than 20 minutes by default. The ECC queue input moves to the error state, the Completed Count on the discovery status increases, and an error is logged.

To change the limit, an administrator edits the Maximum Duration field, measured in seconds, on the Discovery Sensors rule under System Definition, then Quota Rules. The Transaction Quotas plugin must be active.

Permissions for Windows probes

Many Windows probes need access to Windows classes, properties and registry entries. Security policies vary, so no single role is prescribed. Admin share access is restricted to users with administrative rights on the target, such as members of the local Administrators group, so the account Discovery uses needs those rights for the probes that write to admin$.

Administrative shares matter here. The MID Server script LaunchProc.psm1 starts a process on the target, writes its output to an administrative share, and retrieves it. Access is restricted to users with administrative rights on the target. From the New York release onward, WMI-based Windows probes write to the admin$ folder by default, and the MID Server property mid.powershell.target_base_dir changes that folder. For the wider access model around these probes, see Discovery security and access design.

Discovery area Probes Additional permissions
Active connections Windows – Active Connections Invoke Win32_Process in the root CIMV2 namespace, and read and write access to admin$. Needed for application dependency mapping
Application profiles Get APD environment files, Get APD env file content, Get APD version file content Invoke Win32_Process, read and write access to admin$, and write access to the SystemRoot temp directory
Microsoft SQL Server Windows – MSSQL Access to Win32_Process, Win32_Service, Win32_NetworkAdapterConfiguration and the SQL Server SMO object, plus the ability to run nbtstat and read the instance and TCP port registry keys

The legacy Windows probes are outdated, and patterns are the recommended route for discovery on Windows devices. Windows classes without a stated namespace default to root\cimv2.

Commands run over SSH

UNIX and Linux probes run shell commands over SSH, in two groups depending on whether they need elevated rights.

Non-privileged commands run during horizontal discovery. On Linux they include arp, ifconfig with route, rpm queries, findmnt, ip views, hostname, and reads of release, CPU, memory and mount files. AIX and HP-UX probes add their own short lists, such as oslevel and swlist.

Privileged commands need elevated rights. The examples use a user named Disco, which you should replace with your own account. Sudo commands do not work with private key credentials, because there is no password to supply. The fix is the NOPASSWD option in the sudo configuration for each privileged command.

By purpose, dmidecode supplies hardware details such as the motherboard serial number, fdisk reports disk sizes, and multipath shows device mappings on Linux. UNIX systems use lsof, netstat and ss to link processes with connections. Solaris adds iscsiadm, fcinfo and prtvtoc for storage detail, and ucb ps is deprecated on Solaris 11, so the ucb utility must be installed by hand there.

Host keys deserve attention. The MID Server does not validate them, so it treats each target as untrusted. Keep sensitive exchanges to a minimum, and use keys or certificates rather than system credentials. For how those accounts are governed, see how Discovery credentials are governed.

SNMP probes and their parameters

SNMP probes query a device for a list of OIDs and pass the results to sensors. Discovery supports SNMP versions 1, 2c and 3, and the default setting is ALL. A selected version without active credentials reverts to ALL.

The oid_spec_list parameter takes one specification per line. A walk reads an OID and its children. A table reads each entry and returns just the named children, with optional filters. The source parameter is required and holds the device address. The index parameter appends a value after the community string, which is how Cisco-style VLAN queries are made.

Timing parameters control patience. The timeout defaults to 1500 milliseconds, and established_session_timeout defaults to 500 milliseconds once a response has arrived. The request_interval defaults to 400 milliseconds, and request_delay defaults to zero. Setting request_interval to at least the timeout means each OID is requested once.

The use_getbulk parameter switches tabular queries to GETBULK requests, which suit tables. It defaults to false, though several switch and ARP table probes enable it. When it is on, the request_interval and request_delay settings are ignored, and retries sets the extra attempts.

The result_format parameter returns compact JSON for the F5 BIG-IP System, Netscaler System and Routing probes. Using it on other probes causes the sensor to fail, so leave it alone.

Frequently asked questions

Do I need to change probes to find my devices?

Usually not. Patterns now cover much of the ground. Change a probe when you need data the base system does not collect, and test the change first.

Why might a probe not run even though the device is reachable?

The probe must be active on the classifier that triggers it, and its additional permissions must be in place. For Windows probes, that includes administrative rights on the target for admin$ access.

Can a privileged SSH command run with a private key?

Not as configured by default, because sudo asks for a password and a private key supplies none. Add NOPASSWD in the sudo configuration for each privileged command the probe needs.

How long can a sensor run before Discovery stops it?

The default limit is 20 minutes. The transaction is then cancelled, the queue input moves to error, and the rest of discovery continues. Maximum Duration in the Discovery Sensors quota rule sets the limit in seconds.