Comments (10)
Thank you @ingria for reporting. Will look into it soon!
from mmdbctl.
We're going to implement this very soon, within a week or two. No worries!
from mmdbctl.
This is likely because of #2 - the geolite2/geoip2 datasets have nested structures which we don't yet support properly.
from mmdbctl.
Also it would be nice to be able to use ipinfo mmdbs as a drop-in replacement for maxmind datasets (I assume that they are generated with mmdbctl). The problem is that many existing services only supports the native โnestedโ structure.
e.g. https://docs.nginx.com/nginx/admin-guide/dynamic-modules/geoip2/
from mmdbctl.
I realize you may not care as you sell your own, but can your tool verify the integrity of those dbs with nested structures such as mm's? That'd already be useful to make automation more robust in case of corrupted downloads.
Tried with one, and while lookups and metadata are broken as expected, after randomly changing a byte, the verify indeed recognizes it and fails.
from mmdbctl.
This is fixed - can anyone here who was looking for this use case check and provide feedback?
from mmdbctl.
I can confirm that maxmind dbs are now readable ๐
Is it possible to write nested structured datat into mmdb with mmdbctl?
from mmdbctl.
@ingria Yes, if you have a JSON file with nested structures, it'll be written as a natively nested structure in the MMDB file too.
Lemme know if you face any issues, happy to debug.
from mmdbctl.
Understood, thanks!
from mmdbctl.
Sorry if I'm missing something obvious. I try to import from .json (with nested structures) to .mmdb. It gives me such errors:
panic: interface conversion: interface {} is []interface {}, not map[string]interface {}
goroutine 1 [running]:
github.com/ipinfo/mmdbctl/lib.CmdImport({0x0, {0x7ffdcd4baed2, 0x14}, {0x7ffdcd4baeed, 0x1c}, 0x0, 0x0, 0x0, {0x0, 0x0, ...}, ...}, ...)
/Users/ipinfo/Work/ipinfo_public/mmdbctl_master/lib/cmd_import.go:376 +0x1a85
main.cmdImport()
/Users/ipinfo/Work/ipinfo_public/mmdbctl_master/cmd_import.go:150 +0xfd
main.main()
/Users/ipinfo/Work/ipinfo_public/mmdbctl_master/main.go:36 +0xaf
Unfortunately, i don't know Go language and cannot understand this issue. Can anyone explain what I do wrong? JSON that I use looks like this:
[
{
"range": "10.0.1.0/24",
"continent": {
"geoname_id": 6255000
},
"country": {
"geoname_id": 2017000
},
"subdivisions": [
{
"geoname_id": 536000
}
],
"city": {
"geoname_id": 498000
},
"location": {
"latitude": 63,
"longitude": 28,
"accuracy_radius": 5
}
},
{
"range": "10.0.3.0/25",
"continent": {
"geoname_id": 6255000
},
"country": {
"geoname_id": 2017000
},
"subdivisions": [
{
"geoname_id": 1488000
}
],
"city": {
"geoname_id": 1488000
},
"location": {
"latitude": 45,
"longitude": 55,
"accuracy_radius": 1
}
},
{
"range": "10.0.3.128/25",
"continent": {
"geoname_id": 6255000
},
"country": {
"geoname_id": 2017000
},
"subdivisions": [
{
"geoname_id": 1488000
}
],
"city": {
"geoname_id": 1488000
},
"location": {
"latitude": 52,
"longitude": 62,
"accuracy_radius": 1
}
}
]
And import cmd is the following:
mmdbctl import --in to-import-geoip.json --out imported-from-json-geoip.mmdb
from mmdbctl.
Related Issues (16)
- Compatibility issue with IP2Location DB which uses int format for ip address range start and end HOT 2
- Support for merging mmdb or csv files๏ผ HOT 1
- MMDB with nested structures break read and export HOT 6
- Request support for installation through Scoop HOT 1
- file size difference HOT 8
- Low-level data about MMDB HOT 3
- Granular data section metadata
- File extensions not triggering default flags in import HOT 2
- Memory Issue HOT 5
- is ipapi csv's conversion supported? HOT 7
- panic: runtime error on iplocation.mmdb
- err: nothing to import
- Corrupted Database
- 1.4.4 deb.sh script downloads 1.4.3 HOT 2
- err: failed to get record for next subnet: maxminddb: cannot unmarshal map into type string HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmdbctl.