---
sourceDocument: Yokohama IT Operations Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/it-operations-management

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama IT Operations Management

ft:clusterId :

    - itom

bundleId :

    - itom

workflow :

    - Technology


---

# Validate commands used in pattern-based discovery

# Validate commands used in pattern-based discovery {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

Validate pattern commands to verify that the MID Server can successfully run them. Typically, commands might fail if you haven't configured the credentials necessary to run these commands on your ServiceNow instance. Another common reason of command failure is that the IP addresses used for discovery aren't reachable.

## Before you begin

* Verify that you have the following applications:
  * Pattern Designer Enhancements (sn_itom_pde)
  * Discovery and Service Mapping Patterns (sn_itom_pattern)
  {#validate-discovery-commands__ul_wnv_pjs_n2c}
* Check the log for horizontal discovery based on patterns, as described in [Review the logs for horizontal discovery](https://servicenow-prod.fluidtopics.net/ao5OrQtRxbDaPsjhkL2QeA#t-OpenDiscoLog "Access the logs to understand the discovery process and fine-tune the discovery process.").
* If you are viewing commands for the first time, have upgraded Discovery and Service Mapping Patterns, or have customized any pattern, refresh the command list by navigating to AllPattern DesignerCommand Validation ToolCommands List and selecting Refresh Command List.
* To be able to test credentials on an IP range or IP network, install the ParseIPRanges script include attached to the KB article: [KB1123625: Command Validation Tool](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1123625).
{#validate-discovery-commands__ul_v5t_lwf_cfc}

Role required: discovery_admin

## About this task

Whether you perform discovery using patterns or probes, the MID Server
executes commands to access configuration items (CIs). Most commands require
credentials to run them. In addition, you must assume a role of a user with elevated
rights to run some of these commands. If the necessary credentials are missing,
discovery fails.

For pattern-based discovery, you can validate all commands
used by a certain pattern simultaneously.

You can also validate discovery commands to check that the IP addresses you're using
for discovery are reachable. Sometimes IP addresses are incorrect or the servers
using these IP addresses are down.

If you validate commands that contain applicative credentials, the Command Validation Tool checks the Connections and Credentials module and uses relevant applicative credentials configured there.

Starting with Pattern Designer Enhancements version 3.9.0, the new pde_viewer role can view the command validation task results through the Command Validation Tasks and
Command Validation Task Results modules but can't edit or modify them. For more information, see [View command validation task results in pattern-based discovery](https://servicenow-prod.fluidtopics.net/fgbBgvntVKPZWm6sMA1jXA "View the results of command validation tasks to verify you have the correct credentials and permissions to run pattern-based discovery successfully.").

## Procedure

1. Navigate to AllPattern DesignerCommand Validation ToolCreate New.
2. **Optional:** To validate all commands used by a pattern, select Validate All Pattern Commands.
3. Fill in the fields as described in [Command Validation Tasks form for pattern-based discovery](https://servicenow-prod.fluidtopics.net/AlzndJ4QMsEfSNBbaSHGgA "Command Validation Tasks form displays the fields that you must fill when you create or modify a task for testing a pattern command.").
4. Select and hold (or right-click) the form header and select Save.
5. **Optional:** If the commands you selected contain temporary variables, add the values for these variables before validating such commands.
   1. Select Refresh Temporary Variable Mappings under Related Links.  
      The tool creates a list of all temporary variables for the chosen commands and IPs.
   2. Select the Temporary Variable Mappings tab and enter the values for the temporary variables.  
      Figure 1. Temporary Variable Mappings tab
   {#validate-discovery-commands__substeps_hvb_zmj_byb}
6. Select Run Command Validation.
7. Check if FAILURE appears in the Result column in the Command Validation Task Results section.  

   <br />

8. Select the link in the Command Validation Test column.
9. Review the description in the Results Details field.

## What to do next

1. Select the Open suggestions to troubleshoot failure link.  

2. Follow the instructions in the Steps to Remediate window.
{#validate-discovery-commands__ol_lkt_mhk_g5b}
**Related concepts**   

* [Discovery commands for probes and patterns](https://servicenow-prod.fluidtopics.net/ATbmi05od6rcXEGKXzCwZw "Discovery commands are used for both probe and pattern-based discovery to access configuration items (CIs) in your environment.")  
**Related reference**   

* [Command List form for pattern-based discovery](https://servicenow-prod.fluidtopics.net/1vUxkjdlPq3bHDKtKlc65A "The Command List form contains all commands used in discovery by infrastructure or application type patterns.")
* [Discovery CLI commands](https://servicenow-prod.fluidtopics.net/U42U1LvVn9djX6Og9LMNAA "A list of commands that are available to the Discovery Command Line Interface (CLI) in the Pattern Designer Enhancements application.")  
**Related topics**   

* [Getting started with credentials](https://www.servicenow.com/docs/access?context=credentials-getting-started&version=yokohama&pubname=yokohama-platform-security&ft:locale=en-US)

*[\>]: and then


