Skip to main content
Pentaho Documentation

Performance Monitoring and Logging

Overview

To help you maintain the health of your Pentaho system, we provide features that help you diagnose processing errors and monitor the BA Server performance.

To help you maintain the health of your Pentaho system, we provide features that help you diagnose processing errors and monitor the BA Server performance.

Disable Server and Session-Related Timeouts to Debug

Follow the instructions below to disable server and session timeouts associated with the User Console.

Important: These instructions are applicable when you are in a test environment. Once you go live, it is recommended that you set your timeouts to five or ten minutes so that sensitive BA Server-related data can be protected. The time must be expressed in minutes.
  1. Open the file, server.xml, located under …\biserver-ee\tomcat\conf.
  2. Find the connectionTimeout="20000" parameter and change its value to zero ("0"). If this value is set to a negative number it will never timeout.
  3. Open the file web.xml, located under ... \bi-server_ee\tomcat\webapps\penaho\WEB-INF\web.xml.
  4. Find the session-timeout parameter and change its value to negative one ("-1").
  5. Save the file and refresh the user console.

Log Rotation

This procedure assumes that you do not have or do not want to use an operating system-level log rotation service. If you are using such a service on your Pentaho server, connect to the BA Server and Data Integration Server and use that instead of implementing this solution.

The Business Analysis and Data Integration servers use the Apache log4j Java logging framework to store server feedback. The default settings in the log4j.xml configuration file may be too verbose and grow too large for some production environments. Follow these instructions to modify the settings so that Pentaho server log files are rotated and compressed.

  1. Stop all relevant Pentaho servers.
  2. Download a .zip archive of the Apache Extras Companion for log4j package: Apache Logging Services.
  3. Unpack the apache-log4j-extras JAR file from the zip archive, and copy it to the following locations:
    • Business Analytics Server: /tomcat/webapps/pentaho/WEB-INF/lib/
    • Data Integration Server: /tomcat/webapps/pentaho-di/WEB-INF/lib/
  4. Edit the log4j.xml settings file for each server that you are configuring. The files are in the following locations:
    • BA Server: /tomcat/webapps/pentaho/WEB-INF/classes/
    • DI Server: /tomcat/webapps/pentaho-di/WEB-INF/classes/
  5. Remove all PENTAHOCONSOLE appenders from the configuration.
  6. Modify the PENTAHOFILE appenders to match the log rotation conditions that you prefer. You may need to consult the log4j documentation to learn more about configuration options. Two examples that many Pentaho customers find useful are listed:

    Daily (date-based) log rotation with compression:

    <appender name="PENTAHOFILE" class="org.apache.log4j.rolling.RollingFileAppender">
        <!-- The active file to log to; this example is for BA/DI Server.-->
        <param name="File" value="../logs/pentaho.log" />
        <param name="Append" value="false" />
        <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
            <!-- See javadoc for TimeBasedRollingPolicy -->
            <param name="FileNamePattern" value="../logs/pentaho.%d.log.gz" />
        </rollingPolicy>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
        </layout>
    </appender>
    

    Size-based log rotation with compression:

    <appender name="PENTAHOFILE" class="org.apache.log4j.rolling.RollingFileAppender">
        <!-- The active file to log to; this example is for BA/DI Server.-->
        <param name="File" value="../logs/pentaho.log" />
        <param name="Append" value="false" />
        <rollingPolicy class="org.apache.log4j.rolling.FixedWindowRollingPolicy">
            <param name="FileNamePattern" value="../logs/pentaho.%i.log.gz" />
            <param name="maxIndex" value="10" />
            <param name="minIndex" value="1" />
        </rollingPolicy>
        <triggeringPolicy class="org.apache.log4j.rolling.SizeBasedTriggeringPolicy">
            <!-- size in bytes -->
            <param name="MaxFileSize" value="10000000" />
        </triggeringPolicy>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d %-5p [%c] %m%n" />
        </layout>
    </appender>
    
  7. Save and close the file, then start all affected servers to test the configuration.
You have an independent log rotation system in place for all modified Pentaho servers.

Define Result Row Limit and Timeout

When a query in the User Console returns an unusually large number of rows, this may impact server performance. To limit the number of rows returned by a query and to set up a timeout, you must create two custom properties, max_rows and timeout, in the Metadata Editor.

The values you define for the row number limit (max-rows) and timeout properties are passed to the JDBC driver.

To define max rows and timeout...

  1. In the Metadata Editor, expand the Business Model node and select Orders.
  2. Right-click Orders and choose Edit. The Business Model Properties page displays a list of properties that were previously defined.
  3. In the Business Model Properties page, click the Add icon. The Add New Property page dialog box appears.
  4. Enable Add a custom property.
  5. In the ID text box, type max_rows. IMPORTANT: The ID is case-sensitive and must be typed exactly as shown.
  6. Click the down-arrow in the Type field and choose, Numeric. The Business Model Properties page appears. The max_rows property is listed under Custom in the navigation tree.
  7. In the right pane, under Custom, enter a value for your max_rows property. For example, if you enter "3000" as your value, the number of rows allowed to display in a query result is constrained to 3,000.
  8. Repeat steps 3 through 6 to for the timeout custom property.
  9. In the right pane, under Custom, enter a value for your timeout property. The timeout property requires a numeric value defined in number of seconds. For example, if you enter, 3600, the limit for query results is one minute.
  10. Click OK in the Business Model Properties page to save your newly created properties.