-
Notifications
You must be signed in to change notification settings - Fork 83
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
Support for GeoIPOrg.dat #41
Comments
I don't use logstash or Jira. If you do, please test the change and make a pull request. Thanks! |
Unfortunately I am not a programmer. And know nothing about Ruby. But if someone makes the changes, I will gladly test it with Logstash. |
I'm sorry, but you'll need to find someone who knows how to replicate this problem before anyone can attempt a fix. |
Hi, I can reproduce this bug ; I made a correction for geoip.rb file (1.3.2 version, packaged with logstash 1.2.2), which is similar to the previous ASN bug (#38) diff geoip.rb ../new/geoip.rb 155a156,163
You can test it with an ORG file construct with a script, which is build from https://github.com/mteodoro/mmutils. Thanks for your code. |
Thanks batbast. I think I have applied your change correctly, but I don't have a license to access the ISP data. If you can send me a sample ISP data file, I'll test and release it.... ... or you could just send me a pull request :) |
Hi Clifford, Thank you for your response. I send you 3 files : Utilisation (install python-ipaddr package)$ ./csvORG2dat.py -w organizations.dat mmorg_net organizations.csv Test$ geoiplookup -f organizations.dat 10.1.1.1 On 2013-12-11 21:25, Clifford Heath wrote:
#!/usr/bin/env python Source : https://github.com/mteodoro/mmutilsimport sys import csv from functools import partial import ipaddr def init_logger(opts): def parse_args(argv):
def gen_csv(f):
class RadixTreeNode(object): class RadixTree(object):
class ORGIPRadixTree(RadixTree):
class ORGNetworkRadixTree(RadixTree):
def build_dat(RTree, opts, args):
rtrees = [ORGIPRadixTree, ORGNetworkRadixTree] def main(argv=None):
if name == 'main': |
I don't see any data files. I had already cloned the mmutils repository and got the conversion program running - I just didn't have any data to convert. Also, I don't think that github's issue mail system is useful for sending files around. Put them in a gist if you must send files this way. Or attach them in normal email to clifford.heath@gmail.com |
Github had mangled your code, above. I figured it out, built the DAT file and tested it. The new version of GeoIP has been released, please test it. |
Hi Clifford, There is a little mistake at the line 157 : replace lsp by isp With this correction I have made 2 tests :
Le 2013-12-18 00:01, Clifford Heath a écrit :
|
Ouch, thanks. Update pushed. |
Thanx to everyobdy for contributing. I will test and see if this works for logstash. First weird thing is that it can't find gem with version 1.3.5. But when I change version to 1.3.4 it finds the 1.3.5 version and fetches it. |
Ok. Got it working in Logstash. ISP is now showing, but I am still missing Organization. Not sure if this is an extra field or if this value is stored in ISP. |
Organization file is similar to the ISP file, so I think the return Le 21/12/2013 14:21, OkkeKlein a écrit :
|
Assuming this is true, the issue is closed. I appreciate the help. |
Same issue as https://logstash.jira.com/browse/LOGSTASH-1394 it seems.
but for organisations in GeoIPOrg.dat.
Maybe same fix?
{:timestamp=>"2013-10-28T16:06:13.964000+0000", :message=>"Exception in filterworker", "exception"=>#<NoMethodError: undefined method
to_hash' for "Teraspace GmbH":String>, "backtrace"=>["file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/filters/geoip.rb:104:in
filter'", "(eval):220:ininitialize'", "org/jruby/RubyProc.java:271:in
call'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:250:infilter'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:191:in
filterworker'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:134:in`start_filters'"], :level=>:error}The text was updated successfully, but these errors were encountered: