Search Engine: Elastic

Article ID: 115795, created on Mar 24, 2013, last review on May 12, 2014

  • Applies to:
  • Operations Automation 5.4

Linux logparser service

Disclaimer: this article is applicable to Standard Linux Shared Hosting, not to Linux Shared Hosting NG. Refer to article #114326 for information about Linux Shared Hosting NG in Parallels Operations Automation (POA).

The main purpose of the Parallels Operations Automation (POA) logparser service:

  • Calculate customers' website traffic usage and report it to POA

  • Initiate webalizer web statistics processing

The logparser service must be installed on every POA-managed Linux Shared Hosting server (as a corresponding POA package).

On a Linux server with the logparser service installed, POA creates a cron job like this to run the service:

30 1-23/3 * * * root
**/usr/local/pem/bin/** >/dev/null 2>&1

The script invokes the /usr/local/pem/bin/logparser binary, which processes Apache log files in all customer webspaces along with Apache and FTP log files. This traffic usage is then reported to POA.

The main logparser configuration files are:


For every customer's webspace, POA creates entries in the /usr/local/pem/etc/logparser/config.xml file to process Apache log files located in the webspace:

  • access_log
  • ssl_access_log
  • error_log

Log files for system services such as /var/log/httpd_access_log, /var/log/httpd_error_log, /usr/local/pem/ftp/ftp_log/VHOST_ID/xferlog and the like are defined in the above mentioned configuration files as well, so they are processed in the same way as logs of customer websites.

The checkpoints.xml file is updated with a timestamp when each log file is processed by the logparser service.

When the logparser binary is invoked by cron, it reads the XML configuration files and processes Apache logs in customer webspaces along with system log files. Once the traffic usage data stored in the logs is calculated, this is reported to POA.

The config.xml file also defines the log format for every single Apache log file. This is necessary for the logparser to be able to parse log files correctly, for example:

<format>%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"%v</format>;

During processing, the logparser also invokes the webalizer utility with parameters defined in the config.xml file to process web statistics for customer webspaces.

Logparser saves its own log in the /usr/local/pem/bin/logparser.log file on a Linux Shared Hosting server by default. Analyze this file to troubleshoot problems with log parsing and traffic usage collection in POA.

There are no logparser-related resource types in POA. The service is available for all customers with Linux Shared Hosting service subscriptions.

See Knowledgebase article #115790 Website Hosting: General information, Best Practices and Troubleshooting for more information.

caea8340e2d186a540518d08602aa065 5356b422f65bdad1c3e9edca5d74a1ae ac82ce33439a9c1feec4ff4f2f638899 2554725ed606193dd9bbce21365bed4e e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF