kidino
December 24, 2013, 11:43am
1
I am trying to get the Analytic Tool to work with S3 logs. After downloading the logs, I combine all the logs with
cat /tmplog/* > access.log
And then I called the following command
sudo python /vhosts/piwik/misc/log-analytics/import_logs.py --url=https://mybucket.s3-ap-southeast-1.amazonaws.com /home/ubuntu/s3logs/es_access.log --idsite=2 --log-format-name=s3
But I keep getting the following error
Fatal error: Precondition Failed
Any ideas?
kidino
December 24, 2013, 12:18pm
2
OK, I think I am missing the --token-auth= … but now I am getting a different error
Traceback (most recent call last):
File "/vhosts/piwik/misc/log-analytics/import_logs.py", line 1691, in <module>
resolver = config.get_resolver()
File "/vhosts/piwik/misc/log-analytics/import_logs.py", line 601, in get_resolver
return StaticResolver(self.options.site_id)
File "/vhosts/piwik/misc/log-analytics/import_logs.py", line 946, in __init__
'SitesManager.getSiteFromId', idSite=self.site_id
File "/vhosts/piwik/misc/log-analytics/import_logs.py", line 928, in call_api
return cls._call_wrapper(cls._call_api, None, None, method, **kwargs)
File "/vhosts/piwik/misc/log-analytics/import_logs.py", line 917, in _call_wrapper
raise Piwik.Error(message)
__main__.Error: Precondition Failed
kidino
December 24, 2013, 12:27pm
3
OK. Silly me … the --url parameter is for your Piwik installation URL. I thought it was for your S3 bucket address. Got that sorted out but it’s not putting in the data. I see some numbers in the command line, but in Piwik did not display anything. I want to track at least WEBSITE.GET.OBJECT which are like website hits.
kidino
December 24, 2013, 12:52pm
4
Actually, I want to be able to track
Any ideas how I can achieve these?
That’s what I’m looking to do…any updates?
matthieu
(Matthieu Aubry)
January 5, 2015, 1:33am
6