Closed christopherdriscoll closed 8 years ago
Can you try updating the handler command to the below to specify the json key that your configuration resides in:
/opt/sensu/embedded/bin/ruby /opt/sensu/embedded/bin/handler-mailer.rb -j rubymailer
@Evesy - That worked, thanks!
Using sensu version 0.25.6 and sensu-plugins-mailer version 1.0.0. My mailer config is located in /etc/sensu/conf.d and reads as follows (sensitive information changed):
I don't receive any emails, but I do see this in the logs:
{"timestamp":"2016-08-01T09:10:07.567878-0500","level":"info","message":"handler output","handler":{"type":"pipe","command":"/opt/sensu/embedded/bin/ruby /opt/sensu/embedded/bin/handler-mailer.rb","name":"rubymailer"},"output":["/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-1.0.0/bin/handler-mailer.rb:141:in
build_body': undefined method
[]' for nil:NilClass (NoMethodError)\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-mailer-1.0.0/bin/handler-mailer.rb:169:inhandle'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.4.0/lib/sensu-handler.rb:81:in
block in class:Handler'\nwarning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\nwarning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin\n"]}