Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't display some information in the report #2510

Closed
anwiev opened this issue May 18, 2023 · 6 comments
Closed

Can't display some information in the report #2510

anwiev opened this issue May 18, 2023 · 6 comments

Comments

@anwiev
Copy link

anwiev commented May 18, 2023

Hello,
Could you please help to understand where is the issue?

For some reason, I don't see information about User Agent inside the column "Visitor Hostnames and IPs" which will be really helpful.

For example, the column on your website looks like this (https://rt.goaccess.io/?1410179475#browsers):
image

My report displays only IPs:
image2

I have a feeling that issue with the format or something like this.
The format which I'm using:
log-format %v:%^ %h [-] - - [%d:%t %z] %D "%r" %s %b %^ "%R %u"

The Apache access log looks like this:
website.com:443 11.11.111.192 [-] - - [01/May/2023:00:00:25 +0100] "GET /favicon.ico HTTP/1.1" 404 21660 "https://website.com/download/pdf/323461089.pdf" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15"

I'm using this command:
LC_TIME="en_US.UTF-8" LANG="en_EN.UTF-8" bash -c "goaccess test.log " -a > new_report.html

Many thanks!

@anwiev
Copy link
Author

anwiev commented May 18, 2023

@allinurl need your help :)

@allinurl
Copy link
Owner

That is a great question. To answer it, you will need to configure your web server to log a few more fields. For example, you could change your apache2.conf file to look like this:

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %D %{Content-Type}o %{SSL_PROTOCOL}x %{SSL_CIPHER}x" vhost_combined_tls

Then ensure to restart your web server.

Then you can have goaccess use:

log-format %v:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u" %D %M %K %k

You will need to download the country or city databases and the ASN as well and add it to your config file:

geoip-database /etc/goaccess/dbip-country-lite-2020-11.mmdb
geoip-database /etc/goaccess/GeoLite2-ASN.mmdb

You can download the mmdb files from https://db-ip.com/db/lite.php

Let me know if that helps.

@allinurl
Copy link
Owner

Also, make sure to pass -a to log the agents. Stay tuned for #117

@allinurl
Copy link
Owner

and -d for the hostname.

@anwiev
Copy link
Author

anwiev commented May 19, 2023

Many thanks @allinurl

@allinurl
Copy link
Owner

Glad that helped! Closing this. Feel free to reopen it if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants