Hi all, I am new to Sensu, just installed it and am evaluating at the moment. As we have a need like most shops to get fairly verbose notifications via SMS/email, I also installed the mailer.rb handler from the Sensu Community Plugins. In it, it requires sensu-handler, which I thought was part of the installed gem sensu-plugin and in fact I can find it in the embedded path:
find /opt/sensu/embedded -name “sensu-handler”
/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-plugin-0.2.2/lib/sensu-handler.rb
So the error I’m getting is:
/etc/sensu/handlers/mailer.rb:12:in `require’: no such file to load – sensu-handler (LoadError)\n"}"
But if I change to EMBEDDED_RUBY=true in /etc/init.d/sensu-service and set the shebang in mailer.rb to /opt/sensu/embedded/bin/ruby, I get errors on another required gem, mail, which I have installed along with other dependencies.
{“type”:“pipe”,“command”:"/etc/sensu/handlers/mailer.rb",“mail_from”:“sensu@xxx”,“mail_to”:“xxx@xxx.com”,“name”:“mailer”},“output”:"/opt/sensu/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require’: cannot load such file – mail (LoadError)\n"}
{“type”:“pipe”,“command”:"/etc/sensu/handlers/mailer.rb",“mail_from”:“sensu@xxx”,“mail_to”:“name@xx.com”,“name”:“mailer”},“output”:"\tfrom /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require’\n"}
{“type”:“pipe”,“command”:"/etc/sensu/handlers/mailer.rb",“mail_from”:“sensu@xxx”,“mail_to”:“name@xxx.com”,“name”:“mailer”},“output”:"\tfrom /etc/sensu/handlers/mailer.rb:13:in `’\n"}
So I’m guessing that being new to Ruby there is some path/environment issue going on here. I’ve looked at other similar handlers, but they all also require mail and sensu-handler.
Thanks in advance!