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

goaccess docker generated json or html file geolocation is empty #1604

Open
jevy-wangfei opened this issue Nov 15, 2019 · 4 comments
Open

goaccess docker generated json or html file geolocation is empty #1604

jevy-wangfei opened this issue Nov 15, 2019 · 4 comments

Comments

@jevy-wangfei
Copy link

@jevy-wangfei jevy-wangfei commented Nov 15, 2019

Use docker:

cat log |  docker run --rm -i allinurl/goaccess -a -o json --log-format  COMBINED -> test.json

geolocation section:

    "geolocation": {
        "metadata": {
            "bytes": {
                "count": 0,
                "max": 0,
                "min": 0
            },
            "visitors": {
                "count": 0,
                "max": 0,
                "min": 0
            },
            "hits": {
                "count": 0,
                "max": 0,
                "min": 0
            },
            "data": {
                "unique": 0
            }
        },
        "data": []
    }

Use Ubuntu installed goaccess to process the same log, everyting is OK:

"geolocation": {
    "metadata": {
        "bytes": {
            "count": 137656274,
            "max": 43982538,
            "min": 463
        },
        "visitors": {
            "count": 831,
            "max": 596,
            "min": 1
        },
        "hits": {
            "count": 9994,
            "max": 4571,
            "min": 1
        },
        "data": {
            "unique": 31
        }
    },
    "data": [{
        "hits": {
            "count": 4705,
            "percent": "47.08"
        },
        "visitors": {
            "count": 29,
            "percent": "3.49"
        },
        "bytes": {
            "count": 83459309,
            "percent": "60.63"
        },
        "data": "OC Oceania",
        "items": [{
            "hits": {
                "count": 4571,
                "percent": "45.74"
            },
            "visitors": {
                "count": 28,
                "percent": "3.37"
            },
            "bytes": {
                "count": 39476771,
                "percent": "28.68"
            },
            "data": "AU Australia"
        }, {
@allinurl allinurl added the docker label Nov 16, 2019
@allinurl

This comment has been minimized.

Copy link
Owner

@allinurl allinurl commented Nov 16, 2019

Thanks for reporting this. Is this the only panel displaying these numbers?

@noszone

This comment has been minimized.

Copy link

@noszone noszone commented Nov 26, 2019

Used command:
goaccess /var/log/apache2/access.log -o /var/www/html/report.html --log-format=COMBINED

and got an empty html file. Tried other options, pls help.

@jevy-wangfei

This comment has been minimized.

Copy link
Author

@jevy-wangfei jevy-wangfei commented Nov 28, 2019

Thanks for reporting this. Is this the only panel displaying these numbers?

Yes, only the geolocation panel has zero metadata and empty data.

Also notice that goaccess docker will generage the hosts panel with item field at data attribute, but generage country field when using Goaccess on linux.

The GoAccesss version on my WSL:

root@EVANSTON-BM:~# goaccess --version
GoAccess - 1.3.
For more details visit: http://goaccess.io
Copyright (C) 2009-2016 by Gerardo Orellana
@allinurl

This comment has been minimized.

Copy link
Owner

@allinurl allinurl commented Nov 28, 2019

You will need to download and specify the db file. e.g.,

--geoip-database=GeoLite2-City.mmdb
# For GeoIP2 City database:
# wget -N http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
# gunzip GeoLite2-City.mmdb.gz
#
# For GeoIP2 Country database:
# wget -N http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz
# gunzip GeoLite2-Country.mmdb.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.