0

I tried to analyze a file /usr/local/cpanel/logs/access_log using goaccess but goaccess could not parse the log format of that file.

Is there any way to convert log format in that file to a format goaccess can analyze?

The file access_log has contents

165.112.33.14 - root [02/21/2023:18:30:05 -0000] "GET /cpsess3054144762/json-api/loadavg HTTP/1.1" 200 0 "example.hostname.com:2087" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" "s" "-" 2087

I think it should be changed to a format that goaccess can parse, for example

165.112.33.14 - - [22/Feb/2023:11:10:18 +0200] "GET /img/img12.jpg HTTP/1.1" 304 - "example.com" "Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"
JamesThomasMoon
  • 6,169
  • 7
  • 37
  • 63
  • Can you provide an example snippet of the `access_log` you have, and an example of what you want it to look like? – JamesThomasMoon Feb 22 '23 at 09:06
  • what I have is: 165.112.33.14 - root [02/21/2023:18:30:05 -0000] "GET /cpsess3054144762/json-api/loadavg HTTP/1.1" 200 0 "https://example.hostname.com:2087/" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" "s" "-" 2087 what I want is: 165.112.33.14 - - [22/Feb/2023:11:10:18 +0200] "GET /img/img12.jpg HTTP/1.1" 304 - "https://example.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0" – Mohamed Samir Feb 22 '23 at 12:17

0 Answers0