wiki:Software/Configuration/SystemEzproxy
Last modified 7 years ago Last modified on 08/22/12 17:25:59

How To: Monitor logs on EZproxy

Ezproxy log files can be parsed by finding the XML fragment shown below in the <raptor-ica-install>/conf/event-parse.xml file, and changing its enabled property from "false" to "true".

<bean id="ezproxyLFP" class="uk.ac.cardiff.raptor.parse.external.file.LogFileParser">
                    <property name="enabled" value="true" />
                    <property name="eventHandler">
                        <ref bean="memoryEventHandler"></ref>
                    </property>
                    <property name="logfile">
                        <value>file:///opt/ezproxy/logs/ezproxy-DATE.log
                        </value>
                    </property>
                    ...
  

The Shibboleth 2.x configuration should then be disabled out i.e. at the top of the file , find the Shibboleth 2 IdP configuration and set its enabled property from true to false, as such:

<bean id="shibbolethAuditLFP" class="uk.ac.cardiff.raptor.parse.external.file.LogFileParser">
                    <property name="enabled" value="false" />
                     ...

The log file path can then be changed, if necessary, by changing the <property name="logfile"> property. Of note, the DATE literal string is substituted internally to the current system date in the format yyyyMMdd - this accommodates daily rolling Ezproxy log files (as setup shown in the section to follow).

Ezproxy Log File Setup

The default parser configuration for Raptor requires certain fields to be present in an Ezproxy log file. Consequently, the following Ezproxy log file configuration options should be specified in the <ezproxy-install>/config.txt file.

# Logs "IP Addr - Session ID - Username - Time - Request - Response Code - Bytes Tranferred"
LogFormat %h %{ezproxy-session}i %u %t "%r" %s %b

We strongly recomend that you also enabled daily log file rolling for Ezproxy, for example using the following setup.

# Set up log file location and daily log rolling
LogFile -strftime logs/ezproxy-%Y%m%d.log

This has two main advantages:

  • You should never generate a single log file that is too big for the local file system to store e.g. FAT32 is limited to files of 4GB in size.
  • If the ICA has to be restarted, it will only resend events to the MUA from the current days log file.