Skip to content
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

Error in report when import multple logs #1150

Closed
chiendv opened this issue Jun 19, 2018 · 5 comments
Closed

Error in report when import multple logs #1150

chiendv opened this issue Jun 19, 2018 · 5 comments

Comments

@chiendv
Copy link

chiendv commented Jun 19, 2018

screen shot 2018-06-19 at 9 55 13 am

When I import multiple files, the report is wrong.
It look like all of them will be count into the day when the logs was imported.
In the photo, June 18 is the day which I ran command to import

@allinurl
Copy link
Owner

Can you please elaborate a bit more why the report is wrong? Have you counted using grep how many hits you are getting for all the logs you are parsing? e.g.,

cat access.log access.log.1 | grep '18/Jun/2018' | wc -l

@chiendv
Copy link
Author

chiendv commented Jun 19, 2018

My command is very simple:

goaccess access.log-20180610 access.log-20180611 access.log-20180612 access.log-20180613 access.log-20180614 access.log-20180615 access.log-20180616 access.log-20180617 access.log-20180618 -o /usr/share/nginx/html/index.html  --load-from-disk --keep-db-files

@allinurl
Copy link
Owner

Can you run it with out --load-from-disk --keep-db-files?

Also, please run this command:

cat access.log-20180610 access.log-20180611 access.log-20180612 access.log-20180613 access.log-20180614 access.log-20180615 access.log-20180616 access.log-20180617 access.log-20180618 | grep '18/Jun/2018' | wc -l

@chiendv
Copy link
Author

chiendv commented Jun 19, 2018

I realize it was wrong because I set this command in cronjob:

 0 * * * * goaccess /var/log/nginx/access.log -o /usr/share/nginx/html/index.html  --load-from-disk --keep-db-files

There are any way to run this command hourly and avoid duplicate value?

@allinurl
Copy link
Owner

Take a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants