I was trying to parse logs from Amazon ELB which uses a time format like "2014-09-01T23:55:10.147454Z". I didn't think %time5 would support microseconds, so I cleaned up the logs and I was using the format specified in the AWStats documentation ("Date and time with format iso: yyyy-mm-ddThh:mm:ss") resulting in a time entry of "2014-08-31T23:55:10".
I spent a significant amount of time thinking it was another line item causing the corruption, but after ruling out other variables, I changed %time5 to %time2 and used "2014-08-31 23:55:10" instead, and that solved the problem.
My server is an AWS EC2 instance on UTC time, so I don't think any time zone issue would come into play. The %time5 patch is here
Missed link in case you need a reference to %time5 introduction: http://sourceforge.net/p/awstats/patches/197/
I have similar issue with AWS ELB, how are you able convert to "2014-08-31 23:55:10" format to use %time2. do you mind if you share. thanks.
Hi Dan,
Here is the sed rule for removing the T:
cat ${s3_logs_dir}/* | sed -e "s/([0-9]{4}-[0-9]{2}-[0-9]{2})T/\1 /g" > combined.log
Thanks much Matt. Working perfectly. Appreciated your help.
Matt Beckman matt-beckman@users.sf.net wrote:
Related
Support Requests: #1778
A fix to work with time5 should be available with AWStats 7.4
2014-10-10 23:02 GMT+02:00 dan raindrop18@users.sf.net:
--
Laurent Destailleur (alias Eldy)
Social networks of my OpenSource projects:
Dolibarr Google+: https://plus.google.com/+DolibarrOrg/
Dolibarr Facebook: https://www.facebook.com/dolibarr
Dolibarr Twitter: http://www.twitter.com/dolibarr
AWStats Google+: https://plus.google.com/+AWStatsOrgPoject/
AWStats Facebook: https://www.facebook.com/awstats.org
AWStats Twitter: http://www.twitter.com/awstats_project
Related
Support Requests: #1778