0

I have written a icinga2(nagios) check in ruby. It uses the splunk-sdk-ruby gem and works perfectly when I run it either as my user or as root. But when I add it in to icinga2 to run, I get a gem load error:

/usr/local/rvm/rubies/ruby- .2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- splunk-sdk-ruby (LoadError)

I already require rubygems above the gem I need in my script. It looks like icinga2 is running under the icinga user, but I can't do a su - to that user to install the gem cause it says: This account is currently not available.

What am I missing here to make the gem available to all users?

cashman04
  • 1,134
  • 2
  • 13
  • 27

1 Answers1

0

The reason may be root permissions for the different users in your system.

Sam
  • 1,623
  • 1
  • 19
  • 31