GilbN / geoip2influx

A python script that will parse the nginx access.log and send geolocation metrics and log metrics to InfluxDB
MIT License
73 stars 15 forks source link

Bump Alpine to `Alpine 3.20` to fix `tar: invalid tar magic` #17

Closed raldone01 closed 2 months ago

raldone01 commented 2 months ago

Maxmind recently had changes and the database fails to download.

https://github.com/linuxserver/docker-mods/issues/853

Alpine 3.20 has the fixed swag package.

Consider updating the Dockerfile and pushing a new image.

GilbN commented 2 months ago

Mind testing this? ghcr.io/gilbn/geoip2influx:alpine3.20

I dont have influx or grafana running at the moment.

GilbN commented 2 months ago

Rebased

raldone01 commented 2 months ago

I pulled ghcr.io/gilbn/geoip2influx:alpine3.20. But it still says: tar: invalid tar magic.

I set the new account id env var.

[init-maxmind-setup] init started
[migrations] started
[migrations] no migrations found
[init-maxmind-setup] Downloading GeoIP2 City database.
usermod: no changes

 ██████╗ ███████╗ ██████╗ ██╗██████╗ ██████╗ ██╗███╗   ██╗███████╗██╗     ██╗   ██╗██╗  ██╗
██╔════╝ ██╔════╝██╔═══██╗██║██╔══██╗╚════██╗██║████╗  ██║██╔════╝██║     ██║   ██║╚██╗██╔╝
██║  ███╗█████╗  ██║   ██║██║██████╔╝ █████╔╝██║██╔██╗ ██║█████╗  ██║     ██║   ██║ ╚███╔╝ 
██║   ██║██╔══╝  ██║   ██║██║██╔═══╝ ██╔═══╝ ██║██║╚██╗██║██╔══╝  ██║     ██║   ██║ ██╔██╗ 
╚██████╔╝███████╗╚██████╔╝██║██║     ███████╗██║██║ ╚████║██║     ███████╗╚██████╔╝██╔╝ ██╗
 ╚═════╝ ╚══════╝ ╚═════╝ ╚═╝╚═╝     ╚══════╝╚═╝╚═╝  ╚═══╝╚═╝     ╚══════╝ ╚═════╝ ╚═╝  ╚═╝

                                 Made by @gilbN                                            
                     https://github.com/GilbN/geoip2influx                                 

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    911
User GID:    911
───────────────────────────────────────
[custom-init] No custom files found, skipping...
tar: invalid tar magic
[init-maxmind-setup] init finished
[init-geoip2influx-setup] Starting
[init-geoip2influx-setup] Variables set:
NGINX_LOG_PATH=/config/log/nginx/access.log
...
MAXMINDDB_USER_ID=0000000
MAXMINDDB_LICENSE_KEY=redacted_mmk

[init-geoip2influx-setup] Finished
[ls.io-init] done.
GEOIP2INFLUX 31/Jul/2024 12:28:02 :: INFO :: Starting geoip2influx..
GEOIP2INFLUX 31/Jul/2024 12:28:02 :: WARNING :: File: /config/geoip2db/GeoLite2-City.mmdb not found...
GEOIP2INFLUX 31/Jul/2024 12:28:03 :: WARNING :: File: /config/geoip2db/GeoLite2-City.mmdb not found...
GEOIP2INFLUX 31/Jul/2024 12:28:04 :: WARNING :: File: /config/geoip2db/GeoLite2-City.mmdb not found...
GEOIP2INFLUX 31/Jul/2024 12:28:05 :: WARNING :: File: /config/geoip2db/GeoLite2-City.mmdb not found...
GilbN commented 2 months ago

Are you using arm?

GilbN commented 2 months ago

and use ghcr.io/gilbn/geoip2influx

raldone01 commented 1 month ago

This image worked for me: ghcr.io/gilbn/geoip2influx