Logstash input plugin errors

Hi all, i am developing logstash input plugin which will scrape data from facebook, but i have problems testing it in logstash, with that plugin, logstash fail to run, my config:

input { 
    fb-scrape {
       limit => "100"
       page_id => "123456"
       date_file => "dateConfig.conf"
       access_token => "xxxYYYzzz"
    }
}
output {
  stdout { codec => rubydebug }
}

terminal output from logstash:

ondro@ubuntu:/usr/share/logstash/bin$ sudo ./logstash --log.level trace --config.debug -f /etc/logstash/conf.d/logstash.conf
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[ERROR] 2018-01-21 13:52:17.662 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] agent - Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"NameError", :message=>"undefined local variable or method 'scrape_1' for #LogStash::Pipeline:0x5afefd31", :backtrace=>["(eval):8:in ''", "org/jruby/RubyKernel.java:994:in 'eval'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:86:in 'initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:171:in 'initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:40:in 'execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:335:in 'block in converge_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in 'with_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:332:in 'block in converge_state'", "org/jruby/RubyArray.java:1734:in 'each'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:319:in 'converge_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:166:in 'block in converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in 'with_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:164:in 'converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:90:in 'execute'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:343:in 'block in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in `block in initialize'"]}

Problem is probably with code of my plugin, because with stdin input logstash works, but how to find out whats wrong? Should i post code of my plugin as well here?
Thanks for any answer and for your time
Ondro

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