Hi I am creating a new logstash output plugin and I'm trying to test it with logstash 5.5.1
I install it with bin/logstash-plugin install path/to/logstash-output-azure-0.1.1.gem
the out put is
Validating /path/to/logstash-output-azure-0.1.1.gem
Installing logstash-output-azure
Installation successful
my plugin has this
class LogStash::Outputs::LogstashAzureBlobOutput < LogStash::Outputs::Base
config_name "logstash_output_azure"
config :storage_account_name, valdiate: :string, required: false
config :storage_access_key, valdiate: :string, required: false
config :container_name, valdiate: :string, required: false
config :size_file, validate: :number, default: 1024 * 1024 * 5
config :time_file, validate: :number, default: 15
config :restore, validate: :boolean, default: true
config :temporary_directory, validate: :string, default: File.join(Dir.tmpdir, 'logstash')
config :prefix, validate: :string, default: ''
config :upload_queue_size, validate: :number, default: 2 * (Concurrent.processor_count * 0.25).ceil
config :upload_workers_count, validate: :number, default: (Concurrent.processor_count * 0.5).ceil
config :rotation_strategy, validate: %w[size_and_time size time], default: 'size_and_time'
config :tags, :validate => :array, :default => []
config :encoding, :validate => ["none", "gzip"], :default => "none"
attr_accessor :storage_account_name, :storage_access_key,:container_name,
:size_file,:time_file,:restore,:temporary_directory,:prefix,:upload_queue_size,
:upload_workers_count,:rotation_strategy,:tags,:encoding
my config file config/logstasg.conf
output {
logstash_output_azure {
storage_account_name => "someaccount"
container_name => "somename"
storage_access_key => "somekey"
}
}
when i start logstash with bin/logstash -f config/logstash.conf
I get the following errors
[2017-08-15T15:32:38,631][ERROR][logstash.plugins.registry] Problems loading a plugin with {:type=>"output", :name=>"logstash_output_azure", :path=>"logstash/outputs/logstash_output_azure", :error_message=>"NameError", :error_class=>NameError, :error_backtrace=>["/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/plugins/registry.rb:226:in `namespace_lookup'", "/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/plugins/registry.rb:162:in `legacy_lookup'", "/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/plugins/registry.rb:138:in `lookup'", "/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/plugins/registry.rb:180:in `lookup_pipeline_plugin'", "/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/plugin.rb:140:in `lookup'", "/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/pipeline.rb:100:in `plugin'", "(eval):8:in `initialize'", "org/jruby/RubyKernel.java:1079:in `eval'", "/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/pipeline.rb:72:in `initialize'", "/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/pipeline.rb:156:in `initialize'", "/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/agent.rb:286:in `create_pipeline'", "/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/agent.rb:95:in `register_pipeline'", "/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/runner.rb:314:in `execute'", "/path/to/Downloads/logstash-5.5.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/path/to/Downloads/logstash-5.5.1/logstash-core/lib/logstash/runner.rb:209:in `run'", "/path/to/Downloads/logstash-5.5.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/path/to/Downloads/logstash-5.5.1/lib/bootstrap/environment.rb:71:in `(root)'"]}
[2017-08-15T15:32:38,649][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Couldn't find any output plugin named 'logstash_output_azure'. Are you sure this is correct? Trying to load the logstash_output_azure output plugin resulted in this error: Problems loading the requested plugin named logstash_output_azure of type output. Error: NameError NameError"}
I have checked and the plugin apears to be installed when using bin/logstash-plugin list
I don't know why it fails to work