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.12k stars 1.1k forks source link

Inaccurate number of requested files #2063

Closed chenss115472 closed 3 years ago

chenss115472 commented 3 years ago

Hello, after many times of analysis and comparison, I found that the number of request files analyzed by goaccess is incorrect, I don't know how to proofread! 20210325093029 20210325093034

0bi-w6n-K3nobi commented 3 years ago

Hi @chenss115472 .

You can see that Static Files are not part of Requested Files (URLs) . So... You must subtract it before accounting.

I hope it helped you.

allinurl commented 3 years ago

@0bi-w6n-K3nobi is right, you need to add up 404s and static files.

chenss115472 commented 3 years ago

@allinurl @0bi-w6n-K3nobi Thank you for your reply, according to your request file + 404s and static files, but I found that this is better than using awk '{print $7}' access.log |The total number of sort | uniq - C | sort - N - K 1 - R | WC - L statistics is more than ten.

Sorry, I found another problem on my side. When analyzing uncompressed logs and tar compressed logs, zcat - F access.log.tar .gz | goaccess -o /opt/access-tar-05.html -p /usr/local/etc/goaccess/ goaccess.conf All requests will be one less and the number of failed requests will be one more. 捕获 捕获1

0bi-w6n-K3nobi commented 3 years ago

Hi @chenss115472.

For 2nd issue: Did you unzip and test it with the final file? Which seems to me that you missed one request and broked/corrupted another.

For 1st issue: Interesting... the difference was 24 more in the sum of the panel. Did you check if any requests returned 404 at first and then after 200? That would explain the difference.

I hope it helped you.

chenss115472 commented 3 years ago

Hi @allinurl @0bi-w6n-K3nobi . The second problem: compressed logs have been decompressed and tested, and the test results are normal and the results of uncompressed log analysis are the same.

The first question: after searching the number of request files, 404s files and static files in the test, it is found that the total number of requests in each module is correct, but the total number of files is not right. I don't know what other methods can find the correct answer. thank! 1 2

chenss115472 commented 3 years ago

Hi @allinurl @0bi-w6n-K3nobi . I don't know if there are other ways to use goaccess to count all the requested files, including static files and 404s files..

allinurl commented 3 years ago

Do you mind sharing that specific access log so I can take a look? If you prefer not to attach it here, you can send it to hello [at] goaccess.io. Thanks!

0bi-w6n-K3nobi commented 3 years ago

Hi @chenss115472 .

Well... See if I understand you correctly. Do you want count requests that be different/unique? Regardless of whether they are files, statics or not found.

chenss115472 commented 3 years ago

Hi @0bi-w6n-K3nobi Your understanding is very correct, and that's what I hope.

allinurl commented 3 years ago

@chenss115472 wanted to follow up and mak sure it is working now for you. Please let me know.

allinurl commented 3 years ago

Closing this. Feel free to reopen it if needed.