Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
fredrik_borlie
Contributor
0 Kudos

I have always lacked the feature of eg apache where the web server generated an accesslog which I then could attach to an awstats server.

But one day I decided to dig down to the logging feature and realized that it might be possible to have the ICM to generate an access log.

As I see it, it is not the import of the log that is the problem, it is the generation of the log that is cumbersome.

To make sure that all relevant fields are added to the log entry.

Prerequisites:

Authorization to change system parameters

Web server that contains awstats (http://www.awstats.org/)

Step 1:

Analyse logging parameters.

http://help.sap.com/saphelp_nwpi711/helpdata/en/48/442541e0804bb8e10000000a42189b/content.htm

Quite straight forward.

Compare the SAP standard with the Apache standard log settings.

SAP

No real default, but CLF and CLFMOD are proposed:

CLF - %h %l %u %t "%r" %s %b

CLFMOD - %h %l %u %t "%r2" %s %b

Apache

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

And AWSTATS.

LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"

Step 2:

Decide on parameters to include.

I am very interested in the referrer and User agent so that must be included.

That means to enhance the SAP string with more parameters.

Comparing the name with wanted feature gave me following list of parameters.

LOGFORMAT=%h %l %u %t "%r" %s %b "%{referer}i" "%{user-agent}i"

Step 3:

Activate Logging

Activate logging is done by adding the logging parameter to the instance profile via RZ10.

This is my setting:

I also want the log file name to change name everyday .

Now the server needs to be restarted. (Eventually just restarting ICM is enough).

And the log file is generated.

Step 4:

Generate awstats

With the logs present we can now generate our awstats page.

And since I replicated another log I had for another server I could easily clone the config and automate the generation.

I have attached an example HTML which unfortunately have image and other links broken.

But feel encouraged that it is possible to generate awstats from an SAP-system and do return with your comments and improvements.

Both the ABAP system as well the Java system has this logging feature. I have only tested the ABAP server, yet.

Good luck

/Fredrik

Labels in this area