IP adresses in the sites list


#1

Hello,

I use import_logs.py with --add-sites-new-host option and some public IP adresses which I don’t know appear in the list, although I excluded ....

How can I disable these sites ?

Thanks for your help.


(Matthieu Aubry) #2

can you paste here a one-line log example where this issue can be reproduced?
along with the command line used to import and what you expected VS what you got?


#3

On the web servers :

import_logs.py --recorders=4 --token-auth=*******–url=$URL_PIWIK --add-sites-new-host $LOGFILE

On the Piwik server :

/usr/bin/php5 /var/www/piwik/console core:archive --force-all-websites --url=$URL_PIWIK

Example of Apache log :

www.mysite.fr 195.83.. - - [22/Sep/2014:10:55:46 +0200] “HEAD / HTTP/1.1” 200 - “-” “eZ Publish Link Validator”

www.mysite.fr is in Piwik but why 195.83.. ?


(Matthieu Aubry) #4

www.mysite.fr is in Piwik but why 195.83.. ?

I’m not sure I understand, what is the problem and what did you expect to see instead?


#5

195.83.. is the IP of the client and should not appear in the sites list.

I don’t know if it is added by import_logs.py --add-sites-new-host command or if the mistakes comes from the log format or console core:archive script.


(Matthieu Aubry) #6

Piwik needs an IP address and there’s this one in your log line. IF it’s not the ip of the user or bot who did the request then maybe you can consider changing server configuration so it logs as well the correct IP of the user?


#7

I don’t understand why some visitors IP become a new site in Piwik and why others are only recorded as visitor. The Apache logs format is the same in both cases.


#8

I’ve written a script which delete these sites with the Piwik API. Perhaps one day I will understand this behaviour…