I am getting `require': cannot load such file -- sensu-plugin/check/cli (LoadError) . Help Needed

/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- sensu-plugin/check/cli (LoadError) from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in require’
from /var/cache/sensu/sensu-agent/9dd717a7a71fa78b7647b27e9bde303ebf5b14dbf6a9aef6050d30cb6e255058b1c82d1bb9e5dfdcc2ce5ae8a0804964c807500142d09beb2cffb735d93c9797/lib/ruby/2.4.0/bundler/gems/sensu-plugins-cpu-checks-24e5a5d7ff0a/bin/check-cpu.rb:28:in <top (required)>' from /var/cache/sensu/sensu-agent/9dd717a7a71fa78b7647b27e9bde303ebf5b14dbf6a9aef6050d30cb6e255058b1c82d1bb9e5dfdcc2ce5ae8a0804964c807500142d09beb2cffb735d93c9797/bin/check-cpu.rb:14:in load’
from /var/cache/sensu/sensu-agent/9dd717a7a71fa78b7647b27e9bde303ebf5b14dbf6a9aef6050d30cb6e255058b1c82d1bb9e5dfdcc2ce5ae8a0804964c807500142d09beb2cffb735d93c9797/bin/check-cpu.rb:14:in `’

i am getting these error i am installing sensu agent on amazon linux instance.

created below cpu check
Name Command Interval Cron Timeout TTL Subscriptions Handlers Assets Hooks Publish? Stdin? Metric Format Metric Handlers
───────────── ────────────────────────── ────────── ────── ───────── ───── ─────────────── ────────── ─────────────────────────────────────── ─────── ────────── ──────── ─────────────── ──────────────────
check-cpu check-cpu.rb -w 75 -c 90 60 0 0 system cpu-checks-plugins,sensu-ruby-runtime true fal

commands which i used in sensu-agent for the setup
sudo yum install sensu-go-cli
sensuctl configure -n --username admin --password password --namespace sensu-system --url http://:8080

sudo yum install sensu-go-agent

sensuctl asset add sensu-plugins/sensu-plugins-cpu-checks -r cpu-checks-plugins

sensuctl asset add sensu/sensu-ruby-runtime:0.0.10 -r sensu-ruby-runtime

sensuctl check create check-cpu --command β€˜check-cpu.rb -w 75 -c 90’ --interval 60 --subscriptions system --runtime-assets cpu-checks-plugins,sensu-ruby-runtime

sudo amazon-linux-extras install ruby2.6
gem install sensu-plugin

pease help me out resolving this issue

Is there a reason you’re using the Ruby plugins instead of the Golang ones?

1 Like

@aaronsachs i wasn’t aware of the Golang plugins. Thank You. it is working fine now.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.