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.61k stars 1.11k forks source link

Visitor country missing in web mode but present in json output #1502

Open Dr-Escher opened 5 years ago

Dr-Escher commented 5 years ago

The little arrow in front of each category/continent is missing in the geo section for me. However the country is corrently determined and included in the JSON output. I tried several browsers including Firefox 68 and Chrome 75 without any noticeable differences.

Any idea?

geo

goaccess.json.txt

allinurl commented 5 years ago

Are you getting some sort of error in your browser's console? Thanks

Dr-Escher commented 5 years ago

No errors are shown in the debug console.

But while fiddling around and gathering information, I noticed this issue only exists when piping log data into goaccess to gather live statistics. Everything is fine if a static file is used as log input. This applies to both issues reported #1501 and #1502.

allinurl commented 5 years ago

I can confirm this. Since it's a dup of #1501, I'll close this. Thanks for reporting though.

dmigis commented 3 years ago

@allinurl I have the same problem as described above (goaccess version 1.4.5). --agent-list also not working in HTML mode. JSON and console output are ok.

Command used for launching:

goaccess /var/log/nginx/*.access.log -d --agent-list --http-protocol=yes --http-method=yes --geoip-database /usr/share/GeoIP/GeoLite2-Country.mmdb --fifo-in=/tmp/dev2.in --fifo-out=/tmp/dev2.out --log-format=VCOMBINED --real-time-html --ws-url=wss://domain:443/ws1 -o /www/logs/all.html --daemonize --port=7891 --origin=domain
allinurl commented 3 years ago

@dmigis Can you please post a few lines from your log so can try to replicate this? Thanks

dmigis commented 3 years ago

@allinurl Just saw the message, here it is:

example.com:8443 8.8.8.8 - - [25/Feb/2021:14:19:40 +0100] "GET /css/main.css HTTP/1.1" 200 2178 "https://example.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/81.0.4044.92 Safari/537.36"
example.com:8443 69.160.160.54 - - [25/Feb/2021:14:19:40 +0100] "GET /js/main.js HTTP/1.1" 200 423 "https://example.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/81.0.4044.92 Safari/537.36"
cloud.example.com:8443 10.10.10.1 - user [25/Feb/2021:12:02:33 +0100] "GET /ocs/v2.php/apps/serverinfo/api/v1/info?format=json HTTP/1.1" 200 1256 "-" "curl/7.64.0"

In other words, I use this log format with Nginx:

log_format vcombined '$host:$server_port ' '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent"';

allinurl commented 3 years ago

@dmigis Can you please try the latest version (v1.4.6)? I wasn't not able to reproduce the issue with your sample lines and the command line options you posted. e.g.,

2021-02-28-161332_1410x773_scrot

dmigis commented 3 years ago

@allinurl Still the same 2021-03-05_23-07 No host geoip and http-agents in the posted section

allinurl commented 3 years ago

@dmigis this is what I get when parsing those three lines you posted above. Can you please try parsing those three lines with the following command:

# goaccess access.log --log-format=VCOMBINED --geoip-database=/usr/share/GeoIP/GeoLite2-Country.mmdb -o report.html --real-time-html -d --agent-list

Output

2021-03-05-202458_751x573_scrot