matomo-org / matomo-log-analytics

Import any kind of server logs in Matomo for powerful log analytics. Universal log file parsing and reporting.
https://matomo.org/log-analytics/
GNU General Public License v3.0
224 stars 118 forks source link

--downloads-extension does not skip other extensions #107

Open egouraud opened 8 years ago

egouraud commented 8 years ago

Hi there,

When importing logs with import_logs.py with a defined downloads-extension list, we can still view other extensions in the downloads tab.

for example:

--download-extension=doc,pdf,csv,xlsx

and i can see gif, js,etc...

shouldn't he skip other extensions than those specified in the command line?

thanks for you're great work :)

diosmosis commented 8 years ago

Are you using --enable-static? This should track static assets (like js/gif/css files) as downloads.

egouraud commented 8 years ago

nope,

here is my command line:

./import_logs.py --show-progress --show-progress-delay=30 --url=https://localhost --idsite=1 --recorders=24 --enable-http-errors --enable-http-redirects --enable-bots --strip-query-string --download-extensions=doc,docx,pdf,csv,xls,xlsx,ppt,pps,rtf,txt,avi,mov,mpeg,mpg --token-auth=XXXXXXX my_file.log

cheers,

diosmosis commented 8 years ago

Hi @egouraud, I won't be able to look at this for a couple days at least, unfortunately. In the mean time, could you post a log line that tracks a js/gif/css file w/ this command?

mattab commented 8 years ago

hi @egouraud would you mind attach small log file used to reproduce issue?

justnx commented 8 years ago

Looks similar to my issue #113 if i add --download-extensions=css,jpg,png instead of --enable-static My static files appear under "requests to static resources (css, js, images, ico, ttf...)" and with the switch --enable-static enabled they don't even get recognized as static files. So it seems the default pattern logic for static files is broken.