The sensu checks fails to execute, the sensu client logs show the following error
checks dont work ("output":"/usr/bin/env: ruby: No such file or directory\n","status":127)
The sensu checks fails to execute, the sensu client logs show the following error
checks dont work ("output":"/usr/bin/env: ruby: No such file or directory\n","status":127)
You can also use the embedded Ruby by setting EMBEDDED_RUBY=true
in /etc/default/sensu
. It works very well but only if you have ruby checks only. You cannot set embedded ruby setting for bash, python or other languages checks.
the community plugins for sensu, use #!/usr/bin/env ruby
this looks for the ruby executable under /usr/bin/env.
If you dont have ruby installed, and the only place ruby is either chef client or sensu client as embedded, then here is what you can do to fix it.
Create a symbolic link for ruby, such that the plugins can now find ruby to execute the code
ln -s /opt/sensu/embedded/bin/ruby /usr/bin/ruby
also ensure that sensu user has execute permission on the plugin/script
This is also mentioned in the Sensu FAQ section.