Validate commands used in pattern-based discovery

  • Rversion finale: Australia
  • Mis à jour 12 mars 2026
  • 2 minutes de lecture
  • 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.

    Avant de commencer

    • Verify that you have the following applications:
      • Pattern Designer Enhancements (sn_itom_pde)
      • Discovery and Service Mapping Patterns (sn_itom_pattern)
    • Check the log for horizontal discovery based on patterns, as described in Review the logs for horizontal discovery.
    • 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 All > Pattern Designer > Command Validation Tool > Commands 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.

    Role required: discovery_admin

    Pourquoi et quand exécuter cette tâche

    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.

    Procédure

    1. Navigate to All > Pattern Designer > Command Validation Tool > Create New.
    2. Facultatif : 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.
    4. Select and hold (or right-click) the form header and select Save.
    5. Facultatif : 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
        The value column
    6. Select Run Command Validation.
    7. Check if FAILURE appears in the Result column in the Command Validation Task Results section.

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

    Que faire ensuite

    1. Select the Open suggestions to troubleshoot failure link.
      Open suggestions to troubleshoot failure
    2. Follow the instructions in the Steps to Remediate window.