config_compare

Submits the configuration comparison job.

Format

emcli config_compare
      -target_type="oracle_database"
      -first_config="Test Database"
      -second_config="SYSMAN" 
      -job_name="Test Compare Job"
      [-schedule=
      {
          start_time:yyyy/MM/dd HH:mm;
          tz:{java timezone ID};
          frequency:interval/weekly/monthly/yearly;
          repeat:#m|#h|#d|#w;
          months:#,#,...;
          days:#,#,...;
          end_time:yyyy/MM/dd HH:mm;
          grace_period:;
       }]
       [-template_id="18"]
       [-job_description="Test Description"]
       [-mapping_display="Tree"]
       [-email_address]
       [-save_mode="save_all|save_only_diffs"]
 
[ ]  indicates that the parameter is optional

Options

  • target_type

    Target type on which the comparison job is being submitted. The value should be the internal name. To get the internal name, execute the following EM CLI command:

    emcli get_target_types
    
  • first_config

    Name of the first configuration, which can be either the latest configuration or a saved configuration of a target. If submitting the latest configuration, provide the target name. If submitting a saved configuration, the format should be:

    "target_name|saved_configuration_name(which is the "name" field from the output of "emcli get_saved_configs" 
    
  • second_config

    Names of the second and subsequent configurations, which can contain one or more latest configurations and/or one or more saved configurations of one or more targets. Multiple configurations can be specified, separated by a comma. If the latest configuration needs to be submitted, provide the target name. If the saved configuration needs to be submitted, then the format should be:

    "target_name|saved_configuration_name(which is the "name" field from the output of "emcli get_saved_configs"
    
  • job_name

    Name of the comparison job.

  • schedule

    Schedule with which the comparison job must be scheduled. If the schedule option is not provided, the comparison job runs immediately.

    • start_time - Time when comparison job has to start executing. The format is "yyyy/MM/dd HH:mm"

      tz - Timezone ID (optional)

    • frequency - Valid values are once/interval/weekly/monthly/yearly. (optional)

      If frequency is set to interval, repeat must be specified.

      If frequency is set to weekly or monthly, days must be specified.

      If frequency is set to yearly, both days and months must be specified.

    • repeat - Frequency with which the comparison job must be repeated. (Required only if frequency is set to interval.)

    • days - Comma-separated list of days. (Required only if frequency is weekly, monthly, or yearly.) Example: "repeat=1d"

      If frequency is weekly, then the valid range is 1 to 7 inclusive.

      If frequency is monthly or yearly, then the valid range is 1 to 30 inclusive.

    • months - Comma-separated list of months. (Required only if frequency is yearly). Valid range is 1 to 12 inclusive.

    • end_time - End time for comparison job executions. (optional). If it is not specified, the comparison job runs indefinitely. The format is "yyyy/MM/dd HH:mm"

    • grace_period - grace period in minutes (optional)

  • template_id

    ID of the template. The value is an integer.

  • job_description

    Description of the comparison job.

  • mapping_display

    Can be either "tree" or "table." The default value is "tree". This option is only for composite targets. Note: When "template_id" is specified, do not specify mapping_display.

  • email_address

    Email address to which notification mail is to be sent, if differences are found.

  • save_mode

    Tells the comparison engine whether to save all the results or only the differences. Valid inputs are "save_all" and "save_only_diffs". The save_only_diffs option saves the differences to the Management Repository. Otherwise, all the comparison results are saved. The default value is "save_only_diffs".

Checking the Job Status:

Once submitted, the comparison job's status can be viewed by issuing the following EM CLI command:

emcli get_jobs -name="jobName" 

Aborting the Job:

Once submitted, the comparison job can be aborted by issuing the following EM CLI command:

emcli stop_job -name="jobName"

Examples

Example 1

This example compares the latest configuration of one target to the latest configurations of multiple targets. All the comparison results will be saved.

emcli config_compare
      -target_type="oracle_database"
      -first_config="Test Database"
      -second_config="Test Database","Test_Database"
      -job_name="Test Job" -template_id="18"
      -save_mode="save_all"

Example 2

This example compares the latest configuration with the saved configuration specifying a start_time.

emcli config_compare
      -target_type="oracle_database"
      -first_config="Test Database"
      -second_config="Test Database|Test Database|oracle_
         database|20140101224530","Test_Database" -job_name="Test Job"
      -schedule="start_time:2014/06/10 15:45"