logstash-plugins / logstash-filter-translate

Translate filter for Logstash
Apache License 2.0
21 stars 47 forks source link

Implemented dictionary_url #7

Closed angel9484 closed 8 years ago

angel9484 commented 9 years ago

You can use a URL that needs to show a yml format, then you don’t need to put an yml file for each logstash server and maintain it. You only need to change the web service. Using a refresh interval and caching into a yml the results. No need to query all times to the web service. Merged with the latest changes until 2015-07-12

untergeek commented 9 years ago

Is there a way you can add some spec tests for this functionality?

angel9484 commented 9 years ago

Ops :-) Of course, I will do it this weekend.

angel9484 commented 9 years ago

Spec test added. Notice that one test is failing (in original repository too)

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} ....F.

Failures:

1) LogStash::Filters::Translate fallback value - allow sprintf "{"status":"200","missing_translation":"no match"}" when processed Failure/Error: insist { subject["translation"] } == "no match" Insist::Failure: Expected "no match", but got nil

/Users/nangel/.rvm/gems/jruby-1.7.20/gems/insist-1.0.0/lib/insist/assert.rb:8:in `assert'

 # /Users/nangel/.rvm/gems/jruby-1.7.20/gems/insist-1.0.0/lib/insist/comparators.rb:14:in`=='
 # ./spec/filters/translate_spec.rb:129:in `(root)'

Finished in 0.277 seconds (files took 2.76 seconds to load) 6 examples, 1 failure

Failed examples:

rspec ./spec/filters/translate_spec.rb:128 # LogStash::Filters::Translate fallback value - allow sprintf "{"status":"200","missing_translation":"no match"}" when processed

Randomized with seed 12133

angel9484 commented 9 years ago

@jordansissel What of this pull request is not right to accept merge this? can I do something to speed up the merge action? Thanks!

purbon commented 9 years ago

@angel9484 I think if we workout the download file comments, most the other stuff is good enough to go? what are you thoughts there?

angel9484 commented 9 years ago

Hello! yes, sorry, i was disconnected for holidays!, I think all the comments are nice! I will try to work with it this weekend!

angel9484 commented 9 years ago

@jordansissel @purbon Done! I hope you like the change!

angel9484 commented 9 years ago

Hello! I'm going to be on holidays between 29th Oct and 16th Nov with limited internet access!

Regards!

elasticsearch-release commented 9 years ago

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

purbon commented 9 years ago

please jenkins, test this.

angel9484 commented 8 years ago

now all the changes is done @purbon thanks for all :-)