Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piwik Log Utility not parsing the log file. #12769

Closed
ghost opened this issue Apr 25, 2018 · 1 comment
Closed

Piwik Log Utility not parsing the log file. #12769

ghost opened this issue Apr 25, 2018 · 1 comment
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@ghost
Copy link

ghost commented Apr 25, 2018

Hi,

We are trying to use the link:- https://matomo.org/docs/log-analytics-tool-how-to/
for parsing our access.log in our Sonarqube server logs folder. However, whenever we try to do this, it keeps giving us this error:-

0 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)

=====> Warning: File log_file=./access.log does not exist <=====

Logs import summary

0 requests imported successfully
0 requests were downloads
0 requests ignored:
    0 HTTP errors
    0 HTTP redirects
    0 invalid log lines
    0 requests did not match any known site
    0 requests did not match any --hostname
    0 requests done by bots, search engines...
    0 requests to static resources (css, js, images, ico, ttf...)
    0 requests to file downloads did not match any --download-extensions

Website import summary

0 requests imported to 1 sites
    1 sites already existed
    0 sites were created:

0 distinct hostnames did not match any existing site:

Performance summary

Total time: 0 seconds
Requests imported per second: 0.0 requests per second

This is the command that we use:-
$ python ./import_logs.py --url=http://hostname/piwik --idsite=4 --token-auth= --show-progress log_file=./access.log --login=XXXXXX --password=XXXXXX --enable-static --enable-bots

Now, the import.py is present in the logs folder where the access.log is also present. However, we still get this error.

Can you please tell us what is wrong here and how to fix it?

Thanks,
Jitesh

@fdellwing
Copy link
Contributor

fdellwing commented Apr 26, 2018

=====> Warning: File log_file=./access.log does not exist <=====

Try using an absolute path to your logfile.


Edit:

I now see your error, you need to run your command like this: python ./import_logs.py --url=http://hostname/piwik --idsite=4 --token-auth= --show-progress --login=XXXXXX --password=XXXXXX --enable-static --enable-bots access.log

Oh and you are probably parameters that are not needed. The command should just run fine like this:
/var/www/becker-stats/misc/log-analytics/import_logs.py --recorders=4 --url=https://becker-stats.live.promato.de --idsite=1 /var/log/nginx/becker-global-access.log.1 > /dev/null

@mattab mattab closed this as completed Apr 26, 2018
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants