# Geoip2influx

Geoip2influx is a Python script that parses Nginx access logs and sends geolocation and request metrics to InfluxDB. It is open source and self-hosted, installable on Docker Hub and Unraid.

Canonical page: https://ourlocalhost.com/app/1991/geoip2influx

## Description

Geoip2influx is a Python script that parses Nginx access logs and sends geolocation and request metrics to InfluxDB. It uses MaxMind GeoIP location data to enrich each request, feeding a companion Grafana dashboard (ID 12268 in the Grafana dashboard registry) for map-based traffic analytics. It suits self-hosters running Nginx or the LinuxServer SWAG (Secure Web Application Gateway) reverse proxy who want lightweight analytics without a full observability stack. The author has marked the project as superseded by its successor, GeoMetrikks.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

58/100 (Fair), based on 4 of 5 factors.
- Maintained: 63 (last commit 122 days ago)
- Popular: 39 (89 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)
- Security check: 95 (no serious findings, CI, tests)

## Links

- Docker Hub: https://hub.docker.com/r/gilbn/geoip2influx
- Documentation: https://grafana.com/grafana/dashboards/12268
- Unraid: https://ca.unraid.net/apps/geoip2influx-1mahsr90wmaia1?q=geoip2influx

## Common questions

### What MaxMind settings should I configure for geoip2influx?

Set GEOIP_DB_PATH to the GeoLite2-City.mmdb file you want to use. Add MAXMINDDB_USER_ID and MAXMINDDB_LICENSE_KEY for your MaxMind account credentials.

### How do I point geoip2influx at InfluxDB 2?

Set USE_INFLUXDB_V2 to true and INFLUXDB_V2_TOKEN to your InfluxDB 2 token. You can also set INFLUXDB_V2_URL, INFLUXDB_V2_ORG, INFLUXDB_V2_BUCKET, and INFLUXDB_V2_RETENTION.

### Which Nginx log file does geoip2influx read?

It reads the container path in NGINX_LOG_PATH, which defaults to /config/log/nginx/access.log. Change that variable if your Nginx access log is mounted elsewhere.

### Is there a setup for linuxserver/letsencrypt?

The README references a linuxserver/letsencrypt docker mod for swag-geoip2influx. That is the intended path for that Nginx container setup.

### How do I enable verbose logging for geoip2influx?

Set GEOIP2INFLUX_LOG_LEVEL to debug for verbose logging. The script log path is controlled by GEOIP2INFLUX_LOG_PATH and defaults to /config/log/geoip2influx/geoip2influx.log.

## Alternatives

- Beszel: A lightweight server monitoring hub with historical data, docker stats, and alerts.
- Datadog: Datadog Agent is an on-host monitoring agent that collects metrics, logs, and traces from hosts, containers, and Kubernetes clusters and se…
- DeepFlow: Unify your cloud-native monitoring with zero-code eBPF, advanced profiling, and 10x storage efficiency.
- Kibana: Kibana is the data visualization layer for querying, analyzing, and managing data stored in Elasticsearch.
- Metabase: Metabase is a simple and powerful analytics tool which lets anyone learn and make decisions from their company’s data.
- Netdata: Netdata is a real-time performance and health monitoring solution that collects per-second metrics from your servers, containers, networks,…
- OpenSearch: OpenSearch is an open-source search and observability suite for self-hosters who need scalable indexing, analysis, and visualization of log…
- SigNoz: SigNoz is a self-hostable open-source observability platform that unifies logs, metrics, traces, alerts, and dashboards using OpenTelemetry…
- Splunk: Splunk is a self-hosted platform for collecting, indexing, searching, and analyzing log and security data, helping homelabbers and operatio…
- Tableau: Tableau helps the world’s largest organizations unleash the power of their most valuable assets: their data and their people.
- VictoriaLogs: VictoriaLogs is a high-performance, lightweight, schema-free database for logs.
- apache-superset: Apache Superset is a modern data exploration and visualization platform.

---
Source: Our Local Host (https://ourlocalhost.com/app/1991/geoip2influx), the self-hosted and open-source app directory.
