Skip Headers
Oracle® Enterprise Manager Cloud Control Administrator's Guide
12c Release 1 (12.1.0.1)

Part Number E24473-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

14 Configuration Comparisons, Templates, and Rules

This chapter describes the template creation process and the use of rules in the process. It also provides information on setting up comparisons and managing comparison templates.

Comparison Templates

A comparison template enables you to establish certain constants to take into account when comparing configurations of the given target type; for example, which property differences to ignore, and which property differences trigger an alert. You can use constraints to establish acceptable values for specific properties. A configuration being compared that does not comply with the constraint constitutes a difference.

A template can invoke rules, or expressions, to be evaluated in determining when there is a match for comparison purposes, and when to disregard differences detected in a comparison.

Create or Edit a Comparison Template

Use these instructions when creating a new template or editing an existing template; this includes create-like.

  1. From the Enterprise menu, select Configuration, then select Comparison Templates.

    For a new template, click Create and provide a name and target type. To base a template on an existing one, select the template row, click Create Like, and provide a name. In either case, the action creates a new template row.

  2. Select the appropriate template row in the table and click the Edit button. The Template Settings tab appears.

    The compared configurations' target type drives the hierarchy of configuration item types and configuration items on the left. The settings in play for the respective properties on the right derive from the selected template, unless you are creating a new template from scratch, in which case there are no settings.

    A system comparison takes an overall template and a template for each system member. Thus there is an additional tab for Member Settings. Edit the tab as follows:

    • Optionally select the member template to use for each system member type.

    • For any given member type, you can elect not to compare configurations by clearing the check box.

    • For member types that you are comparing, select a target property to use as a matching key. The default is target name, but typically you would want to use a distinguishable property to align comparison entities, such as department or location.

  3. In the Template Settings tab, select a configuration item type or item in the left pane to expose its properties in the right pane. A key icon denotes a property that is defined as a key column in the configuration item type's metadata.

  4. Click the Property Settings tab and check boxes for property differences to be ignored and alerted as appropriate. They are mutually exclusive. When you ignore differences in a property value in this fashion, you are doing so unconditionally for all differences detected in the property value for the configuration item type.

    Use a value constraint rule to filter the property value. In this case, the comparison engine compares the property value in the configurations being compared (the second through n configurations) to the constrained value. A property value that fails to satisfy the constraint constitutes a difference. For example, test for a version equal to or greater than 6. Any instance in the compared configurations of a version property value under 6 constitutes a difference. Clearly, you would not set a value constraint if you checked ignore differences. See "Specifying Rules" for details.

  5. Repeat the preceding steps to set additional property settings on other configuration items.

  6. Optionally, select an item in the left pane and click the Rules for Matching Instances tab. For a given property, specify a rule expression to be evaluated to determine when a match exists between configuration instances. In other words, if the expression resolves to true, compare the instances. See "Specifying Rules" for details.

    Match rules are column-based; they apply an AND logical operator. If you specify rules for multiple properties, they must all resolve to true to constitute a match.

  7. Optionally, select an item in the left pane and click the Rules for Ignoring Instances tab. For a given property, specify a rule expression to be evaluated to determine when to ignore differences in configuration instances. In other words, if the expression resolves to true, disregard whatever differences the comparison detects. See "Specifying Rules" for details.

    Ignore rules are row-based; they apply an AND logical operator within a subset of rules and an OR logical operator between rule subsets. So, if you specify two rules for property A and two rules for property B, either both rules set on property A OR both rules set on property B must resolve to true to constitute a match.

Managing Templates

In addition to creating and editing comparison templates, you manage them by doing the following:

  • View a template's settings and composition; this is read-only

  • Delete a template (requires the proper permissions)

  • Share templates by exporting them in XML file format and importing them into other Enterprise Manager systems

View a Comparison Template

You can view out-of-box templates and other users' templates to which you have access. Viewing a template is read-only: you see its makeup, but you cannot change anything, even temporarily.

  1. Select a template in the Comparison Templates manager and click the View button.

  2. Expand items in the tree on the left and peruse the settings and rules on the various tabs.

  3. Notice that the Save button is disabled. Click Cancel to return to the Comparison Templates manager.

Delete a Comparison Template

Deleting a template is subject to the following constraints:

  • You cannot delete a comparison template unless you have the proper permissions.

  • You cannot delete a default comparison template.

  • You cannot delete a comparison template currently in use.

To delete a template, select it in the Comparison Templates manager, click Delete, and confirm the operation.

Export a Comparison Template

Use the export feature to save a template as an external file that can be imported into another Enterprise Manager system.

  1. Select a template in the Comparison Templates manager and click the Export button.

    A platform-specific file dialog opens. For example, if you are using Firefox, the dialog notes that you have chosen to open the named template, which it identifies as an XML file. The dialog asks what you want Firefox to do, open the file in an XML editor or save the file.

  2. Select the save radio button and click OK.

  3. Browse to the desired location in the file system and save the file, changing the name if applicable. You cannot change the name of a default (out-of-box) template on export.

Import a Comparison Template

Any comparison template import must comply with the comparison template .xsd. So, for all intents and purposes, the import should be a previously exported template to ensure compliance.

  1. In the Comparison Templates manager click the Import button.

  2. Browse to the template file location and click Import.

    The imported template appears as a new row in the template table.

An exported template is associated with its owner. A template whose owner is not the same as the login ID of the person importing the template retains its original ownership. If you want to be the owner of the imported template, you have to edit the owner attribute in the template XML file prior to import, changing the value to your login ID. Or, you can simply remove the attribute, in which case the default owner will be set to the ID of the person initiating the import operation.

The Template Manager disallows import of a default (out-of-box) template of the same name. Similarly, you could change the name attribute in the template XML file prior to import to allow the import to occur.

Comparison Wizard

Comparisons are an important factor in managing the enterprise. The comparison wizard walks you through the process of setting up a comparison. Setting up a comparison involves five steps, six if you are comparing systems:

A follow-on step would be to review the results and drill down to differences details.

Select a Configuration to Compare Against

The first step in setting up a comparison is to select a configuration against which to compare one or more other configurations. When you open the Comparison Wizard (from the Enterprise menu, select Configuration, then select Compare), available configuration collections appear in a table at the bottom.

  1. Choose between the latest and a saved configuration. You can "mix and match" in that you can compare latest to saved and vice versa. When you choose saved, filtering criteria on the right become active so that you can enter dates and a description.

  2. Specify filtering criteria to narrow the search. Minimally, you would probably want to select a target type, and for a saved configuration, a before or after date. Click Search.

  3. In the list of matching configurations that appears at the bottom of the page, select the one to be the benchmark and click Next or Comparison Configurations on the workflow train.

Select Configurations to Compare

The next step is to select one or more configurations to compare to the first configuration you selected.

  1. Click Add Configurations to open the Search and Select Configurations dialog.

  2. As for the first configuration, choose between latest and saved, and enter filtering criteria to narrow the search. Click Search.

  3. In the results list, select one or more configurations (you can multiselect) and then click OK.

  4. Click Next or Comparison Template on the workflow train.

Select a Template to Use in the Comparison

Optionally, you can elect not to use a template (the default), in which case you can skip this step. You must use a template you select as is; that is, you cannot alter any settings for this particular comparison. If you want to change certain settings in a template, use the create-like feature to create a new template, based on an existing one.

Depending on the comparison target type, there may be a default template available. When done selecting a template, click Next or Schedule and Notify or Mapping, as appropriate, on the workflow train.

Map Members in a System Comparison

Mapping pertains exclusively to systems. It's a way to selectively indicate how members of respective systems should match up in a comparison. The mappings you see initially are system-defined, based on template selection. If you are comparing multiple systems, select a different system target to see the mappings for that system.

You can control which mapped members to compare by deselecting the Compare Configurations check box in the table header and then selecting table rows individually, or by deselecting rows within the table.

Template-based mappings may not account for all situations. Click Create Mapping to manually pair member configurations to compare. Select the system member type from the drop-down list and map a member of the first system to a member of the second system by selecting members in the respective table. Click OK.

Note that you can remove only those mappings that you manually create. When done with mapping, click Next or Schedule and Notify on the workflow train.

Schedule the Comparison and Create a Notification List

On the Schedule and Notify page, you schedule the comparison to run as a background job. The comparison can be one-time-only or run on a recurring basis. You can run the comparison immediately or at some later date. This also is where you supply e-mail addresses to which to send differences alerts.

Note:

If you schedule a recurring job, you can subsequently change the job-related settings when viewing the results on the Jobs page. Click the Edit button and then go to the Schedule tab.
  1. The comparison job must have a name. Although the system supplies a default name that identifies it by date and time as a configuration comparison, you may want to enter a meaningful name for the job.

  2. Specify the job schedule:

    • If not now, when. Click Later to activate the calendar widget where you can select a date and time.

    • How often. Select report frequency in the drop-down list. Default is one-time-only.

    • Wait how long. If the job fails to run as scheduled, cancel within a specified time frame.

    • Keep going. Maintain the job schedule for the specified period.

  3. Enter the e-mail addresses of those who are to be notified when the comparison detects a difference. Use a comma to separate addresses. Remember that the properties for which differences are alerted were specifically selected in the comparison template.

    Addressees entered here must have been properly set up for notifications (from the Setup menu, select Notifications on the console home page).

  4. Click Next or Review and Submit on the workflow train.

Review the Comparison Parameters and Submit the Job

Review the comparison parameters before submitting the job:

  • Is the benchmark configuration, that is, the first one, correct?

  • Are the configurations you are comparing against the benchmark correct?

  • Are you using the template you want?

  • Is the job name suitable?

  • Is the job scheduling as intended?

  • Have you entered properly formatted e-mail addresses for differences alerts?

If you need to change anything, go back to the appropriate page; otherwise, click Submit to schedule the comparison job.

The Jobs page opens, showing a summary of the submitted job. Eventually the Jobs page reveals the results of the comparison; that is, whether the comparison detected differences or found the configurations to be the same. In either case (different or the same), the reported result is a link to the details of the comparison, although presumably different is the more interesting result. A separate entry appears for each compared configuration. In other words, if configurations B and C are being compared to A, there is a result for A compared to B, and a result for A compared to C.

Working with Comparison Results

This section covers comparison results from the following perspectives:

Comparisons and Job Activity

Comparisons run as scheduled jobs. Part of the process of setting up a comparison is to define the schedule: run once-only or on a recurring basis; run immediately or at some later time; retry after failure; and so forth. Given the permutations, you can have many jobs to keep track of.

To view comparison job activity, from the Enterprise menu, select Configuration, then select Comparison Job Activity.

Note that the comparison job activity page also affords the opportunity to resubmit comparisons already run; that is, you do not have to go through the entire comparison workflow to run a subsequent execution of the same comparison.

View a list of all current and past comparisons. Use search criteria to filter the list of comparison jobs. For example, show all failed comparisons started over the past 24 hours; or, show all successful comparisons involving hosts started over the past 31 days. The jobs engine purges comparison jobs older than 31 days.

Select a table row and click View Result to go to the Jobs page that reports the comparison result. From there you can drill down to results details. The job name is a hyperlink that takes you to the same place. Use the bread crumb on the Jobs page to navigate back to the list. The comparison jobs you can view beyond your own depend on your role and access level granted.

Select a table row and click Resubmit Comparison Now to run a new submission of a previously executed comparison, characterized by the following.

  • As this is a new job, a date and time stamp distinguishes it from its predecessor.

  • The job is scheduled to execute immediately.

  • The job will execute only once.

An informational message confirms the job, which appears as a new row in the table.

If you are the job owner or otherwise have the proper access level, you can perform list maintenance by deleting comparison jobs that no longer have relevance.

System Comparisons

Results of a system comparison appear when the scheduled comparison job completes and you click the Different link on the Jobs page. This view summarizes the comparison and job details in the two regions at the top.

The bottom region summarizes the comparison results as follows:

  • The left pane displays a hierarchy of system and member target types.

  • The right pane reports comparison results based on the mappings established as part of comparison setup. A boxed 1 (left only) or 2 (right only) means there was nothing to compare to the first or second target, respectively. When this is the case, you can return to the mapping setup step and either create a mapping between the targets or clear the configuration check box for the member type.

  • Click the Different link to see the differences between member targets. Use the bread crumb link at the top of the details page to return to the system comparison results page.

Single Target Comparisons

Difference details display when you click the Different link in the comparison results view on the Jobs page. The details view summarizes the comparison and job details. You may want to collapse these regions to provide more page real estate for the difference details.

Difference details break down as follows:

  • The left pane displays a hierarchy of configuration items for the target type being compared, and, if applicable, custom configurations. Refine the scope of comparison results as follows:

    • Select the Show Differences Only check box to eliminate the "noise" of same and ignored results.

    • Select the Show Ignored Properties check box to display properties the comparison template ignores. Key properties and properties that are the same or different display be default. This option is disabled if you selected Show Differences Only in the left pane.

  • The display on the right depends on the selection on the left.

    • Select a configuration item type on the left to display tables on the right where the top table contains rows of select (key) configuration properties and the bottom table contains rows of configuration properties and values. Use the filter feature to narrow the scope of configuration item types.

    • Select a row in the top table to move its configuration property to the top row of the bottom table.

    • Select a custom configuration file on the left to display file contents on the right. File contents that include property values for the compared configurations display both in raw and parsed form on separate tabs.

The icons that appear in this view are mostly intuitive: equal–same, not equal–different. The key icon denotes the key properties of the configuration item type. An indication of Out of Range means that the property value failed a value constraint set on the property. A boxed 1 (left only) or 2 (right only) means that the comparison did not find a matching item to compare to the first or second configuration, respectively. When this is the case, you can return to template setup and invoke a rule to create a match, and then rerun the comparison.

Configuration Key Properties

You might wonder about the column names that appear in the top table on the right. These columns represent configuration item type key properties. If the configuration item type does not have declared key properties, the comparison engine takes the top four properties in the CI type database table to serve as key stand-ins for purposes of matching up configurations. The comparison engine upholds the same precedence (top four properties in the database table) if for some reason the comparison is set up to ignore key properties (not recommended).

Specifying Rules

Specify rules in the context of creating or editing a comparison template (see"Create or Edit a Comparison Template").

Rules enable you to parse configuration data in order to fine-tune comparisons. In terms of the comparison, a rule applies the expression to the value of the selected item in the configuration instance that is being compared to the benchmark configuration. Matching rules are intended to devise a comparison key that aligns the instances being compared. Ignore rules are intended to establish a basis for disregarding any differences detected between instances being compared.

Value Constraint Rules

Specify value constraint rules as follows:v

  1. Select a configuration item in the left pane.

  2. Click the Property Settings tab in the right pane and select the property on which you want to set a value constraint.

  3. Click the Edit Rule button in the toolbar. In the dialog that opens:

    1. Select an operator from the drop-down list.

    2. Type an operands expression and then click OK.

    To clear a rule, select the table row and click the Remove Rule button in the toolbar.

    See "Rules Expression Reference" for details on the formation of a rules expression.

Matching Rules

Specify matching rules as follows:

  1. Select a configuration item in the left pane.

  2. Click the Rules for Matching Instances tab in the right pane and then click New.

    Click Show Key Properties to see which properties are defined as key columns in the selected configuration item type's metadata.

  3. Select a property in the drop-down list that appears under Property Name.

  4. To create the rule, select the table row and click the Edit Rule button in the toolbar. In the dialog that opens:

    1. Select an operator from the drop-down list.

    2. Type an operands expression and then click OK.

    3. To specify additional rules, click New and repeat Steps a and b

    To clear a rule, select the table row and click the Remove Rule button in the toolbar.

    See "Rules Expression Reference" for details on the formation of a rules expression.

    You can enter additional rules for the same or for a different configuration item. When there are multiple rules, they resolve in the order specified. Matching rules take an AND logical operator, which means all conditions must resolve to true to constitute a match.

Ignore Rules

Specify ignore rules as follows:

  1. Select a configuration item in the left pane.

  2. Click the Rules for Ignoring Instances tab in the right pane. and then click New.

    Click Show Key Properties to see which properties are defined as key columns in the selected configuration item type's metadata.

  3. Select a property in the drop-down list that appears under Property Name.

  4. To create the rule, select the table row and click the Edit Rule button in the toolbar. In the dialog that opens:

    1. Select an operator from the drop-down list.

    2. Type an operands expression and then click OK.

    3. To specify additional rules, click New and repeat Steps a and b

    To clear a rule, select the table row and click the Remove Rule button in the toolbar.

    See "Rules Expression Reference" for details on the formation of a rules expression.

    You can enter additional rules for the same or for a different configuration item. When there are multiple rules, they resolve in the order specified. Ignore rules take an AND logical operator for rules within a subset, and an OR logical operator between subsets. So, for two subsets, each with multiple rules, all rules in the first subset OR all rules in the second subset must resolve to true to constitute a match.

  5. Select New Or to indicate the end of one rule subset and the beginning of another.

Rules Expression Reference

A rule consists of an operator and operands. Taken together, they form an expression that resolves to a value that is then compared to the value of the selected item. A true condition satisfies the rule.

Operands can be literals (string literals are enclosed in single quotes), legal numbers, or dates of the form YYYY-MM-DD HH24:MI:SS.FF. Operands that directly reference the value of a configuration item must be of the same date type as that value. Operands in square brackets in the syntax are optional.

Operator Operands
is equal to* An optional literal value to match; string values are case-sensitive; if unspecified, expression evaluates value of the property to which the rule applies

Note that a matching rule compares the values of the configuration items in the respective configuration to one another, not to a third specified value, so the operator does not take an operand in this case.

[match-literal]
is case-insensitive equal to* An optional case-insensitive string literal; if unspecified, expression evaluates value of the property to which the rule applies

Note that a matching rule compares the values of the configuration items in the respective configuration to one another, not to a third specified value, so the operator does not take an operand in this case.

['match-literal']
is greater than or equal† A literal value to match; required
match-literal
is greater than † A literal value to match; required
match-literal
is less than or equal to† A literal value to match; required
match-literal
is less than† A literal value to match; required
match-literal
is one of† A comma-separated list of literal values, at least one of which must be specified, but only one of which need match
match-literal-1[,match-literal-n,...]
is between† A range specified as start and end literal values; both must be specified; range is inclusive
start-range-literal , end-range-literal
contains† A string literal on which to perform pattern matching; required
[FALSE|TRUE,] 'pattern-literal'

FALSE (default) means string must comply with Oracle LIKE operator syntax; TRUE means string must comply with Posix regular expression syntax

replace‡ A string literal to match and replace with a second string literal
[FALSE|TRUE,]'pattern-literal'[,'replacement-literal'][,position-integer][,occurrence-integer] 

FALSE (default) means string must comply with Oracle LIKE operator syntax; TRUE means string must comply with Posix regular expression syntax

TRUE enables optional positional integer argument to indicate where within the column value to extract the string, and optional occurrence integer argument to indicate the position count to replace

Mandatory pattern literal represents the string value to match

If the replacement string literal is unspecified, replace the matched string literal with nothing

substring‡ Extract specified segment of string value
[FALSE|TRUE,]position-integer[,length-integer][,'pattern-literal'[,occurrence-integer]]

FALSE (default) means string must comply with Oracle LIKE operator syntax; TRUE means string must comply with Posix regular expression syntax

Mandatory positional integer argument indicates where to begin string extraction:

  • If 0 or 1, returns all characters

  • If positive integer, starts extraction from beginning

  • If negative integer, starts extraction counting backwards from end

Optional length integer argument indicates character count starting at position integer

pattern literal represents the value to match; optional if the first argument is FALSE; required if TRUE

occurrence integer argument indicates character count to match; valid only if pattern literal is specified


Notations are as follows:


*–Enabled for value constraints, matching rules, and ignore rules
†–Enabled for value constraints and ignore rules only
‡–Enabled for matching rules only

Rule Examples

These rule examples assume that you are in the process of creating or editing a template and are at the point where you have selected the configuration item in the tree on the left.

Matching Rule Examples

Suppose, when comparing the hardware of host configurations, you want, for matching purposes, to ignore case in respective vendor names. Here's a simple rule to make the comparison case-insensitive.

  1. In the Rules for Matching tab, click New.

  2. Select Vendor Name in the drop-down list.

  3. Select the table row and click the Edit Rule button in the toolbar to open the rule dialog.

    • Set Operator to is-case-insensitive-equal-to. As this operator takes no operands for a matching rule, you are done.

    • Click OK.

You want to compare WebLogic Servers, aligning on server name, where the names are different: ManagedServer1 and ManagedServer2, for example. To ensure the comparison occurs, you need to fashion a match on server name.

  1. In the Rules for Matching Instances tab, click New.

  2. Select Machine Name in the drop-down list.

  3. Select the table row and click the Edit Rule button in the toolbar to open the rule dialog.

    • Set Operator to substring.

    • Set Operands to 1, 13.

    • Click OK.

    Effectively, the rule says use the first 13 characters of the name (ManagedServer), thus excluding the qualifying integer.

  4. Another way to achieve the same result:

    • Set Operator to replace.

    • Set Operands to true, '(*)(\d*)', '\1'.

    • Click OK.

    This example uses a regular expression (TRUE) to resolve all characters prior to the qualifying integer.

For a more advanced example, consider a database instance comparison that requires a match on Datafiles filenames within a Tablespace, where filenames are of the form:

/u01/jblack_abc2d/oracle/dbs/dabc2/mgmt_ad4j.dbf
  1. In the Rules for Matching Instances tab, click New.

  2. Select File Name in the drop-down list.

  3. Select the table row and click the Edit Rule button in the toolbar to open the rule dialog.

    • Set Operator to replace.

    • Set Operands to true, '(/u01/)(.*)(oracle.*/dabc[0-9]+.*/)(.*)', '\2\4'.

    • Click OK.

Effectively, the rule says use a regular expression (TRUE) to construct a matching key from the value between /u01/ and oracle, combined with what remains of the original filename after dabc2 /, or jblack_abc2d/mgmt_ad4j.dbf.

Ignore Rule Examples

Generally, you use ignore rules to ignore differences in collections that are row-oriented, as opposed to column-oriented. Custom Configuration snapshots, for example, are row-oriented data collections.

Say, for example, you wanted to ignore in Custom Configuration parsed data, any row where the property Attribute identifies an internal ID or checksum.

  1. In the Rules for Ignoring Instances tab, click New.

  2. Select Attribute in the drop-down list.

  3. Select the table row and click the Edit Rule button in the toolbar to open the rule dialog.

    • Set Operator to is one of.

    • Set Operands to 'id', 'checksum'.

    • Click OK.

The rule ensures that the comparison ignores any row in the collection data that contains either of the specified values.

Now consider an ignore rule that demonstrates how the comparison engine applies the logical operators AND and OR against the same configuration item type. In this example the objective is to ignore rows in Custom Configuration parsed data when any of three rule sets satisfies the following conditions:


Data Source = 'sqlnet.ora' AND Attribute = 'ADR_BASE'
OR
Data Source = 'tnsnames.ora' AND Attribute = 'HOST'
OR
Data Source = 'resources.xml' AND Attribute = 'authMechanismPreference'

Notice that the comparison engine applies the AND operator to rules within a set and the OR operator between rule sets. Rules for ignoring instances support inheritance; thus, in this case, the Data Source property is available in rules creation, as demonstrated in the example.

  1. In the Rules for Ignoring Instances tab, click New.

  2. Select Data Source in the drop-down list.

  3. Select the table row and click the Edit Rule button in the toolbar to open the rule dialog.

    • Set Operator to is equal to.

    • Set Operands to 'sqlnet.ora'.

    • Click OK.

  4. Click New and select Attribute in the drop-down list.

  5. Select the table row and click the Edit Rule button in the toolbar to open the rule dialog.

    • Set Operator to is equal to.

    • Set Operands to 'ADR_BASE'.

    • Click OK.

  6. Click New Or to insert a logical OR operator to signal the end of the first rule set.

  7. Add two new rules where Data Source is equal to 'tnsnames.ora' and Attribute is equal to 'HOST'.

  8. Click New Or to insert a logical OR operator to signal the end of the second rule set.

  9. Add two new rules where Data Source is equal to 'resources.xml' and Attribute is equal to 'authMechanismPreference'.

The comparison ignores any row in the collection data that satisfies any of the three rule sets.