Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Statistics log is the same as the audit log, except the personal identifying user principal information personally identifiable information (PII) is not shown.

This log is useful for statistical analysis or in for cases where access to personally identifiable information is tightly controlled.

Image Modified

Figure 1: Statistics Log – someone (unidentified) has logged out. Another user (unidentified) accessed Logviewer application.

Enabling Statistics Log

Statistics Log is disabled by default to maximize system performance.

To enable Statistics Log please edit the configuration file (logback.xml replacing log4j.properties since SSO 9.1)

Configuring via logback.xml file (SSO >= 9.1)

The logback.xml file is located in ubilogin customization directory (ubilogin.

Note

If you have a SSO cluster installation you need to configure both nodes in the same way.


Enabling in logger configuration

In order to start creating Statistics log events, you need to edit the logger configuration file which resides in the following location in the default installation:

Windows:

Code Block
themeDefault
C:\Program Files\Ubisecure\ubilogin-sso\ubilogin\custom\logging\include-logback.xml

Linux: 

Code Block
themeDefault
/usr/local/ubisecure/ubilogin-sso/ubilogin/custom/logging/include-logback.xml

...

Statistics log is disabled by default as the default level for it is OFF. To enable Statistics Log log please add statistics=info to the turboFilter <DefaultLevels> configuration:

Code Block
<configuration>
      <!-- (1) Default levels for Diagnostic logs entry types -->
  <turboFilter class="com.ubisecure.common.logging.MarkerBasedLogFilter">
        <DefaultLevels>audit=info;tech=info;diag.*=info;statistics=info</DefaultLevels>
    </turboFilter>
...
</configuration>

The pattern and appender configuration for this logger is configured by default to:

Code Block
<configuration>
...
    <property name="AUDIT_FILE_LOG_PATTERN"
              value=""%d{'yyyy-MM-dd HH:mm:ss,SSS'}",%msg%n" />
...
    <appender name="STATISTICS_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
...
        </filter>
        <encoder>
            <pattern>${AUDIT_FILE_LOG_PATTERN}</pattern>
        </encoder>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${UAS_LOG_FILE}_statistics.%d{yyyy-MM-dd}.log</fileNamePattern>
...
        </rollingPolicy>
    </appender>
...
</configuration>

More examples of Logback configuration can be found in Diag log description section. 

Configuring via log4j.properties file (SSO <= 9.0)

To enable Statistics Log please edit the following file with a text editor:

Windows:

Code Block
themeDefault
C:\Program Files\Ubisecure\ubilogin-sso\ubilogin\webapps\ubilogin\WEB-INF\log4j.properties

Linux: 

Code Block
themeDefault
/usr/local/Ubisecure/ubilogin-sso/ubilogin/webapps/ubilogin/WEB-INF/log4j.properties

Add or uncomment the following line is present

Code Block
themeDefault
log4j.logger.ubilogin.statistics = INFO, Statistics

Details about the logger configuration in Understanding SSO logger configuration.

If you don't want to change the default level in the logger configuration, you may also enable or disable Statistics log in the SSO Management UI Logging view by switching the level between OFF and INFO. Changing via UI affects to both nodes in the cluster.

Image Added

Figure 2: SSO Management UI Logging view

Enabling in Log Viewer

Edit the following file with a text editor to enable the log in the Log Viewer:

...

Code Block
themeDefault
/usr/local/Ubisecureubisecure/ubilogin-sso/ubilogin/webapps/logviewer/WEB-INF/filesource.properties

Add the following section, modifying XX to a unique sequential number

Code Block
themeDefault
# UAS Statistics
logsource.FileSource.filetype.XX.name = UAS Statistics
logsource.FileSource.filetype.XX.type = statistics
logsource.FileSource.filetype.XX.path = C\:\\Program Files\\Ubisecure\\ubilogin-sso\\ubilogin/logs
logsource.FileSource.filetype.XX.filename = uas3_statistics.%YYYY-%MM-%DD.log

...

Code Block
themeDefault
/usr/local/Ubisecureubisecure/ubilogin-sso/ubilogin/webapps/config/tomcat/update.sh