GithubHelp home page GithubHelp logo

Comments (4)

jsvd avatar jsvd commented on June 24, 2024

🤦 this should clearly be @source. thanks for spotting this. you can create a pr to change @field to @source if you want

from logstash-filter-geoip.

jhitze avatar jhitze commented on June 24, 2024

Sure thing. Just a quick question: Do all the tests fail for you?

jhitze$ be rspec
Using Accessor#strict_set for specs
Run options: exclude {:redis=>true, :socket=>true, :performance=>true, :couchdb=>true, :elasticsearch=>true, :elasticsearch_secure=>true, :export_cypher=>true, :integration=>true, :windows=>true}
FFFFFFFFFFFFFFF

Failures:

  1) LogStash::Filters::GeoIP ASN db "{"ip":"1.1.1.1"}" when processed
     Failure/Error: let(:pipeline) { LogStash::Pipeline.new(config) }
     LogStash::ConfigurationError:
       Something is wrong with your configuration.
     # (eval):7:in `initialize'
     # ./spec/filters/geoip_spec.rb:19:in `(root)'
     # ./spec/filters/geoip_spec.rb:19:in `(root)'

  2) LogStash::Filters::GeoIP ASN db "{"ip":"2a02:8071:aa1:c700:7984:22fc:c8e6:f6ff"}" when processed
     Failure/Error: let(:pipeline) { LogStash::Pipeline.new(config) }
     LogStash::ConfigurationError:
       Something is wrong with your configuration.
     # (eval):7:in `initialize'
     # ./spec/filters/geoip_spec.rb:25:in `(root)'
     # ./spec/filters/geoip_spec.rb:25:in `(root)'

  3) LogStash::Filters::GeoIP defaults "{"ip":"8.8.8.8"}" when processed
     Failure/Error: pipeline.instance_eval { @filters.each(&:register) }
     TypeError:
       can't convert nil into String
     # ./lib/logstash/filters/geoip.rb:66:in `register'
     # ./spec/filters/geoip_spec.rb:40:in `(root)'
     # ./spec/filters/geoip_spec.rb:40:in `(root)'

  4) LogStash::Filters::GeoIP defaults "{"ip":"127.0.0.1"}" when processed
     Failure/Error: pipeline.instance_eval { @filters.each(&:register) }
     TypeError:
       can't convert nil into String
     # ./lib/logstash/filters/geoip.rb:66:in `register'
     # ./spec/filters/geoip_spec.rb:53:in `(root)'
     # ./spec/filters/geoip_spec.rb:53:in `(root)'

  5) LogStash::Filters::GeoIP location field when longitude field is excluded behaves like an event with a [geoip][location] field should have a location field
     Failure/Error: plugin.register
     TypeError:
       can't convert nil into String
     Shared Example Group: "an event with a [geoip][location] field" called from ./spec/filters/geoip_spec.rb:166
     # ./lib/logstash/filters/geoip.rb:66:in `register'
     # ./spec/filters/geoip_spec.rb:150:in `(root)'

  6) LogStash::Filters::GeoIP location field when both latitude and longitude field are excluded behaves like an event with a [geoip][location] field should have a location field
     Failure/Error: plugin.register
     TypeError:
       can't convert nil into String
     Shared Example Group: "an event with a [geoip][location] field" called from ./spec/filters/geoip_spec.rb:171
     # ./lib/logstash/filters/geoip.rb:66:in `register'
     # ./spec/filters/geoip_spec.rb:150:in `(root)'

  7) LogStash::Filters::GeoIP location field when latitude field is excluded behaves like an event with a [geoip][location] field should have a location field
     Failure/Error: plugin.register
     TypeError:
       can't convert nil into String
     Shared Example Group: "an event with a [geoip][location] field" called from ./spec/filters/geoip_spec.rb:161
     # ./lib/logstash/filters/geoip.rb:66:in `register'
     # ./spec/filters/geoip_spec.rb:150:in `(root)'

  8) LogStash::Filters::GeoIP Specify the target "{"ip":"8.8.8.8"}" when processed
     Failure/Error: pipeline.instance_eval { @filters.each(&:register) }
     TypeError:
       can't convert nil into String
     # ./lib/logstash/filters/geoip.rb:66:in `register'
     # ./spec/filters/geoip_spec.rb:69:in `(root)'
     # ./spec/filters/geoip_spec.rb:69:in `(root)'

  9) LogStash::Filters::GeoIP Specify the target "{"ip":"127.0.0.1"}" when processed
     Failure/Error: pipeline.instance_eval { @filters.each(&:register) }
     TypeError:
       can't convert nil into String
     # ./lib/logstash/filters/geoip.rb:66:in `register'
     # ./spec/filters/geoip_spec.rb:82:in `(root)'
     # ./spec/filters/geoip_spec.rb:82:in `(root)'

  10) LogStash::Filters::GeoIP correct encodings with ASN db "{"ip":"187.2.0.0"}" when processed
     Failure/Error: let(:pipeline) { LogStash::Pipeline.new(config) }
     LogStash::ConfigurationError:
       Something is wrong with your configuration.
     # (eval):7:in `initialize'
     # ./spec/filters/geoip_spec.rb:134:in `(root)'
     # ./spec/filters/geoip_spec.rb:134:in `(root)'

  11) LogStash::Filters::GeoIP correct encodings with ASN db "{"ip":"189.2.0.0"}" when processed
     Failure/Error: let(:pipeline) { LogStash::Pipeline.new(config) }
     LogStash::ConfigurationError:
       Something is wrong with your configuration.
     # (eval):7:in `initialize'
     # ./spec/filters/geoip_spec.rb:137:in `(root)'
     # ./spec/filters/geoip_spec.rb:137:in `(root)'

  12) LogStash::Filters::GeoIP correct encodings with ASN db "{"ip":"1.1.1.1"}" when processed
     Failure/Error: let(:pipeline) { LogStash::Pipeline.new(config) }
     LogStash::ConfigurationError:
       Something is wrong with your configuration.
     # (eval):7:in `initialize'
     # ./spec/filters/geoip_spec.rb:131:in `(root)'
     # ./spec/filters/geoip_spec.rb:131:in `(root)'

  13) LogStash::Filters::GeoIP correct encodings with ASN db "{"ip":"161.24.0.0"}" when processed
     Failure/Error: let(:pipeline) { LogStash::Pipeline.new(config) }
     LogStash::ConfigurationError:
       Something is wrong with your configuration.
     # (eval):7:in `initialize'
     # ./spec/filters/geoip_spec.rb:140:in `(root)'
     # ./spec/filters/geoip_spec.rb:140:in `(root)'

  14) LogStash::Filters::GeoIP correct encodings with default db "{"ip":"1.1.1.1"}" when processed
     Failure/Error: pipeline.instance_eval { @filters.each(&:register) }
     TypeError:
       can't convert nil into String
     # ./lib/logstash/filters/geoip.rb:66:in `register'
     # ./spec/filters/geoip_spec.rb:101:in `(root)'
     # ./spec/filters/geoip_spec.rb:100:in `(root)'

  15) LogStash::Filters::GeoIP correct encodings with default db "{"ip":"189.2.0.0"}" when processed
     Failure/Error: pipeline.instance_eval { @filters.each(&:register) }
     TypeError:
       can't convert nil into String
     # ./lib/logstash/filters/geoip.rb:66:in `register'
     # ./spec/filters/geoip_spec.rb:110:in `(root)'
     # ./spec/filters/geoip_spec.rb:109:in `(root)'

Finished in 1.06 seconds
15 examples, 15 failures

from logstash-filter-geoip.

jhitze avatar jhitze commented on June 24, 2024

Bah. There is no vendor folder for the ASNDB. I guess I can fix that too. Is there some other way that you guys set up the test environment? Because I'm cloning just this repo and it the tests don't work. I had a similar issue with the logstash-output-riemann repo, but I assumed that was related to it having zero tests.

from logstash-filter-geoip.

jhitze avatar jhitze commented on June 24, 2024

Annnnnd I found the rake file. >.<

Sorry for the stream of consciousness comments, lol.

I'm going to update the readme.md to explain this part so the next person doesn't run into this.

from logstash-filter-geoip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.