Git Product home page Git Product logo

logstash-filter-zeromq's People

Contributors

colinsurprenant avatar electrical avatar jakelandis avatar jordansissel avatar jsvd avatar nukemberg avatar ph avatar robbavey avatar talevy avatar yaauie avatar ycombinator avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

logstash-filter-zeromq's Issues

(0.1.6) add_tag configuration option inside of zeromq adds the same tags twice

logstash-filter-zeromq (0.1.6)

logstash.conf

input {
        stdin { codec => json }
}

filter {
#Decorate with user meta data
                mutate {
                        add_field => [ "metadata", '{"app":"myapp", "user":"myuser"}']
                }

                zeromq{
                        field => "metadata"
                        add_tag => [ "test" ] # results in test, test in [tags]
                        #add_tag => [ "test1", "test2" ] # results in test1, test2, test1, test2 in [tags]
                }

}

output {
        stdout { codec => rubydebug }
}

Output for stdin of {}:

{
      "@version" => "1",
    "@timestamp" => "2015-11-27T04:01:08.114Z",
          "host" => "myhost",
      "metadata" => "{..lots of data filled in from zeromq...}",
          "tags" => [
        [0] "test",
        [1] "test"
    ]
}

Hello World example of python script?

Hey there,

I have trouble putting the filter to work.
My little python script looks like this:

context = zmq.Context()
consumer_receiver = context.socket(zmq.REP)
consumer_receiver.bind("tcp://0.0.0.0:5557")
while True:
    work = consumer_receiver.recv()
    consumer_receiver.send(work)

And my logstash config:

input {
    tcp { port => 5000 }
}

filter {
   zeromq {
        address => "tcp://192.168.59.3:5557"
   }
}

output {
    stdout { codec => rubydebug }
}

This should send the event to the script and get the same event in return, but I got the following message:

{:timestamp=>"2015-03-02T18:05:33.390000+0100", :message=>"0mq filter exception", :address=>"tcp://192.168.59.3:5557", :exception=>#<NoMethodError: undefined method `[]' for nil:NilClass>, :backtrace=>["/opt/logstash/lib/logstash/event.rb:163:in `overwrite'", "/opt/logstash/lib/logstash/filters/zeromq.rb:197:in `filter'", "(eval):23:in `initialize'", "org/jruby/RubyProc.java:271:in `call'", "/opt/logstash/lib/logstash/pipeline.rb:262:in `filter'", "/opt/logstash/lib/logstash/pipeline.rb:203:in `filterworker'", "/opt/logstash/lib/logstash/pipeline.rb:143:in `start_filters'"], :level=>:warn}
nil

What do I miss?

EDIT: Forgot to mention... I am using logstash 1.4.2 on fedora20

logstash.noarch             1.4.2-1_2c0f5a1          @logstash-1.4
logstash-contrib.noarch     1.4.2-1_efd53ef          @logstash-1.4

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.