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... 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 ..
warkolm
(Mark Walkom)
March 1, 2016, 9:37pm
2
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:in
require'
/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:in
regis
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:in
initialize'
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:in
validate_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: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: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:in
validate'
/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:in
initialize'
/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:in
plugin'
org/jruby/RubyKernel.java:1079:in eval' (eval):158: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: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:in
execute'
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:in
run'
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:in
run'
Suggest some solution to solve this.