Log Analytics


Hi ,
I'm trying to import the iis logs using the python script.
I get the Piwik login page when I hit http://myserver.com/analytics/piwik/index.php

I tried running all possible url combinations ,and it does not work.

attempt 1:

python import_logs.py --url=http://myserver.com/analytics/piwik --idsite=2 --login=piwik --password=Firmenich1 iis.log i get the error

Fatal error: Not Found

attempt 2:

python import_logs.py --url=[b]http://myserver.com/b] --idsite=2 --login=piwik --password=Firmenich1 iis.log i get the error

Fatal error: Piwik returned an invalid response:

It works!

attempt 3:

python import_logs.py --url=http://myserver.com/analytics/piwik/index.php --idsite=2 --login=piwik --password=Firmenich1 iis.log i get the error

Fatal error: Piwik returned an invalid response:



the URL parameter for the python script is the URL to access to piwik site
ex: --url=yourpiwikurl/piwik

Try also to check in general parameters of your piwik installation the valid host names.


I'm sorry ,i still don't get it .
I get the Piwik login page when i access http://myserver.com/analytics/piwik/index.php

so then my -url parameter should be http://myserver.com/analytics/piwik correct ?


Yes correct.

Give also to the python script the correct credentials to connect to piwik (a user with the good rights on the site analysed)
–login=LOGIN --password=PASSWORD


tried that … still giving the Fatal error: Not Found :frowning:


On the server your are trying to run the python script (the piwik server I assume) try this :

wget "http://myserver.com/analytics/piwik"

Do you have a valid response page ?


HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://myserver.com/analytics/piwik/ [following]
--2015-03-05 14:01:58-- http://myserver.com/analytics/piwik/
Reusing existing connection to myserver.com:80.
HTTP request sent, awaiting response... 200 OK


you should have a index.html saved.

In it, you should have something like this :

Piwik › Sign in
    <link rel="shortcut icon" href="plugins/CoreHome/images/favicon.ico"/>
    <link rel="stylesheet" type="text/css" href="index.php?module=Proxy&action=getCss&cb=fc0944f888544c8279f665c250699361" />

    <link rel="stylesheet" type="text/css" href="plugins/Login/stylesheets/login.css?cb=fc0944f888544c8279f665c250699361" />
<meta name="description" content="free/libre analytics platform"/>
<meta name="apple-itunes-app" content="app-id=737216887" />
<meta name="google-play-app" content="app-id=org.piwik.mobile2">
    <link rel="stylesheet" type="text/css" href="index.php?module=Proxy&action=getCss&cb=fc0944f888544c8279f665c250699361" />

<script type="text/javascript">


Hi…I am having the same issue. when I go to the url http://server ip/piwik it doesn’t give me the login page instead it lists all the directories in piwik folder. I have to click on index.php to get me to the login page. the same happened with the install … I had to manually go to index.php from the browser.

so I get fatal error with url=http://server ip/piwik
and Fatal error: Piwik returned an invalid response: with --url=http://serverip/piwik/index.php.

I tried using the index.html in the piwik folder but get a blank page when I hit this URL http:///piwik . I am not sure if this is config issue.

Please help :S


Ok I think I see your problem.

Could add this in your apache config file :

DirectoryIndex index.php

reload your apache and retry.


Awesome … That worked perfectly.

In apache conf , Directory Index is set to index.html and I changed to index.php and the log import is running fine.

Thanks a lot for the input.