Thursday, March 6, 2008

ITMWI 5..1.X Apache_Performance resource model will fail with custom log format

The ITMWI Apache_Performance resource model parses the Apache log file written in the STANDARD (aka provided by Apache) common or combined format, shown here (from the httpd.conf file):

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


If you define your own custom format to use, then the resource model will go into an Error state.

A fix for this (if you want to use a custom format) is to tell Apache to log to file A using one of the supported formats, and log to your own file with your custom format. You could do that with the following two lines:

CustomLog /http/logs/access_log my_custom_format
CustomLog /tmp/itmwi_apachelog common


No comments: