Symptoms
Example:
Task name Retrieve traffic usage data (service_id = ID, host_id = ID, host_name = <HOSTNAME>)
Last execution output Malformed UsageInfo: period [-2147483413, 1394841835], resource 59151, location '/usr/local/pem/etc/logparser/traffic/<unixtime>'
Cause
For some reason, negative values were written to '/usr/local/pem/etc/logparser/traffic/<unixtime>'
for traffic resource into time fields. As a result, the logs cannot be processed during task execution.
Incorrect date values came from an Apache log (access_log
or ssl_access_log
) belonging to a specific webspace.
Resolution
Delete all the corrupted records (with negative values) from all affected files.
To delete the records, log in to the host where the task is being executed and find the relevant files:
# grep "usage from\=\"-" /usr/local/pem/etc/logparser/traffic/*
/usr/local/pem/etc/logparser/traffic/1394526009: <usage from="-2147483648" rti_id="59151" source="/usr/local/pem/vhosts/100941/log/ssl_access_log" to="-2147480048">16</usage>
/usr/local/pem/etc/logparser/traffic/1395141614: <usage from="-2147483648" rti_id="59151" source="/usr/local/pem/vhosts/100941/log/ssl_access_log" to="-2147480048">16</usage>
/usr/local/pem/etc/logparser/traffic/1396632040: <usage from="-2147483648" rti_id="59151" source="/usr/local/pem/vhosts/100941/log/ssl_access_log" to="-2147480048">16</usage>
Or use:
# grep "to\=\"-" /usr/local/pem/etc/logparser/traffic/*
Check that the original Apache logs exist for the dates when the affected files were created. The ID is in Unix time, which you can translate using the following command:
# echo 1394526009 | gawk '{print strftime("%c", $0)}'
Tue 11 Mar 2014 02:20:09 PM ALMT
# ls -la /usr/local/pem/etc/logparser/traffic/1394526009
-rw-r--r-- 1 root root 16747 Mar 11 16:22 /usr/local/pem/etc/logparser/traffic/1394526009
# ls -la /usr/local/pem/etc/logparser/traffic/1395141614
-rw-r--r-- 1 root root 17382 Mar 18 19:22 /usr/local/pem/etc/logparser/traffic/1395141614
# ls -la /usr/local/pem/etc/logparser/traffic/1396632040
-rw-r--r-- 1 root root 16986 Apr 5 01:23 /usr/local/pem/etc/logparser/traffic/1396632040
# ls -la /usr/local/pem/vhosts/100941/log/ssl_access_log*
-rw-r--r-- 1 root pemsrv 0 May 27 22:23 /usr/local/pem/vhosts/100941/log/ssl_access_log
-rw-r--r-- 1 root root 0 Jul 22 02:01 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed
-rw-r--r-- 1 root root 20 Jul 22 02:01 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed.1.gz
-rw-r--r-- 1 root root 15069728 Apr 7 2010 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed.2
-rw-r--r-- 1 root root 20 Jul 21 02:01 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed.2.gz
-rw-r--r-- 1 root root 13709801 Apr 6 2010 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed.3
-rw-r--r-- 1 root root 20 Jul 20 02:01 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed.3.gz
-rw-r--r-- 1 root root 20 Jul 19 02:01 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed.4.gz
-rw-r--r-- 1 root root 20 Jul 18 02:01 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed.5.gz
-rw-r--r-- 1 root root 20 Jul 17 02:00 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed.6.gz
-rw-r--r-- 1 root root 20 Jul 16 02:00 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed.7.gz
-rw-r--r-- 1 root root 20 Jul 15 02:01 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed.8.gz
-rw-r--r-- 1 root root 20 Jul 14 02:00 /usr/local/pem/vhosts/100941/log/ssl_access_log.processed.9.gz
If the logs still exist, please contact Parallels support.
In this case, the logs were rotated. Back up the traffic files and delete the lines that contain negative values, then re-run the task.