allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
18.38k stars 1.11k forks source link

Monthly report from cron is generating empty file #2099

Closed kabeza closed 3 years ago

kabeza commented 3 years ago

Hi I've an Ubuntu 18.04 box where I run

sudo crontab -e

0 0 1 * * goaccess -f /var/log/apache2/access.log --log-format COMMON -a -d > "/var/www/html/stats/reporte_$(date +\%d\%m\%Y).html"

When I check the folder, file is 0bytes. Any clues?

If I execute the same command manually from shell:

sudo goaccess -f /var/log/apache2/access.log --log-format COMMON -a -d > "/var/www/html/stats/reporte_$(date +\%d\%m\%Y).html"

It works great

allinurl commented 3 years ago

Hello - Can I ask what version of goaccess are you running?

kabeza commented 3 years ago

GoAccess - 1.2. For more details visit: http://goaccess.io Copyright (C) 2009-2016 by Gerardo Orellana

allinurl commented 3 years ago

Could you please upgrade to the latest version? This issue may have been fixed already. Let me know. Thanks

kabeza commented 3 years ago

Could you please upgrade to the latest version? This issue may have been fixed already. Let me know. Thanks

don't know why it didn't upgrade all this time, now i notice 1.2 is from 2017 🤦‍♂️

allinurl commented 3 years ago

Feel free to use the official deb repo, usually debian/ubuntu take time to upgrade packages.

kabeza commented 3 years ago

Feel free to use the official deb repo, usually debian/ubuntu take time to upgrade packages.

Yea, I did that. It looks like I had installed manually 1.2, now removed it, reinstalled through repo and changed cron to daily to see how it goes. Will update. Thanks

kabeza commented 3 years ago

Checked output. Cron worked perfectly now It just needed an upgrade Thanks