5 Track, Compare, Find and Replace

Application Configuration Console provides versatile tools to monitor and oversee your IT infrastructure.

Note:

The tasks in this chapter assume that you are already logged in to the Application Configuration Console Client.

5.1 Track Assets and Configurations

The tracking feature lets you see alerts and receive e-mail when there are changes to configurations in Application Configuration Console or to external resources.

Let's set tracking on the Server1 asset.

  1. In the Navigator view, expand Portal Lifecycle View > Development > App Server > Server1.

  2. Right-click Resource View and select Open.

    You set tracking on an asset view. Since the only view we have right now is the Resource View, that's the one you have to select.

  3. At the bottom of the Editor area, click the Tracking Schedule tab.

  4. Click the Edit button (upper-left corner). You won't be able to do anything until you do.

  5. Click the Enable Tracking check box and select an option. In this case, make it Track Configurations.

  6. Now select a specific configuration, in this case, config.xml.

  7. Since this is for demonstration purposes, we'll set the schedule at the next hour on today only.

  8. We want notification when differences are detected, so we'll supply an Email Address in the space provided.

  9. Click Save to complete the scheduling operation.

5.1.1 Other Things to Know About Tracking

Note the following additional points about tracking:

  • You can track single or selected configurations, or the entire asset.

  • In a typical scenario, you would set up a recurring schedule, for example, every day of the week at 1:00 a.m., 12 months a year. Incidentally, off-hours is best from a performance standpoint.

  • You are always notified in the Alerts view of Application Configuration Console when a difference is detected. E-mail notification is optional.

  • The Update option at the bottom of the scheduling dialog, when set to Replace, causes the Application Configuration Console configuration to be overwritten with the external resource automatically, whenever a difference is detected.

5.1.2 When Tracking Detects a Difference

When tracking detects a difference, Application Configuration Console posts an alert in the Alerts view, identifying the time of detection and the respective paths of the internal and external data being compared.

The alert is a hyperlink. Double-click it (or right-click and select Open in Compare View) to display detected differences in the Editor area. The resulting Compare view shows rows that contain differences in a bold font with property differences highlighted.

If you opt for e-mail notification, you automatically receive a message with body content that provides information similar to that posted in the Alerts view. At the bottom of the message is a URL; click it to view the Application Configuration Console Web Reports Comparison Report in your browser, where you see the same information displayed in the Editor area when you open the alert in the Compare view.

5.2 Compare Assets and Configurations

You can compare two or more containers or configurations to quickly identify configuration differences, which are often the source of problems in applications. You can compare individual configurations or entire container trees. You can also compare an asset or configuration with its external resource to see any differences between the Application Configuration Console data and the external resource data.

Let's do a simple compare of two containers, the respective Web Server layers in the Development and Staging environments.

  1. In the Navigator view, click the Web Server layer under the Development environment, then ctrl-click the Web Server layer under the Staging environment.

  2. Right-click and select Compare from the popup menu.

  3. In the Comparison Options dialog that opens, accept the defaults and click OK.

    After a moment, the results of the comparison appear in the Editor area. The resulting Compare view shows all of the properties in the left column and the values from each container or configuration in additional columns. Any container rows that contain differences are shown in a bold font, and properties with differences are highlighted.

    Notice that the containers being compared have the same name-Web Server. This can sometimes be confusing when viewing comparisons, so Application Configuration Console gives you the capability to rename the columns to something more meaningful, in this case, perhaps, to the respective environments. To change the name of a column, right-click under the respective column name and select Rename Column. Figure 5-1 shows the columns already renamed, with the right-click menu selection exposed:

    Figure 5-1 Comparison Results with Columns Renamed

    Compare view with columns renamed

In the first comparison, we compared containers within Application Configuration Console. Now let's compare Application Configuration Console data to its external resource.

  1. In the Navigator view, expand Portal Lifecycle View > Development > App Server > Server1 > Resource View.

  2. Right-click config.xml and select Compare to Resource in the popup menu.

  3. In the Comparison Options dialog that opens, accept the defaults and click OK.

    After a moment, the results of the comparison appear in the Editor area, for example. This is an expanded view to expose the difference detected in the comparison. Column headings in the Compare view distinguish the Application Configuration Console data from the external resource data.

Now let's compare the same entities, only this time we'll compare the Application Configuration Console configuration content (raw text form) to its external counterpart.

  1. In the Navigator view, expand Portal Lifecycle View > Development > App Server > Server1 > Resource View.

  2. Right-click config.xml and select Compare Content to Resource in the popup menu.

    After a moment, the results of the comparison appear in the Editor area. Notice that this comparison displays in the Physical View, showing a physical (text) representation of the configuration and its external resource. You can edit content and normalize values in either direction; that is, in the Application Configuration Console data or the external resource.

5.2.1 Other Things to Know About Comparisons

Note the following additional points about comparisons:

  • You can edit or normalize values when differences are detected. Say, for example, a comparison of six configurations flagged differences in the values of a particular property, and you wanted to make them all the same. You could do that by choosing to normalize the row to a selected value.

  • In some cases, you know in advance that a comparison will detect differences, server names or port numbers for example. You can choose to have comparisons ignore certain properties either temporarily or permanently to cut down on differences clutter.

  • Some comparisons you will want to run again and again. After you establish comparison criteria and run the comparison the first time, you can save the particulars of the comparison to run at will.

  • You can share saved comparisons with others. You also can set up a schedule to run saved comparisons automatically on a recurring basis. Scheduled comparisons work the same as tracking in that differences are posted to the Alerts view and can generate e-mail notifications.

  • Sometimes, even though you might think that you are comparing like entities, Application Configuration Console sees them as apples and oranges. This is mainly due to use of different property names and misaligned placement within configuration files. Metadata in the form of something called a comparison key and stored rule sets known as Savespecs afford sophisticated techniques to overcome obstacles to straight-up comparisons.

5.3 Find and Replace Operations

Application Configuration Console has a powerful find and replace capability that enables you to search not only for property values in your data but also for specific settings you have specified relative to the operations you perform within Application Configuration Console.

A compare operation performed earlier in the chapter revealed a discrepancy in a timeout value. For demonstration purposes, let's say you want to find every occurrence of this discrepancy within a project and reset the value accordingly.

  1. In the Navigator view, right-click Portal Lifecycle View and select Edit > Find And Replace.

  2. In the Find And Replace dialog that opens, set the criteria as follows:

    1. If it is not the current display, click the Properties tab.

    2. Select the Name and Value radio button.

    3. Enter Timeout for the property name.

    4. Enter 1000 for the current value.

    5. Enter 300 for the replacement value.

  3. Click Find. Notice the result of the operation.

  4. Click Replace to overwrite the current value with the replacement value.

    In a search results list with multiple entries, Application Configuration Console jumps to the next list entry. If you click Replace All, Application Configuration Console updates all entries in the list without any further interaction.

5.3.1 Other Things to Know About Find and Replace Operations

In addition to property and value searches, you can also search on the following:

  • Container names

  • Container metadata

  • Tracking or provision settings

  • Authentication pack settings

  • Host and endpoint settings

  • Resource specification settings

  • Group names and users in groups

Note:

All replacement property values are validated against stated requirements in Application Configuration Console so that you cannot set invalid values.