2

I am getting the below error while trying to run the sensu checks my ruby version is ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux-gnu]

/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- sensu-plugin/check/cli (LoadError) from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' from ./check-load.rb:30:in `main>'

Please guide me on how to fix the issue.

Aleksei Matiushkin
  • 119,336
  • 10
  • 100
  • 160
Narendra522
  • 167
  • 1
  • 5
  • 17

2 Answers2

4

The error cannot load such file -- sensu-plugin/check/cli indicates that the gem sensu-plugin cannot be found.

Ensure that you have this gem installed on the system you're running the check on - you should be able to install it with:

gem install sensu-plugin
thomaswsdyer
  • 346
  • 1
  • 10
1

In addition to the answer at https://stackoverflow.com/a/36116588/4039725, another possibility is: It could also be a permissions issue in directory /opt/sensu/embedded/lib/ruby/gems/2.4.0/gems. Go to the directory and do chmod -R 755 *. And then restart Sensu service.

Sandeep Kanabar
  • 1,264
  • 17
  • 33