-
Notifications
You must be signed in to change notification settings - Fork 343
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
MaxMind DB for Location #492
Comments
I am open to patches that implement this. I think your approach of specifying the database to use is the right approach. On the other hand, having a default that works and just a flag to enable it might be better. Then I can use MTR_OPTIONS environment variable to set my default geoip provider and then enable it with a simple flag instead of having to type my provider everytime I want to use it. |
Just btw, does GeoIP2 have online API? (If so, are there some restrictions like number of queries, etc.) p.s. some info from there for example
|
@rewolff Indeed, your approach on how to capture IP information by setting it in the MTR_OPTIONS environment variable provides more autonomy over the queries. We only have one issue: due to the different data architecture from each provider, I need to think about a better approach for these situations, such as searching locally in the mmdb or externally through an API. |
@yvs2014 For exemple with my account on ipinfo.io: Result of API Business plan have more details:
|
A good approach would be for you to maintain a local SQLite database and before querying ipinfo (maybe), you first check the IP in your SQLite database and store the result from ipinfo (maybe) in this database, keeping it updated. So, in case the IP is repeated, you won't need to make a new request |
@JDarzan |
sqlite is "low overhead". Just a library putting things in a file with a way to access them as if it were a database. I'm not impressed by the caching of DNS servers. I get the impression that this often doesn't work somehow. (not working includes reporting "nope, no such host" while it is still waiting for a reply from the other end, and when the reply does come in it retries the whole request forwarding and again reports "nope" before the answer comes in. Stuff like that.). For MTR I think adding another dependency is the most important part. I don't like it. Having a fallback if sqlite is not available sounds like an option to me:
Something like this as a fallback if sqlite is not available shouldn't take more than about twice the number of lines here to get it to work. For the "limited number of queries" cases, preparing for the "huge scan" kind of application would be good, Suppose someone is going to do 100k scans with 10 hops on average. A normal user doing 10 scans of 10 hops is not a problem. But the 1M lookups with more than 90% doubles would cost serious money otherwise. |
Anyway it needs some external databases working with persistent storage. On other hand, keeping a couple dozens entries in memory (gotten from free online source) is usually enough to an ordinary trace (it's my use case).
i.e. it's not free and not for common use |
I use the maxmind api in other projects, and have been meaning to modify mtr to use it too. However, you appear to be discussing a realtime dns lookup method. I'm using the downloadable version of the database, which is already stored in it's own DB format. The API to read that is quite simple, and exists in many languages already: https://maxmind.github.io/MaxMind-DB/ Is anyone considering this method of providing location data within mtr, and/or is there any interest in such a patch if I can finally get somewhat through my "TODO" list? ps. I use the free version. It's refreshed monthly and is not quite as current as the paid-for version, but I've never noticed any issues with this |
Hello everyone,
I've been considering the possibility of enhancing the results with more detailed insights. It might be beneficial to integrate the MaxMind's MMDB to gain accurate information on IP locations and ASN details.
Something, for instance, for us to use as a parameter --mmdb GeoIP2-City.mmdb
Such an integration could offer a more detailed and enriched view of the hops, especially for those wishing to see the location in real-time. Is there any ongoing discussion or plan regarding this?
Thank you in advance for considering this suggestion, and I look forward to community feedback.
Hope that helps with your communication with the repository!
The text was updated successfully, but these errors were encountered: