Skip to content

Commit 36784fb

Browse files
committed
Excluding torrent clients from logs
When importing raw HTTP logs into matomo, we are now excluding all lines for which the user agent match a list of predefined torrent clients. The code looks for “excluded string” inside the “User-Agent” one which is why our list consists only of names. The list has been assembled from client names and not actual User-Agent
1 parent 2870c46 commit 36784fb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

matomo-log-analytics/Dockerfile

+11-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,17 @@ RUN { \
2222
echo 'if [ ! -z "$USE_SUFFIXED_LOG" ] ; then' ; \
2323
echo ' export LOG_PATH=$LOG_PATH-$(date +"%Y%m%d")' ; \
2424
echo 'fi' ; \
25-
echo 'import_logs.py --enable-http-redirects --include-host=$HOST --idsite=$MATOMO_SITE_ID --url=$MATOMO_URL --token-auth=$MATOMO_TOKEN $LOG_PATH' ; \
25+
echo 'import_logs.py --useragent-exclude qbittorrent --useragent-exclude libtorrent \
26+
--useragent-exclude vuze --useragent-exclude deluge --useragent-exclude utorrent \
27+
--useragent-exclude bittorrent --useragent-exclude biglybt \
28+
--useragent-exclude bitcomet --useragent-exclude bitlord \
29+
--useragent-exclude frostwire --useragent-exclude kget \
30+
--useragent-exclude ktorrent --useragent-exclude limewire \
31+
--useragent-exclude mldonkey --useragent-exclude rtorrent \
32+
--useragent-exclude robert --useragent-exclude shareaza --useragent-exclude tixati \
33+
--useragent-exclude tonido --useragent-exclude transmission \
34+
--useragent-exclude tribler --useragent-exclude xunlei \
35+
--enable-http-redirects --include-host=$HOST --idsite=$MATOMO_SITE_ID --url=$MATOMO_URL --token-auth=$MATOMO_TOKEN $LOG_PATH' ; \
2636
} > /usr/local/bin/import-log && chmod +x /usr/local/bin/import-log
2737

2838
CMD ["import-log"]

0 commit comments

Comments
 (0)