Add a log file to monitor on an infrastructure component

How to add a log file to monitor an infrastructure component.

Log files that are associated with infrastructure components (that is, logical components that can be bound to physical resources) can be configured for monitoring when the component is used in a test.

To add or modify a log file configuration for any of the supported components, double-click the component in the Logical View and select the Monitoring tab.

To add a log file configuration to the selected component, click Add and select Log File from the menu. If you want to copy an existing log file configuration, select its entry and click Copy. To remove an existing log file configuration, select its entry and click Remove.

The details of any log file configuration can be modified by using the Location, Format, Actions, and Advanced tabs. See the following topics for configuration details: Log file location and options, Log file format options, Log file actions, and Advanced log file options.

Log file location and options

Under the Location tab you can configure the path to the log file, the log file name, and options for controlling whether to use a wildcard match for the log file (for example, *.log) and how to treat multiple files that match a specified wildcard.

In the Path field, enter the full path to the location where log files attached to the selected component are stored. By default, the path is c:\domain\deployment\.

In the File field, enter the name of the log file to be monitored. Wildcard entries can be used for the file name (for example, *.log, *.txt). If you are using a wildcard, ensure that the appropriate matching options are selected under Options.

Under Options, enable one or both of the available matching options, as follows:

Log file format options

Under the Format tab you can configure the format of individual log file entries so that IBM® Rational® Integration Tester can distinguish one entry from the next, timestamp options to help recognize the timestamp format that is used in the selected log file, and technical correlation matching options to identify different transactions that are logged.

Entry format

In the Entity field, enter a regex that defines a single event (entity) in the log. The specified expression must match the start of one entity and any text that comes before the start of the next.

In the Treat gaps between entries as panel, select one of the four options to define howRational Integration Tester treats any gaps that it finds in the log, as follows:

If you click the Edit button to the right of the Entity field, the regex editor is displayed, showing a sample of the log file that is defined under the Format tab.

You can edit the expression in the Regex field and view a live preview of the entities that it defines. Matching entities are colored (alternatively) blue and green to illustrate how the expression behaves at run time.

You can build expressions by selecting a portion of the preview text. Once you release the mouse button, the expressions are displayed in a menu. To use one of the suggestions, simply click the entry in the list. To close the menu without using one of the suggested expressions, select the Close menu option at the top of the list.

To save any changes you made to the expression, click OK. To return to the log file configuration without applying any changes, click Cancel.

Timestamp

The Timestamp settings are optional, but they can be used to help Rational Integration Tester determine how to present timestamps within the log file, and calculate when a specific entry was written since logs are generated in an asynchronous manner.

The options under Timestamp can be used as follows:

In the Treat entries without timestamps as panel, select one of the three options to define how Rational Integration Tester treats entities that are missing timestamps, as follows

Technical correlation

The options under Technical Correlation can be used to identify separate transactions that were logged concurrently.

In the Regex field, enter a regular expression that identifies a unique transaction ID within log entities (For more information, see the previous topic, Entry Format, about using the expression editor).

In the Treat unresolved entries as panel, select one of the five options to define how Rational Integration Tester treats entities that do not contain the transaction ID, as follows

Log file actions

Under the Actions tab you can define specific test actions that are to be taken when a log entity matches the specified expression.

To add an action to the list, click the icon.

For each action in the list, check the box under Enabledto apply the action to tests at run time. To leave the action in the list but not use it at run time, leave the Enabled check box empty.

Double-click the field under Match to preview the log file and create an expression to match within entities. You can enter the expression manually, or use the expression editor as described (under Log file format options).

From the Action field, select one of the following three actions to take when the specified expression is matched in a log entity:

Note: Actions are matched in the order that they are defined in the editor. If no actions are defined or none of the defined actions are matched, the entry is sent to the test console as a normal message.

To remove an action from the list, click the icon.

Advanced log file options

Use the options under the Advanced tab to configure log file encoding and the method to use for determining if/when the log file rolls over.

Under Character Set, from the File Encoding menu, select the one of the available encoding methods to use when you are processing the log file.

The Rollover method helps to determine when the log file is rolled over and a new file is started. This option is not currently used, however, and the default value (When file shrinks) must be left unchanged.


Feedback