Log and analyze server side site data


Overview

WebSphere Portal implements a logging function for usage data. The portal writes usage records to a dedicated log file if site analysis logging is enabled. Multiple types of site analyzer loggers allow portal administrators to collect statistical data in various areas. The portal server manages the collection of data on its own, but from a business point of view you can also log custom details of business events. You can configure the portal for site analysis logging for the JSR 286 Web content viewer.

The portal configuration service, SiteAnalyzerLogService, determines the type of site analysis data that the portal logs at run time. Depending on the service configuration, the portal logs the following events:

The resulting log entries comply with the NCSA Combined industry standard. By analyzing the log entries, you can monitor applications running on the portal site. The site analysis infrastructure provided by the portal accommodates most scenarios.

To obtain a more sophisticated evaluation of the portal usage, or to generate reports for portlet actions, write a custom report to log custom business events that occur in portlets.

Site analysis logging is not enabled by default. To enable site analysis logging, specify the names and locations of the log files as values for the following parameters for WP SiteAnalyzerLogService for service configuration properties.

  1. Specify the names for the log files and backup log files.

    SiteAnalyzerFileHandler.fileName Location and filename of the log file. Default is:

      logs/$APPSERVER_NAME/sa.log
    SiteAnalyzerFileHandler.backupFileName Location and filename of the backup file for the log file. The default value is...

      logs/$APPSERVER_NAME/sa_$CREATE_TIME.log

    When the log file is backed up, the current data is stored in the backup file, sa_$CREATE_TIME.log, and a new log file, sa.log, is created.

    Tokens you can use as part of the directory location or file name:

    Token Description
    APPSERVER_NAME Use for vertical clusters to enforce that the different application servers write into different files if they share the same file system.
    CREATE_TIME Date and time the file is created. Specify the format of this token in this parameter:

      SiteAnalyzerFileHandler.dateFormat
    CLOSE_TIME Date and time the file is closed. Specify the format of this token in this parameter:

      SiteAnalyzerFileHandler.dateFormat

    For example, you can specify log file locations and names as follows:

      log/backup/$APPSERVER_NAME/sa_$CREATE_TIME_$CLOSE_TIME.log

    If WebSphere Portal is currently writing to a file, the values for $CLOSE_TIME and $CREATE_TIME are the same.

  2. Specify the date format for tokens in the log file names.

    SiteAnalyzerFileHandler.dateFormat Format the date and time for the $CLOSE_TIME and $CREATE_TIME tokens. For example...

      SiteAnalyzerFileHandler.dateFormat=yyyy.MM.dd-HH.mm.ss

  3. Specify the interval to back up log files.

    SiteAnalyzerFileHandler.minutesPerLogFile Backup interval in minutes. Specify a value between 1 and 60.
    hoursPerLogFile Backup interval in hours. Specify a value between 1 and 24.
    daysPerLogFile Backup interval in days. Specify any value that indicates the number of days between backups.

    If you enable more than one date format interval, the smallest interval is used.

    If you specify 60 minutes the file is backed up after 60 minutes. If you specify 1 hour, the file is backed up on the next full hour; for example, 01:00, 02:00 and so on. If you specify an interval of days, the file is backed up at 24:00 (midnight). For more information about the date format, see the Javadoc documentation for java.text.SimpleDateFormat.

  4. Activate loggers as appropriate.

    Select the logger you plan to activate and set the value to true. For example...

      SiteAnalyzerSessionLogger.isLogging=true

    Site analysis logging can impact performance. For this reason, you might choose to disable loggers when necessary. To disable loggers, set the value to false.

    The following table lists and describes available loggers:

    WebSphere Portal Server Analysis Logger Description and Activity Logged
    SiteAnalyzerSessionLogger.isLogging HTTP requests that include the URLs:

    /Command
    /Login
    /Command
    /Logout

    SiteAnalyzerUserManagementLogger.isLogging HTTP requests that include the URLs:

    /Command
    /UserManagement
    /CreateUser
    /Command
    /UserManagement
    /DeleteUser
    /Command
    /UserManagement
    /CreateGroup
    /Command
    /UserManagement
    /DeleteGroup

    SiteAnalyzerPageLogger.isLogging HTTP requests that include the URLs:

    /Page/*
    /Command
    /Customizer
    /CreatePage
    /Command
    /Customizer
    /EditPage
    /Command
    /Customizer
    /DeletePage

    SiteAnalyzerPortletLogger.isLogging HTTP requests that include the URLs:

    /Portlet/*

    SiteAnalyzerPortletActionLogger.isLogging HTTP requests that include the URLs:

    /PortletAction/*

    SiteAnalyzerErrorLogger.isLogging HTTP requests that include the URLs:

    /Error
    /Portlet
    Error
    Page

    The referrer field points to a portlet name or a page name. Examples of such referrer fields are:

    http://your.server.name/Portlet/1/PortletName
    http://your.server.name/Page/1/PageName

    SiteAnalyzerApplicationActionLogger.isLogging HTTP requests that include the URLs:

    /ApplicationAction/*

    SiteAnalyzerJSRPortletLogger.isLogging JSR 286 Web content viewer

  5. Restart WebSphere Portal.


Parent

Analyzing portal usage data

 


+

Search Tips   |   Advanced Search