sensu-plugins/sensu-plugins-mailer

default mailer handler fails in embedded ruby

Closed this issue · 5 comments

This is a cross post for the issue below since this is the right project. After following the install instructions, we're seeing that the default mailer plugin is throwing ruby errors from within the embedded ruby install. Note, installation is ubuntu 16.04 LTS.

Linux sensu-server-01 4.4.0-1016-aws #25-Ubuntu SMP Thu Apr 20 11:34:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

There is a similar comment on mysql below.

http://stackoverflow.com/questions/41520996/mysql-gem-install-error-on-ruby-2-4

{"timestamp":"2017-05-01T04:33:52.745000+0000","level":"error","message":"handler output","handler":{"command":"/opt/sensu/embedded/bin/handler-mailer.rb","type":"pipe","name":"default"},"event":{"id":"42aa4101-71fc-461a-a51b-501230ba1e9a"},"output":["/opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:270:in find_spec_for_exe': can't find gem sensu-plugins-mailer (>= 0.a) (Gem::GemNotFoundException)\n\tfrom /opt/sensu/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:298:in activate_bin_path'\n\tfrom /opt/sensu/embedded/bin/handler-mailer.rb:22:in `

'\n"]}

root@sensu-server-01:~# dpkg --list | grep sensu
ii sensu 0.29.0-7 amd64 A monitoring framework that aims to be simple, malleable, and scalable.
ii sensu-enterprise 2.5.4-1 all With Sensu Enterprise you can have all of the power of the best open-source monitoring framework (and community) in the world, plus third-party integrations designed to get Sensu up and running with the tools you are already using, and Enterprise-Class Support for when you need help.
ii sensu-enterprise-dashboard 1:2.7.0-2 amd64 With Sensu Enterprise you can have all of the power of the best open-source monitoring framework (and community) in the world, plus third-party integrations designed to get Sensu up and running with the tools you are already using, and Enterprise-Class Support for when you need help.

Hi! Did you upgraded from a previous version of Sensu? Or is it a fresh install? If you just updated, you need to reinstall all your plugins as stated in the 0.29 changelog

IMPORTANT: Sensu packages now include Ruby 2.4.1. Upgrading from prior versions of Sensu will require any plugin or extension gems to be re-installed under the new Ruby environment.

Hi Augustin, I was working on a fresh ubuntu VM in this case. There were no prior installations. What i'm wondering is if there were fragments from a gem install without using the embedded binary.

Quite a few of the plugins do not yet support ruby 2.4 yet which will take some effort. I have not looked into if this works with 2.4 but I will try to get around to it when I have some time.

I completely misread this, apologies. Hmm that does not make much sense. Can you show me the output of /opt/sensu/embedded/bin gem search sensu-plugins-mailer?

closing due to inactivity, please reply back if you are still seeing the issue and would like to work on this more.