Skip to Content

Introduction

This document explains the basic workflow of enabling Apache tomcat access log, reading the logs, extracting the data into database using SAP DataServices and perform Web Intelligence reporting using BI platform.


Requirement

Apache load balancer and Tomcat access logs are required in normal operational support which captures the information about webpage access status like the ipaddress, application resource accessed, return status with timestamps. This is required to troubleshoot the performance issues on tomcat and apache load balancer and many other useful information.

Concept Designing

Approach to design the complete scenario for this requirement is here as following :

  • Enable Apache load balancer and tomcat access log
  • Using SAP DataServices designer, create a dataflow to read flatfile access logs and transform and store into database
  • Create universe in IDT based on above database tables and Web Intelligence report to read the required data
  • Enable Web Intelligence report for mobile application like iPad, iPhone

    

     a) Enable log rotation for mod_jk apache module and access log

Apache http access log configuration can be done by adding below line in <PATH of APACHE 2.2>\conf\httpd.txt

CustomLog “logs/access.log” common

Access logs can be found in <PATH of APACHE 2.2>\logs\access.dd-mmm-yyyy-hh_mm_ss.log

Additionally, log rotation for access log can be configured like below :

  CustomLog “|bin/rotatelogs -l logs/access.%d-%b-%Y-%H_%M_%S.log 5M” common


     b) Enable Access log for Tomcat

Tomcat logs can have access.log similar to apache http server which has the details of ipaddresses, return codes of HTTP requests, URL etc.

Enable below line in conf/server.xml

<Valve className=”org.apache.catalina.valves.AccessLogValve” directory=”logs” prefix=”localhost_access_log.” suffix=”.txt” pattern=”common” resolveHosts=”false”/>

Tomcat access logs will be created in <Path of Tomcat Installation directoy>/logs/localhost_access_log.yyyy-mm-dd.txt

    

     c) Read access log

Tomcat access log can we read from DataServices to read flat file and transform the required data and columns in target database, for e.g. MS SQL 2008

Instead of validation, there could be transformation or nothing. All records from source flat file could be read from tomcat and apache logs directory and data could be stored in target database.

Schedule this Data services job with particular frequency to store all the records from access log to database.


                        


     d) Prepare Web Intelligence Report

Create universe in Information design tool based on the table created in MS SQL having access log records. Use this universe to create a report using Web Intelligence rich client or BI Launchpad Web Intelligence editor. Choose the selected columns in your report to see the required for later analysis.

    

     e) Prepare the Web Intelligence reporting for iPad/iPhone

Once the Web Intelligence report is ready for display in BI Launchpad and CMC, this document can be categorized into Mobile to be visible on the iOS devices. You can refer to the document as mentioned in the References to configure mobile settings at tomcat webapp level and then into BO as mobile category.

Open the ipad app SAP BI and connect to your BI platform, Web Intelligence report should appear there which was recently refreshed.

You can also schedule Web Intelligence report to refresh the datasets from database to have the latest instance available at ipad automatically.



Reference(s) :

                    http://httpd.apache.org/docs/2.2/howto/auth.html

                    http://httpd.apache.org/docs/2.2/mod/mod_status.html

                    http://wiki.apache.org/tomcat/FAQ/Logging

                        http://scn.sap.com/community/mobile/businessobjects/blog/2013/10/10/how-to-connect-sap-bo-mobile-to-a-bi-server-40


To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply