Email plugin - logstas output

hi all,

i am using elasticsearch + logstash + kibana ( all are updated version). i enabled the email plugin in output section but i am facing following error:

output {
elasticsearch {
hosts => ["localhost:9200"]
sniffing => true
manage_template => false
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"
}

if "ERROR" in [message] {
email {
port => "587"
address => "smtp.gmail.com"
username => "xxxx@gmail.com"
password => "xxxxxxxx"
authentication => "plain"
use_tls => true
from => "xxxx@gmail.com"
subject => "logstash alert"
to => "xxxxxx@gmail.com"
via => "smtp"
body => "COOL 06... :slight_smile: Here is the event line that occured: %{message}"
}
}
stdout { codec => rubydebug }
}

$ bin/logstash -t -f conf.d/openstack.conf
The error reported is:
undefined method `on_load' for ActiveSupport:Module

how to resolve this error.
Any suggestions.

thanks & regards,
cooldharma06 .. :slight_smile:

What version are you running and on what OS?

hi warkolm

i am running logstash 2.2.0 in debian.

i think following logs might be useful which i got by running in logstash: (debug mode)

{:timestamp=>"2016-03-02T11:38:06.977000+0530", :message=>"config LogStash::Codecs::RubyDebug/@metadata = false", :level=>:debug, :file=

"logstash/config/mixin.rb", :line=>"122", :method=>"config_init"}
The error reported is:
undefined method on_load' for ActiveSupport:Module /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/awesome_print-1.6.1/lib/awesome_print.rb:29:in(root)'
org/jruby/RubyKernel.java:1040:in require' /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/lib/polyglot.rb:65:inrequire'
/home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-codec-rubydebug-2.0.5/lib/logstash/codecs/rubydebug.rb:1:in (root) ' /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-codec-rubydebug-2.0.5/lib/logstash/codecs/rubydebug.rb:18:inregis
ter'
/home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/config/mixin.rb:370:in validate_value ' /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/codecs/base.rb:15:ininitialize'
org/jruby/RubyArray.java:1613:in each' /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/config/mixin.rb:311:invalidate_check
_parameter_values'
org/jruby/RubyHash.java:1342:in each' /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/config/mixin.rb:306:invalidate_check
_parameter_values'
/home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/config/mixin.rb:305:in validate_check _parameter_values' /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/config/mixin.rb:220:invalidate'
/home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/config/mixin.rb:102:in config_init' /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/outputs/base.rb:63:ininitialize'
/home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/output_delegator.rb:28:in initialize' /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/pipeline.rb:403:inplugin'
org/jruby/RubyKernel.java:1079:in eval' (eval):158:ininitialize'
/home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/pipeline.rb:57:in initialize' /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/agent.rb:172:inexecute'
org/jruby/RubyProc.java:281:in call' /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/runner.rb:90:inrun'
org/jruby/RubyProc.java:281:in call' /home/opens/elk/logstash-2.2.2/vendor/bundle/jruby/1.9/gems/logstash-core-2.2.2-java/lib/logstash/runner.rb:95:inrun'

Suggest some solution to solve this.