Ruby filter - How to access some elastic index data from a ruby filter

input {
file {
    path => ["/Users/akapit/Downloads/Report.csv"]
    start_position => "beginning"
    sincedb_path => "/dev/null"
}
}

filter {
    csv {
        separator => ","
        columns => ["Company",
	       "Platform",
           "Account",
		….
		..
            "Textbox7"]
    }
    jdbc_streaming {
        jdbc_driver_library => "/Applications/UnityJDBC/mongodb_unityjdbc_full.jar"
        jdbc_driver_class => "mongodb.jdbc.MongoDriver"
        jdbc_connection_string => "jdbc:mongo://localhost:27018/mydb”
        jdbc_user => ""
        jdbc_password => ""
        statement => "select value from app_values where setting = 'rate'"
        target => "rate"
        add_field => {"yeah" => "This is my rate: %{rate}"}
    }
}

output {
    stdout { codec => rubydebug }
    elasticsearch {
        action => "index"
        hosts => ["127.0.0.1:9200"]
        index => “report-%{+MM.dd.YYYY}"
        document_type => "report"
        #document_id => "%{id}"
        workers => 1
    }
}

That looks like the recommended settings.
What error are you seeing?

Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<Sequel::AdapterNotFound:
java::mongodb.jdbc.MongoDriver not loaded>, :backtrace=>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.