## Working with the Apache Log Correlation/Analyzer Sample

## Introduction

This sample demonstrates the ability to analyze and correlate log files using the Hyades tools.

## Contents

This sample will use a symptom database to analyze an Apache error log. In addition, a time-based correlation will occur on the Apache access log. The user can view the results of the analysis and correlation by exploring the various views within the Profile and Logging Perspective.

## Requirements

Hyades 1.2.0 or above.

## Viewing the Apache Server access.log file

1. Click on the Profiling Monitor tab on the Profiling and Logging Perspective.
2. Expand the tree view.
3. Click on the <terminated> Access Log File child element.
4. From the pop-up menu of the selected child element, select Open With > Log View.
5. Click on any log records from the Log View and view its properties.

## Viewing the Apache error.log file

1. Click on the Profiling Monitor tab on the Profiling and Logging Perspective.
2. Expand the tree view.
3. Click on the <terminated> Error Log File child element.
4. From the pop-up menu of the selected child element, select Open With > Log View.
5. Click on any log records from the Log View and view its properties.

## Displaying the Apache Log files in the Log Interactions view

1. Click on the Profiling Monitor tab on the Profiling and Logging Perspective.
2. Expand the tree view.
3. Click on the <hostname> child element where <hostname> is the local hostname.
4. From the pop-up menu of the selected child element, select Open With > Log interactions.
5. Click Cancel on the Select Log Records Correlation Schema dialog.

## Performing a Time-based correlation on the Apache Log files

1. Click on the Profiling Monitor tab on the Profiling and Logging Perspective.
2. Expand the tree view.
3. Click on the <hostname> child element where <hostname> is the local hostname.
4. From the pop-up menu of the selected child element, select Open With > Log interactions.
5. Select the Default Time correlation schema in the Select Log Records Correlation Schema dialog.
6. Click OK.
7. In the Sequence Diagram:Log interactions view, the interactions between the two logs are displayed.
8. From the pop-up menu of any square (log record), select Log View to views the selected log record in the Log View.

## Analyzing the Apache access or error log records

1. Click on the Profiling Monitor tab on the Profiling and Logging Perspective.
2. Expand the tree view.
3. Click on the <terminated> Error Log File or <terminated> Access Log File child element.
4. From the pop-up menu of the selected child element, select Open With > Log View.
5. From the pop-up menu of any log record in the in the Log Records pane, select Analyze All > Default Log Analyzer. Log records associated with a symptom match will be indicated by a filled, blue square in the background.
6. Click on the Analysis Result tab in the Log View for a selected log record to view the explanation of the problem and any possible recommendation(s) to fix the problem.