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

customlog with import_logs.py #4207

Closed
anonymous-matomo-user opened this issue Oct 8, 2013 · 1 comment
Closed

customlog with import_logs.py #4207

anonymous-matomo-user opened this issue Oct 8, 2013 · 1 comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.

Comments

@anonymous-matomo-user
Copy link

Hello,

i'm using piwik version 1.12 and i'm having problems parsing my apache custom catchall log through import_logs.py.

I am using a heavily modified apache from parallels POA with its own logging module but the logging format is similar to this:

LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %V"

eventhough i'm using --add-sites-new-hosts, import_logs parses the log file correctly and it isn't adding the virtual hosts that exist in the logfile:

/usr/local/bin/python2.7 /var/www/html/piwik/misc/log-analytics/import_logs.py --url=http://awstatslocal/piwik --debug --add-sites-new-hosts --log-format-regex='(?P<ip>\S+) \S+ \S+ (?P<timezone>._?) "\S+ (?P<path>.?) \S+" (?P<status>\S+) (?P<length>\S+) "(?P<referrer>.?) (?P<user_agent>.*?)" (?P<host>)' /logs/daily/logmerge.log

2013-10-08 12:47:34,568: [DEBUG] Creating a Piwik site for hostname
2013-10-08 12:47:34,637: [ERROR] Couldn't create a Piwik site for host : Please specify a value for 'siteName'.

Logs import summary

12249 requests imported successfully
8536 requests were downloads
165140 requests ignored:
    0 invalid log lines
    17553 requests done by bots, search engines, ...
    4019 HTTP errors
    330 HTTP redirects
    130989 requests to static resources (css, js, ...)
    **12249 requests did not match any known site**
    0 requests did not match any requested hostname

Website import summary

12249 requests imported to 0 sites
    0 sites already existed
    **0 sites were created**:

1 distinct hostnames did not match any existing site:

How could this be possible?

@mattab
Copy link
Member

mattab commented Oct 23, 2013

PLease use the forums for support: http://forum.piwik.org/

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants