Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
parsing stopps at first empty logfiles #1683
I am using goaccess version 1.2 which I knowis not the latest version. Still I have seen no issue about this, not even a closed one. I was wondering if I do something wrong.
I use goaccess to generate a summary of all current logs of all my webhosts like this.
I noticed after log rotate was triggered (and some logs stay empty for a while) that the processing stopped at the first empty log file processed. The output shows the empty logfile name - nothing more, no error.
When I use
I know version 1.2 is not the latest. I was wondering if this still exists in version 1.3.
Short Answer, I can trigger that behaviour.
Long one, ... My Setup looks like that. I have a very simple shell script to generate the goaccess html reports. The procedure looks like that:
1.) I go through all the webhosts and define the path to the log files like that:
2.) I use that pattern to start goaccess with "-o /.../hist.html", --db-path, --keep-db-files and --load-from-disk
3.) I get the file path to the current log files (the not jet rotated ones like that:
4.) So I generate a separate report for them using the "-o /.../index.html", --date-spec=hr and --hour-spec=min
The Problem was noticed when I created the report for the current logfile using
One of the files referenced in the -f parameter was an empty file (filesize 0 byte). goaccess starts, prints the log file name to the console and ends without a real error message. But what I noticed was that the report file (/../index.html) was not even created. I investigated and found that the empty file triggered the termination of the processing.
When I use find to interpret the path/file pattern and remove empty files, the report file is created and works as expected.
I could test this quiet extensive as it happened on every run (have a webhost with nearly no access at all (reason does not matter I guess).
I guess with that details it should be easy to reproduce if the issue still exists in version 1.3, right?
Reproducible with following test procedure using goaccess 1.2:
The result is one generated file called "working.html" but no file named "failed.html" is created. The second run produces the output "some.webserver.log]" before goaccess terminates.
This was the test using version 1.2. As Centos 7 still uses 1.2, I am still using version 1.2 of GoAccess.