We are doing an application in which we have to find from where the message is triggering to RabbitMQ. We found that the message is posting to RabbitMQ from process.rb file. We tried to make a rest call to get what message is getting posted to RabbitMQ. So we added a gem rest-client-1.8.0 in our ubuntu machine. And we tried to add some code in server/process.rb and also we added require 'rest-client' in the code.
I have added the header "rest-client" as show below.
require "sensu/server/filter"
require "sensu/server/mutate"
require "sensu/server/handle"
require "rest-client"
Error:
/opt/sensu/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- rest-client (LoadError)
from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.20.3/lib/sensu/server/process.rb:5:in <top (required)>'
from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require'
from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.20.3/bin/sensu-server:7:in
'
from /opt/sensu/bin/sensu-server:23:in load'
from /opt/sensu/bin/sensu-server:23:in
'
Sensu is installed in the path "/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.20.3/lib/sensu" in our ubuntu machine. We tried to install the rest-client gem inside sensu as we found Sensu will run on its own Ruby. But we faced the same issue. Can you tell us where we have to install the gem? Is there any alternative way? I have to consume the message and i have to pass the payload in rest calls.