pantheon-systems / documentation

Pantheon Docs
https://docs.pantheon.io
Other
188 stars 655 forks source link

Parsing Nginx Access Logs with GoAccess Doc Update #5868

Closed jeor0980 closed 2 years ago

jeor0980 commented 4 years ago

Re: Parsing Nginx Access Logs with GoAccess

Priority: Low

Issue Description:

In the code block for the rules to add to goaccess.conf

log-format %^ - %^ [%d:%t %^] "%r" %s %b "%R" "%u" %T "%h,%^"

Will result in the following error:

goaccess nginx-access.log
Parsed 1 lines producing the following errors:

Token for '%h' specifier is NULL.

Format Errors - Verify your log/date/time format

Suggested Resolution

Update rule to:

log-format %^ - %^ [%d:%t %^] "%r" %s %b "%R" "%u" %T "%h",%^

alexfornuto commented 4 years ago

@jeor0980 thanks for the issue! On my system, the configuration in the doc works, but your suggest change returns:

❯ goaccess -p ~/.goaccessrc nginx-access.log
Parsed 1 linesproducing the following errors:

Token 'OST' doesn't match specifier '%s'

I'm running version 1.3 on Fedora Linux, what version and OS are you using?

jeor0980 commented 4 years ago

I am running goaccess 1.4 on Mac OS Catalina (10.15.5)

alexfornuto commented 4 years ago

@EdwardAngert can you give this a look on your MBP?

EdwardAngert commented 2 years ago

@pantheon-systems/docs-admins to confirm tech (we believe and appreciate you @jeor0980 , but you know, have to verify), then make the change and 🚀

EdwardAngert commented 2 years ago

confirmed that it works on my Mac as written - closing