A MID Server profile holds settings for a group of MID Servers, and the instance pushes them out without anyone editing files on the host. Capabilities tell the instance which MID Server can reach which devices in an address range. Resource reservation holds back probes until the host has room to run them.
How the instance chooses a MID Server
The selector applies filters in a fixed order: server status, then applications, then IP range, then capabilities. An IP range limits the subnets a server may work within. Capabilities come last, and the three matching passes below decide which server is finally chosen. For how Discovery assigns work to servers, see Discovery behaviors and MID Server assignment.
The capability step tries up to three passes and stops at the first one that finds a server. The exact pass compares names and values, treats a blank value as a valid match, and ignores wildcard values held on a server. The wildcard pass lets a non-blank request match a server holding the asterisk value. The final pass looks for the special capability name ALL, which matches any server holding that name regardless of its value.
If the requested capability name is not in the capability table, the platform throws BadArgumentException rather than falling back to the ALL pass. For how selection shapes group membership, see MID Server clusters.
Building capabilities that match your network
Capabilities live under All > MID Server > Capabilities and need the admin or sm_admin role. Select New, enter a name and a value, and submit. A custom capability might be named DOMAIN with the value service-now. Then open the MID Servers related list, choose Edit, and move the servers you want from the Available list. The capability also appears on each server’s primary record.
Discovery ships with default capabilities for protocols and cloud providers, including SSH, WMI, PowerShell, SNMP, REST, VMware, AWS, Azure and Google. The value you enter against a server decides how far its matches reach.
| Value entered | How the server matches requests |
|---|---|
| Blank | Finds any device that uses the capability’s protocol |
| A single value | Finds devices whose match on that protocol equals the value exactly |
| An asterisk | Matches any non-blank request value |
| Resolve DNS domain suffix | Resolves names that end with the suffix you enter |
The Resolve DNS value is prefixed with a dot during processing, so it has to include the end of the domain string. A blank value matches all domains, which rarely suits a production network.
The Nmap capability is assigned automatically once Nmap is installed for credential-less Discovery, and it cannot be added or removed by hand. Orchestration needs at least one capability on each MID Server it uses, and each IP range needs enough capable servers for the activities on that segment.
Managing a fleet with MID Server profiles
A profile is a named set of wrapper parameters and instance settings. The instance pushes those settings to each associated server without direct access to the host. After you edit a profile, run Sync to MID Servers to apply the change across the group. For the basics of the host itself, see ServiceNow MID Server explained. Profiles began in the San Diego release for containerized deployments and, from the Zurich release, apply to all MID Server deployment types. The steps below reflect the Brazil release.
Create a profile under All > MID Server > Profiles and Deployments > MID Server Profiles, which needs the agent_admin role. On the MID Profile Wrapper Configs tab, add wrapper.java.maxmemory with the value 4096 to set the JVM maximum to 4096 MB. To confirm it applied, check the -Xmx value in the wrapper log on the host.
Assign a profile from its MID Servers tab, or set the Profile ID on a server record. The second route shows a message that the profile is not yet synced to the new server.
Syncing needs the agent_admin role and a host with at least 2 GB of memory beyond the configured JVM maximum. From the profile’s Related Links, choose Sync to MID Servers and pick a sync strategy. Ticking the wrapper-override box includes those settings, and the change then needs a restart. The automatic restart option restarts the server after the sync. Then Compare with MID Servers lists any mismatches.
When you audit profiles, it helps to know where the data is stored. The main tables are mid_server_profile (the record), mid_profile_config (instance parameters), mid_profile_wrapper_config (wrapper parameters), mid_profile_property (MID Server properties), and four assignment tables: mid_profile_application_m2m, mid_profile_capability_m2m, mid_profile_ip_range_m2m and mid_profile_cluster_m2m.
Syncing a JAR file to MID Servers
When a custom probe needs a Java library, the JAR can be managed from the instance instead of being copied to each host. Under All > MID Server > JAR Files, enter a name, version, source and description, then attach the file with the paperclip icon. Attaching the file restarts the connected MID Servers so they pick it up, so plan for a fleet-wide restart. The JAR table is domain separated, so you can create a version that servers in one domain can use. For the setup, see domain separation explained.
Containerized MID Server deployment
Containerized MID Servers run from a Docker image built from recipes downloaded from the MID Server download page. The recipes are zipped and signed, and they build images for the current release. AlmaLinux is supported. NMAP and CyberArk discovery is not supported in containers, and Orchestration and Integration Hub are not certified for them.
Auto-configuration follows four steps:
- Create a MID Server profile holding the settings for the new servers, leaving out passwords and certificates.
- Create a deployment request naming the image path and tag, the Kubernetes namespace and service account, the Secret names, and optionally the new server names.
- Export the request to a YAML file and attach it to the record.
- Apply the file to the cluster with kubectl.
When a new container first connects, the platform creates its MID Server record and fills in the container ID, profile ID and deployment name. Setting the profile ID fires the Auto-configure MID from profile business rule. Secrets stay in Kubernetes, and the request holds just their names and in-container paths.
A heartbeat check runs every five minutes, and 30 minutes without a heartbeat counts as a failure. After three consecutive failures the container shows as unhealthy. To see the detailed health output, run the docker inspect command against the container. A daily job, Purge Orphaned Containerized MID Servers, removes containers that have been down longer than max_retention_days, which defaults to 30 days. It raises a warning during the warn_days window, which defaults to 7 days. Auto-upgrade is on by default through mid.container.autoupgrade.enabled, a read-only parameter. The platform recommends disabling it, so new images go through the YAML file instead.
One cluster caveat applies. Applying cluster settings from a profile to a server with no capability assigned fails, because a business rule on the cluster membership table enforces the check.
Limiting load with resource reservation
Resource reservation holds a task until the resources it needs are free. For Discovery, the tasks are probes and patterns, and each declares needs such as CPU or memory. The feature is aimed at advanced users. Confirm that probes are actually competing for a shared host or session pool before configuring it. For the probe types that these resources gate, see Discovery probes and sensors.
- Set the MID Server property mid.probe.wait.resources to true, then restart the server.
- Create a resource under Discovery Definition > Limited Resources. A simple value resource uses a fixed count, an expanding resource calculates its count from a property, and a scripted resource evaluates a script.
- Choose the probes that use it on the Topic, Probes or Patterns tab. Each list can be inverted.
- Set availability under Discovery Definition > Limited Resources > MID Resources, choosing a server or leaving the field empty for all servers.
- Set the order. Less valuable resources get a lower order, because they are held until higher-order resources can be obtained.
Anything in braces is replaced by the probe parameter with that name, so ssh{source} creates a separate SSH resource for each host being probed. Order matters within a host. A per-host PowerShell{host} resource should have a lower order than a broad PowerShell limit, so it is gathered first and touches just the probes aimed at that host. After a discovery run, Get resource state on the MID Server page shows current allocations. The ECC input payload carries a resource_wait value in milliseconds when a probe had to wait.
Common mistakes and their fixes
For more setup errors, see common ServiceNow MID Server mistakes and how to avoid them.
| Symptom | Likely cause | What to check |
|---|---|---|
| Cluster assignment fails when a profile is applied | The server has no capability assigned | Add a capability, then sync again |
| Profile is assigned but settings are missing | The profile has not been synced | Run Sync to MID Servers, then Compare with MID Servers |
| A wrapper change has no effect | The server was not restarted | Enable the restart option or restart the server |
| Probes wait for no obvious reason | A shared resource is reserved | Review Get resource state and resource_wait |
Frequently asked questions
Why does a containerized MID Server show as unhealthy?
Three consecutive heartbeat checks have failed, each after a 30-minute gap with no heartbeat. Running the Docker inspect command against the container shows the detailed health output.
Why is auto-upgrade recommended off for containerized MID Servers?
Auto-upgrade is on by default through mid.container.autoupgrade.enabled, a read-only parameter. The platform recommends disabling it, so new images go through the YAML file instead.
Why does applying a profile fail on one cluster member?
Applying cluster settings from a profile to a server with no capability assigned fails, because a business rule on the cluster membership table enforces the check. Add a capability first, then sync again.
When should resource reservation be turned on?
When a specific contention problem has been identified, such as probes competing for a shared host or session pool. It is an advanced option, not a default for new deployments.