The PEM Log Analysis Expert analyzes the log files of servers that are registered with Postgres Enterprise Manager, and produces a report that provides an analysis of your Postgres cluster's usage based on log file entries. You can use information on the Log Analysis Expert reports to make decisions about optimizing your cluster usage and configuration to improve performance.Before using the PEM Log Analysis Expert, you must specify the Service ID on the Advanced tab of the Server Properties dialog, and use the Log Manager wizard to enable log collection by the PEM server.To open the Postgres Log Analysis Expert wizard, select the Postgres Log Analysis Expert... option from the Management menu of the PEM client. The wizard's Welcome dialog opens as shown in Figure 8.1, click Next to continue:The wizard's Analyzer selection dialog (see Figure 8.2) displays a list of Analyzers from which you can select. Each Analyzer generates a corresponding table, chart, or graph that contains information gleaned from the log files.Check the box to the left of an Analyzer to indicate that the Log Analysis Expert should prepare the corresponding table, chart or graph. After making your selections, click Next to continue to the Server selection tree control (see Figure 8.3).Use the tree control to specify which servers you would like the Postgres Log Analysis Expert to analyze. If you select multiple servers, the resulting report will contain the corresponding result set for each server in a separate (but continuous) list. Click Next to continue to the Report options dialog (see Figure 8.4).Use the fields in the Options section to specify the analysis method and the maximum length of any resulting tables:
• Use the Aggregate method drop-down to select the method used by the Log Analysis Expert to consolidate data for the selected time span. You can select from:
o SUM instructs the analyzer to calculate a value that is the sum of the collected values for the specified time span.
o AVG instructs the analyzer to calculate a value that is the average of the collected values for the specified time span.
o MAX instructs the analyzer to use the maximum value that occurs within a specified time span.
o MIN instructs the analyzer to use the minimum value that occurs within a specified time span.
• Use the Time span field to specify the number of minutes that the analyzer will incorporate into each calculation for a point on a graph. For example, if the Time span is 5 minutes, and the Aggregate method is AVG, each point on the given graph will contain the average value of the activity that occurred within a five minute time span.
• Use the Rows limit field to specify the maximum number of rows to include in a table.Use the fields in the Time Intervals section to specify the time range that the Log Analysis Expert will analyze:
• Set Relative days to Yes to enable the (+/-)From date field and specify the number of days before or after the date and time selected in the From field.
• Use the From field to specify the starting date and time for the analysis.
• Use the To field to specify the ending date and time for the analysis.
• Use the (+/-) From date selector to specify the number of days before or after the From date that should be included in the analysis.When you've specified the report options, click Next to continue to the Report destination dialog (see Figure 8.5).You can choose the default option and select Finish to view the Log Analysis Expert report in the PEM client's tabbed browser, or click the radio button next to Download the report to save a copy of the report to an HTML file for later use.