I am having issues with a custom plugin and not exactly where to turn.
I am building a custom Logstash output plugin to build our Neo4j models. Running the code externally with jruby included with Logstash, I have no issues creating a session to our server. If run as a plugin, I end up with an undefined method error.
undefined method graph_db' for #<Neo4j::Server::CypherSession:0x3922b0a5>
/opt/logstash/bin/logstash version
logstash 2.1.1
Neo4j Community Version 2.3.1
Gems (Tested with earlier versions with similar behavior
neo4j - 6.0.4
neo4j-community - 2.2.4.1
I can generate the error with the below code.
require "logstash/outputs/base"
require "logstash/namespace"
require 'neo4j'
class LogStash::Outputs::neo4jGraph < LogStash::Outputs::Base
config_name "neo4jgraph"
def register
@session = Neo4j::Session.open(:server_db,"http://localhost:7474", basic_auth: { username: "", password: "" })
end
def receive(event)
end
end
Any ideas or direction I can look?
Thank you!