1

I have sensu server and sensu-client Installed on one machine (centos) and installed the the plugins through gem.

Everything was good when I run the check_ping.rb from the command line, but When I configure the same check in /etc/sensu/conf.d/ and check in the UI I am getting this ruby issue;

gem install sensu-plugins-network-checks

I have ruby installed of 1.9.3 version

and configured EMBEDDED_RUBY=true

when I check the UI the below is the error I am facing

/opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- net/ping (LoadError)
from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/sensu-plugins-network-checks-0.2.4/bin/check-ping.rb:31:in `<main>'
Sensu::Plugin::CLI: ["Not implemented! You should override Sensu::Plugin::CLI#run."]

Can someone help with this?

Sam Willis
  • 4,001
  • 7
  • 40
  • 59
IMRAN SHAIK
  • 615
  • 2
  • 6
  • 11

1 Answers1

0

It is a common issue that Gems get installed but not to the embedded ruby which you are using. what you want to do is /opt/sensu/embedded/bin/gem install net/ping so it is in the right place.

The alternative option for this would be to edit /etc/default/sensu file and change embedded ruby to false then it would use your regular ruby and the corresponding gems.

Rick Rackow
  • 1,490
  • 8
  • 19