discover_wls

Note:

The following Weblogic Server versions are supported in Enterprise Manager 13.2:

12.2.1.x, 12.1.3.x, 12.1.2.x

10.3.6.x, 10.3.5.x, 10.3.4.x, 10.3.3.x, 10.3.2.x, 9.2.x

The information in this section applies only to these versions.

Purpose

Used to discover one or more WebLogic Domains (along with Oracle Fusion Middleware 11g and 12c software deployed to it), and to specify which Management Agent should monitor which hosts' Managed Servers.

Function

This verb discovers one or more Oracle WebLogic Server Domains. It reads a file labeled domain_discovery_file to discover WebLogic Server. Note that if you attempt to discover an already discovered WebLogic Server, the discovered WebLogic Server domain will be refreshed.

Requirements

To discover the WebLogic Server, the Administration Server must be up and running. After initial discovery or during refresh of domain membership, the Administration Server is not required to be up for general WebLogic Server monitoring. After initial discovery or during refresh of domain membership, the Managed Server is not required to be up for general WLS monitoring. Oracle recommends ensuring all Managed Servers to be managed by Cloud Control be up during discovery.

domain_discovery_file is required; discovery cannot occur without it. You must create the CSV (comma-separated values) formatted file before performing discovery. To save the discovered components to a specific Management Agent for monitoring, the discover_wls verb reads a second file labeled host_agent_mapping_file. If host_agent_mapping_file does not exist, the Management Agent specified in domain_discovery_file that performs the actual discovery is used as the Agent that monitors all discovered targets.

Usage With generate_discovery_input Verb

The generate_discovery_input verb creates a discovery input file automatically based on the targets discovered from the automatic discovery operation. You can then use this discovery input file in conjunction with the discover_wls verb to further automate the process of promoting discovered domains as fully managed targets.

Format

emcli discover_wls
        -input_file=domain_discovery_file:file_path
        [-input_file=host_agent_mapping_file:file_path]
        [-input_file=disable_target_types_file:file_path]
        [-input_file=global_target_props_file:file_path]
        [-debug]

[ ]  indicates that the parameter is optional

Options

  • input_file=domain_discovery_file

    Fully-qualified path to a CSV (Comma-Separated Values) formatted file that contains one line of details per domain to be added. Each line has the format shown for domain_discovery_file in the "File Structures" section below.

    Note the following points about the format of domain_discovery_file:

    Options —

    • The order of parameters is fixed. You must provide the parameters in the same order as shown for domain_discovery_file in the "File Structures" section below.

    • If you want to use a comma ( , ) in any of the parameters provided, you must escape the comma with a backslash as shown in This example, in which a backslash precedes the comma in the password my,pwd:

      10,domain123.xyx.us,11990,weblogic,my\,pwd,,,farm_demo,https://myco01.mycompany.com:3872/emd/main/
      

    Delimeters and Requirements —

    • Use a comma ( , ) as the delimiter.

    • Delimiters must be present even if the corresponding parameter is not provided. See the last line for domain_discovery_file in the "File Structures" section below.

    • If you want to use a comma (,) in one of the parameters provided, you must escape the comma (,) with a backslash. In This example, the password contains a comma:

      10,mco01.mycompany.com,7001,weblogic,welco\,me1,,,,my_farm_01,https://mco01.mycompany.com:3872/emd/main/
      
    • If you want to use a backslash in one of the parameters provided, you must escape the backslash with another backslash. In This example, the password contains a backslash:

      10,mco01.mycompany.com,7001,weblogic,we\,lco \ \ me1,,,,my_farm_01,https://mco01.mycompany.com:3872/emd/main/,true,false
      
    • The minimum number of tokens is 10, the maximum is 18 tokens. The following are the 10 required tokens:
      • <WebLogic Server version>

      • <Administration Server host machine name>

      • <Administration Server listen port>

      • <Administration Server username>

      • <Administration Server password>

      • <External Parameters - optional>

      • <JMX Protocol - required only if SSL enabled>

      • <JMX Service URL - required only if SSL enabled>

      • <Unique Domain Identifier>

      • <Agent URL>

    • The order of parameters is fixed. You must provide the parameters in the same order as specified in the sample file structure shown in the "File Structures" section below.

    For information about the input_file parameter, see -input_file Syntax Guidelines.

  • input_file=host_agent_mapping_file

    Fully-qualified path of the CSV (Comma-Separated Values) formatted file that contains multiple lines of host system names where managed servers are to be monitored, and specifies the Management Agent used to monitor each host's managed servers. Each line has the following format:

    <Discovered_target_host_machine_name>,<Agent_URL_to_save/monitor_the_host>
    

    For example:

    myco01.mycompany.com,https://myco01.mycompany.com:3872/emd/main/
    myco02.mycompany.com,https://myco02.mycompany.com:3872/emd/main/
    myco03.mycompany.com,https://myco03.mycompany.com:3872/emd/main/
    

    Definitions for the parameters are as follows:

    • Discovered_target_host_machine_name

      Host machine with installed WebLogic Servers that need to be discovered. Use full host names, such as myco01.mycompany.com instead of myco01.

    • Agent_URL_to_save/monitor_the_host

      URL for the Management Agent to be used to monitor all discovered targets on the corresponding host.

    Delimeters and Requirements —

    • Use a comma ( , ) as the delimiter.

    • The total number of tokens in each line is fixed and should be equal to 2.

    • The order of parameters is fixed. You must provide the parameters in the same order as shown in the sample file structure shown in the "File Structures" section below.

    • <target_host1> and <save_to_agent1> are both mandatory parameters.

    For information about the input_file parameter, see -input_file Syntax Guidelines.

  • input_file=disable_target_types_file

    Fully-qualified path to a CSV (Comma-Separated Values) formatted file containing multiple lines of internal target type names that should not be discovered.

    For example:

    oracle_soa_composite
    j2ee_application
    

    If the discover_wls verb is run against a Fusion Applications WebLogic Server domain, the disabled target types can include Fusion Applications target types.

  • global_target_props_file

    Fully qualified path to a CSV formatted file containing target properties. The structure of the file is as follows:

    <Administration Server host machine name>,

    <Administration Server listen port>,

    <Comment>,

    <Contact>,

    <Cost Center>,

    <Department>,

    <Life Cycle Status. Valid Values: None, Mission Critical, Production, Staging, Test, Development>,

    <Line Of Business>,

    <Location>,

    <Apply to all targets - true/false. Default is false>

    To set global properties for a domain specified in a discovery input file, the administration server host and administration server port specified in the global properties file should match host and port specified in domain discovery input file.

  • debug

    Runs this verb in verbose mode for debugging purposes.

File Structures

domain_discovery_file for WebLogic Server versions

This example shows the structure of a sample domain_discovery_file for WebLogic Server. OPT signifies an optional parameter. The last entry shows the format when optional parameters External Options, JMX Protocol, JMX Service URL, Management Agent URL, Node Manager Username, and Node Manager Password are not provided.

<WebLogic Server version>,
<Administration Server host machine name>,
<Administration Server listen port>,
<Administration Server username>,
<Administration Server password>,
<External Options - optional>,
<JMX Protocol - Required only if SSL enabled>,
<JMX Service URL - Required only if SSL enabled>,
<Unique Domain Identifier>,
<Agent URL/>,
<Discover Down Servers - optional - Default if not specified is false>,
<Use Credential Store - optional - Default if not specified is false>
<Enable Refresh Job - optional - Default if not specified is false>
<Use Host Name in Service URL - optional - Default if not specified is false>
<Node Manager Username> - optional - Default if not specified is the Administration Server Username>
<Node Manager Password> - optional - Default if not specified is the Administration Server password>

For example:

10,mco01.mycompany.com,7001,weblogic,welcome1,,,,my_farm_01,https://mco01.mycompany.com:3872/emd/main/,false,false,false,false,NodeUsername,NodePassword

Definitions for the parameters are as follows:

  • WebLogic Server Version

    Valid values are 9, 10, or 12. This example shows a sample entry in domain_discovery_file to discover WebLogic Server version 10:

    10,myco01.mycompany.com,7001,weblogic,welcome1,,,,soa_farm,
    https://myco02.mycompany.com:8723/emd/main/
    
  • Administration Server Host

    Full host name of the WebLogic Administration Server that needs to be discovered; for example, myco01.mycompany.com. This is a mandatory parameter.

  • Port

    Listen port of the WebLogic Administration Server.

  • Username

    Login user name for the WebLogic Administration Server.

  • Password

    Login password for the WebLogic Administration Server.

  • External Options

    These parameters are passed to the Java process, which connects to the Administration Server. All of these parameters must begin with -D.

  • JMX Protocol

    The Management Agent makes a JMX connection to the Administration Server to discover the domain's members. Valid values are t3, t3s, iiop, and iiops. If you do not provide a protocol, the t3 default is used.

  • JML Service URL

    Makes a JMX connection to the Administration Server. If you do not specify this option, it is created based on the input parameters.

  • Unique Domain Identifier

    Creates a unique target name. This option can contain only alphanumeric characters and the special character '_' and cannot contain any other special characters.

  • Agent URL

    URL for the Management Agent used to discover the targets. If you do not provide a value, the local Management Agent present on the target WebLogic Server is used. If a Management Agent is not found on the target WebLogic Server, an error is displayed.

  • Discover Down Servers

    If this value is true, the servers that are down are discovered. If false, the servers that are down are not discovered.

  • Use Credential Store

    If this value is set to true, the verb retrieves the WebLogic credentials from the credential store.

  • Discover App Versions

    Optional - Default if not specified is true

    If only the active version of the app is needed, then set it to false.

  • Enable Refresh Job

    Optional - Default if not specified is false

    If you would like to perform a daily job to refresh the domain discovery, then set this to true.

  • Use Host Name in Service URL

    Optional - Default if not specified is false

  • Create Incident for Discovery Failure

    Optional - Default if not specified is false

  • Node Manager Username

    Optional - Default if not specified is Administration Server Username

    If you would like the Node Manager discovered as a target to be monitored, then username/password are required.

  • Node Manager Password

    Optional - Default if not specified is Administration Server Password

Examples

This example reads the my_domains_info.csv file to determine the domains to be added to Cloud Control, and reads the my_agent_mapping.csv file to determine which Management Agents should monitor which host's managed servers.

emcli discover_wls
    -input_file=domain_discovery_file:\emcli\my_domains_info.csv
    -input_file=host_agent_mapping_file:\emcli\my_agent_mapping.csv
    -debug

This example manually redirects the output of discover_wls to a file using standard output redirect.

emcli discover_wls input_file=domain_discovery_file:"<fully_qualified_path_of_domain_discovery_file/domain_discovery_file.csv>" > /tmp/emcli/output_file.out