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

Help me with my log format #2031

Open matheusvs1 opened 3 years ago

matheusvs1 commented 3 years ago

Have a apache log format like this:

192.168.1.101 [09/Feb/2021:12:00:12 -0300] "POST /kugel-web/rest/PW1219B/cancelar-encerrar-mdfe?numMdfe=18556&codSerieMdfe=1 HTTP/1.1" 200 660 ms "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0"

192.168.1.101 [09/Feb/2021:12:00:16 -0300] "GET /kugel-web/rest/PW1219B/zoom/DM1219/1/10?1=1&filtro-dataEmissaoMdfeIni=09%2F11%2F2020&filtro-placa=AVT8930 HTTP/1.1" 200 3052 ms "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0"
allinurl commented 3 years ago
goaccess access.log --log-format='%h [%d:%t %^] "%r" %s %L "%u"' --date-format=%d/%b/%Y --time-format=%T
matheusvs1 commented 3 years ago

Thank, so i tried this os this command, but don't really work:

goaccess access_log.txt -o report.html --log-format='%h %^[%d:%t %^] "%r" %s %L "%u"' --date-format=%d/%b/%Y --time-format=%T

problemaTalvez

The data don't really show up, i use cowaxess...

allinurl commented 3 years ago

That format works fine for those two lines you posted above. Is your access log being generated in Windows or are you downloading the log from a remote linux server? Can you please try using cygwin? Here are the packages needed.

matheusvs1 commented 3 years ago

Hi, so i'm try using cygwin like you say, the language chance to pt-br... but the problem keep :(

Sem título

I use the code: goaccess access_log.log -o report.html --log-format='%h [%d:%t %^] "%r" %s %L "%u"' --date-format=%d/%b/%Y --time-format=%T

to a Apache access.log like this:

192.168.1.101 [10/Fev/2021:17:24:02 -0300] "GET /kugel-web/assets/img/favicon.ico HTTP/1.1" 200 1 ms "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0"
192.168.1.101 [10/Fev/2021:17:24:03 -0300] "GET /kugel-web/websocket HTTP/1.1" 101 1 ms "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0"
allinurl commented 3 years ago

Sorry, it should be like this:

goaccess access.log -o report.html --log-format='%h [%d:%t %^] "%r" %s %L %^"%u"' --date-format=%d/%b/%Y --time-format=%T

Do you get an error if you parse only those lines that you posted? Also, do you see anything on your browser's console, errors?

matheusvs1 commented 3 years ago

Hi, here the console browser error... i should look this before... my bad

novo_titulo

allinurl commented 3 years ago

This looks to be isolated, perhaps locale. Are you able to attach here your log so I can take a look?

apracz commented 3 years ago

Hi, here the console browser error... i should look this before... my bad

novo_titulo

Conseguiu resolver estou tendo o mesmo problema

You fixed this problem ? i have same problem

apracz commented 3 years ago

i have same problem, pt-br

my nginx log file

[23/Apr/2021:17:43:48 +0000] - - 301 - GET http test.com "/wp-login.php" [Client 188.166.69.242] [Length 166] [Gzip -] [Sent-to 192.168.3.27] "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" "-" [23/Apr/2021:17:43:49 +0000] - 404 404 - GET https test.com "/wp-login.php" [Client 188.166.69.242] [Length 29] [Gzip -] [Sent-to 192.168.3.27] "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" "http://test.com/wp-login.php" [23/Apr/2021:18:57:46 +0000] - - 301 - GET http test.com "/" [Client 93.158.90.114] [Length 166] [Gzip -] [Sent-to 192.168.3.27] "Mozilla/5.0 (Macintosh; Intel Mac OS X 11.1; rv:84.0) Gecko/20100101 Firefox/84.0" "-" [23/Apr/2021:18:57:47 +0000] - 200 200 - GET https test.com "/" [Client 93.158.90.114] [Length 4685] [Gzip 3.19] [Sent-to 192.168.3.27] "Mozilla/5.0 (Macintosh; Intel Mac OS X 11.1; rv:84.0) Gecko/20100101 Firefox/84.0" "-"

allinurl commented 3 years ago

@apracz are you using cygwin?

apracz commented 3 years ago

@apracz are you using cygwin?

No, debian

I use docker with Nginx

allinurl commented 3 years ago

@apracz Are you able to share the generated report and the exact command you are running to generate the report?