Skip to content

feat: support db-ip and custom MMDB files for GeoIP - #54

Merged
ranthe21 merged 4 commits into
mainfrom
dbip-geoip
Nov 18, 2026
Merged

ranthe21 merged 4 commits into
mainfrom
dbip-geoip

Conversation

@ranthe21

@ranthe21 ranthe21 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

The exporter can now read GeoIP data from a db-ip subscription or from MMDB files you supply, not only GeoLite2.

  • --dbip-key (or DBIP_KEY) downloads the db-ip database to --geoip-dir in the background and looks for a new release once a day. A copy already on disk is opened before the log parser starts. A new release is swapped in without a restart. A failed update retries after 3, 6, 12 and then 24 hours. --dbip-db picks the db-ip database and defaults to ip-to-location-isp.
  • --geoip-file reads one or more MMDB files you manage yourself.
  • Lookups use maxminddb-golang directly with one record struct, so the ASN and org come from the top level (GeoLite2) or from traits (db-ip and other Enterprise-style files). The ISP name fills in when a file has no AS org. geoip2-golang is no longer used.
  • An IP missing from the ASN database now reports unknown|unknown instead of 0|. In dashboard 23181 only the Top ASNs panel (id 33) reads these labels. Its row for these IPs changes from 0 to unknown, and its query needs no change.

@ranthe21
ranthe21 merged commit 4a1cf60 into main Nov 18, 2026
11 checks passed
@ranthe21
ranthe21 deleted the dbip-geoip branch November 18, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant