-
Notifications
You must be signed in to change notification settings - Fork 118
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
if hostname has no http in it importer together with docker-matomo fails to file ip- adresses clients correctly #354
Comments
I have more proof the script is flawed, or at least it fails to add client-ip's into the database as one would expect. A direct query on the docker database shows all client-ip's to be 0.0.0.0
|
@hanscees What are your anonymization settings in Matomo. Did you maybe configure it to fully discard the IP address? |
Hi, I do not send an token_auth. Here's my system diagnostic attached |
I have found the error. Not in the script of course... In the website url I had
but I needed to add
However, after in this setting it red in a few lines succesfully, showing them on the worldmap, the website changed the url automagically to the url with |
So if the bug is indeed that matomo web-application cannot have a hostname without I can of course change the script to add |
I changed this bit of code in the importer script and now it parses the loglines correctly, or rather it inserts Notice it works with this regeps (HOST SHOULD BE DEFINED)
What a bitch of a bug
|
Now the question is, will matomo fix it? Because my code is just proof of concept with typoos. |
Hi,
I am trying to read in logfiles, but in the dashboard all visitors seem to be ip address 0.0.0.0 and I assume that is why the worldmap does not show visitors per country of city.
I am reading in loglines like these:
154.12.103.62 www.bomengids.nl - - [22/May/2023:00:00:18 +0200] "GET /knop.html HTTP/1.1" 200 40139 "-" "newspaper/0.2.8" 51.159.154.15 www.bomengids.nl - - [22/May/2023:00:00:18 +0200] "GET /winter/Hollandse_iep__Ulmus_hollandica__Dutch_Elm@1@img_91 98knop_th.jpg HTTP/1.1" 200 9067 "https://www.bomengids.nl/knop.html" "newspaper/0.2.8" 104.227.93.210 www.bomengids.nl - - [22/May/2023:00:00:20 +0200] "GET /winter/Hollandse_iep__Ulmus_hollandica__Dutch_Elm@1@img_9 198knop_th.jpg HTTP/1.1" 200 9067 "-" "python-requests/2.28.2"
I am using this regexps to read them in:
--log-format-regex='((?P<ip>\S+) (?P<host>\S+) \S+ \S+ \[(?P<date>.*?) (?P<timezone>.*?)\] "GET (?P<path>.*?) HTTP/\S+" (?P<status>\S+) (?P<length>\S+) "(?P<referrer>.*?)" "(?P<user_agent>.*?)").*'
python3 ../import_logs1.py --url http://192.168.0.61:8080 --login hanscees@hanscees.con --password seclet --idsite=3 --enable-static --log-format-regex='((?P<ip>\S+) (?P<host>\S+) \S+ \S+ \[(?P<date>.*?) (?P<timezone>.*?)\] "GET (?P<path>.*?) HTTP/\S+" (?P<status>\S+) (?P<length>\S+) "(?P<referrer>.*?)" "(?P<user_agent>.*?)").*' testlog
This seems to work as a tcpdump shows this:
`
98713}, {"rec": "1", "apiv": "1", "url": "https://www.bomengids.nl/zomer2004/pics/Trompetboom__Catalpa_bignonioides__Southern_catalpaimg_4697blad.jpg", "urlref": "https://arnfoto.ru/", "cip": "89.113.127.50", "cdt": "2023-05-15 21:58:33", "idsite": "3", "queuedtracking": "0", "dp": "1", "ua": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Safari/537.36", "cvar": "{"1": ["HTTP-code", "200"]}", "download": "https://www.bomengids.nl/zomer2004/pics/Trompetboom__Catalpa_bignonioides__Southern_catalpaimg_4697blad.jpg", "bw_bytes": 98713}]}
`
so the script seems to tell the matomo server client ip is for instance 89.113.127.50.
Is my assumpion correct that the regexps is correct goven the tcpdump data?
If so, why do visitor logs show every visit to be from 0.0.0.0?
The text was updated successfully, but these errors were encountered: