Hi there !
I set up my new piwik version, everything is running fine, but from now, I would like to use a bash for importation !
Here’s my script
##############################################################################
##############################################################################
######################### Création du script de log ##########################
##############################################################################
##############################################################################
# Arrêt du serveur Apache | Traitement des logs (English version : Apache2 stop | Log processing)
service apache2 stop
# Copie des anciens logs (English version : Older logs copy)
cp /var/log/apache2/access.log /var/log/backup_logs/
cp /var/log/apache2/access.log.* /var/log/backup_logs/
cp /var/log/apache2/access.log.*.gz /var/log/backup_logs/
# Importation des logs dans Piwik | concerne Owncloud (English version : Log Import to Piwik | For Owncloud )
python /var/www/piwik/misc/log-analytics/import_logs.py --idsite=3 --url=http://mywebsite/piwik --output=/var/log/apache2/test.log /var/log/apache2/access.*
# Déplacement des logs vers un répértoire de backup (English version : Move older logs to backup folder | Commented)
#mv /var/log/apache2/other_vhosts_access.log.old /var/log/backup_logs/other_vhosts_access.log.old.bkp
#mv /var/log/apache2/other_vhosts_access.log.1.old /var/log/backup_logs/other_vhosts_access.log.1.old.bkp
#mv /var/log/apache2/other_vhosts_access.log.2.old /var/log/backup_logs/other_vhosts_access.log.2.old.bkp
#mv /var/log/apache2/other_vhosts_access.log.3.old /var/log/backup_logs/other_vhosts_access.log.3.old.bkp
#mv /var/log/apache2/other_vhosts_access.log.4.old /var/log/backup_logs/other_vhosts_access.log.4.old.bkp
#mv /var/log/apache2/other_vhosts_access.log.5.old /var/log/backup_logs/other_vhosts_access.log.5.old.bkp
#mv /var/log/apache2/other_vhosts_access.log.6.old /var/log/backup_logs/other_vhosts_access.log.6.old.bkp
#mv /var/log/apache2/other_vhosts_access.log.7.old /var/log/backup_logs/other_vhosts_access.log.7.old.bkp
#mv /var/log/apache2/other_vhosts_access.log.8.old /var/log/backup_logs/other_vhosts_access.log.8.old.bkp
#mv /var/log/apache2/other_vhosts_access.log.9.old /var/log/backup_logs/other_vhosts_access.log.9.old.bkp
#mv /var/log/apache2/other_vhosts_access.log.10.old /var/log/backup_logs/other_vhosts_access.log.10.old.bkp
# Fin des opérations | Ecriture dans un fichier pour vérifier que tout c'est bien passé (Process ending | Writing in a file for check purposes)
echo "L'importation c'est bien déroulée le $(date)" >> /var/log/import_piwik_success.log
#Redémarrage du serveur web (Web server restart)
service apache2 restart
When I try to execute my script, it process too fast, then I check the log, and I have this error : [Errno 111] Connection refused.
I checked on differents topics, it seems URL related but, I tried with the www version, and when I do the import_logs.py It work with http://mywebsite.fr/piwik
So thanks in advance for your help
Best regards,
EpicFrench