Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Use ruby object in logstash ruby filter
input {
stdin {}
filter {
ruby {
init => "load('ruby.rb');'value')"
code => "event['method']=@val.value()"
output {
# Debug sur la sortie standart
stdout { codec => rubydebug }
class Myclasse
attr_reader :value
attr_writer :value
def initialize(value)
@value = value
/opt/logstash/bin/logstash -f logstash.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.