Giter VIP home page Giter VIP logo

logstash-codec-plain's People

Contributors

colinsurprenant avatar electrical avatar jakelandis avatar jordansissel avatar jsvd avatar kares avatar ph avatar robbavey avatar suyograo avatar yaauie avatar ycombinator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

logstash-codec-plain's Issues

build failling all jobs

https://travis-ci.org/logstash-plugins/logstash-codec-plain/jobs/236449417

An error occurred while loading ./spec/codecs/plain_spec.rb.
Failure/Error: # encoding: utf-8
NameError:
  missing class name (`org.apache.logging.log4j.Level')
# file:/home/travis/.rvm/rubies/jruby-1.7.25/lib/jruby.jar!/jruby/java/java_package_module_template.rb:14:in `method_missing'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/logging/logger.rb:6:in `Logging'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/logging/logger.rb:5:in `LogStash'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/logging/logger.rb:4:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/util/loggable.rb:1:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/util/loggable.rb:2:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/settings.rb:1:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/settings.rb:2:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/environment.rb:1:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/environment.rb:5:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/json.rb:1:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/json.rb:2:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/event.rb:1:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/event.rb:4:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gems/logstash-core-5.4.0-java/lib/logstash/codecs/base.rb:1:in `(root)'
# /home/travis/.rvm/gems/jruby-1.7.25/gem

how logstash handle nil value properly with plain formater

I'm using logstash reading data from mysql to kafka. for save the disk space, I write output config as this:

kafka {
    codec => plain {
        format => "%{key1},%{key2},%{key3}"
    }
}

as I expect, by giving such input data:

{
    key1: value1,
    key2: nil,
    key3: value3
}

the output should as this:

value1,,value3

but the acutal output is this:

value1,%{key2},value3

how to set output config to convert the nil with ""?

  • Version: logstash 5.6.2
  • Operating System: debian8

Implement ECS-Compatibility Mode

This is a stub issue, and needs to be fleshed out with details specific to
this plugin.


As a part of the effort to make plugins able to run in an ECS-Compatible manner
by default in an upcoming release of Logstash, this plugin needs to either
implement an ECS-Compatibility mode or certify that it does not implicitly use
fields that conflict with ECS.

What charset to use?

Hi,

Im trying to read non UTF-8 file, it's IBM 500 file but i can't find it in the charset list provided with the plugin so i tried "US-ASCII".
Here is my config file:
input{
file {
path =>...
sincedb_path => "/dev/null"
codec => plain{charset =>"US-ASCII"}
start_position => "beginning"
}
}
output{stdout{}}

It doesn't work.
What i don't understand is that i don't have any error message, logstash starts and does nothing.
on my terminal i have only this message : "Logstash startup completed"

Any help please ?
Thanks

forced UTF-8 conversion results in data loss for non UTF-8 charsets

Setting any charset other than UTF-8 results in a call to data.encode(Encoding::UTF_8, :invalid => :replace, :undef => :replace), as seen here

yield LogStash::Event.new(MESSAGE_FIELD => @converter.convert(data))

https://github.com/elastic/logstash/blob/6179c9662a7fe0be2113d5bef764c1b314a740a9/logstash-core/lib/logstash/util/charset.rb#L12-L17

This results in data loss, depending on the encoding. For example, setting a charset => Encoding::BINARY may very well contain bytes that do not map to a UTF-8 encoded character. These bytes will get replaced by the special unicode character used for invalid replacements, thus losing data.

What is the rationale behind this forced UTF-8 conversion? I think the codec should make no assumptions as to what the desired encoding is, it is up to the pipeline developer to process the data through filters if necessary.

Right now its impossible to get non-UTF-8 data into logstash, there's no codec that just gets the data through as-is and I expected the "plain" codec to be able to do just that.

How to forbid plain plugin adding info before message

here is my config:
input {
file {
path => ["/Users/luorenshu/software/es-x-pack/logstash/config/test.log"]
}
}

filter {
}

output {

#stdout {codec => rubydebug}
stdout {
    codec => plain {   
        format => "%{message}" ## format可不写,不写为空,写了就定义格式  
    }   
}   

}

when i append message "test" into test.log, the message printed is "2018-02-23T07:39:00.196Z robertdeMacBook-Pro.local test", but i just want it to be "test"

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.