sensu plugin install ... not!

sensu v0.28.5-2 on Ubuntu Xenial.

Trying to install the pagerduty plugin, but it seems confused

$ /opt/sensu/embedded/bin/sensu-install -v -p pagerduty

[SENSU-INSTALL] installing Sensu plugins …

[SENSU-INSTALL] provided Sensu plugins: [“pagerduty”]

[SENSU-INSTALL] compiled Sensu plugin gems: [“sensu-plugins-pagerduty”]

[SENSU-INSTALL] determining if Sensu gem ‘sensu-plugins-pagerduty’ is already installed …

[SENSU-INSTALL] gem list -i sensu-plugins-pagerduty

[SENSU-INSTALL] Sensu gem ‘sensu-plugins-pagerduty’ has not been installed

[SENSU-INSTALL] Sensu plugin gems to be installed: [“sensu-plugins-pagerduty”]

[SENSU-INSTALL] installing Sensu gem ‘sensu-plugins-pagerduty’

[SENSU-INSTALL] gem install sensu-plugins-pagerduty --no-ri --no-rdoc --verbose

[SENSU-INSTALL] failed to install Sensu gem ‘sensu-plugins-pagerduty’

[SENSU-INSTALL] please take note of any failure messages above

[SENSU-INSTALL] make sure you have build tools installed (e.g. gcc)

[SENSU-INSTALL] trying to determine the Sensu plugin homepage for sensu-plugins-pagerduty …

sh: 1: gem: not found

Is there an expectation that /opt/sensu/embedded/bin would be in my $PATH?

Have you made sure that you have installed:

  • gcc

  • ruby-dev (possibly)

The bin location does not need to be in your path, it is in the path of the sensu user and is used in the correct way by the plugin installer automatically (as far as I remember).

···

On Friday, April 7, 2017 at 10:34:10 PM UTC+2, Mark Foster wrote:

[SENSU-INSTALL] failed to install Sensu gem ‘sensu-plugins-pagerduty’

[SENSU-INSTALL] please take note of any failure messages above

[SENSU-INSTALL] make sure you have build tools installed (e.g. gcc)

[SENSU-INSTALL] trying to determine the Sensu plugin homepage for sensu-plugins-pagerduty …

sh: 1: gem: not found

Is there an expectation that /opt/sensu/embedded/bin would be in my $PATH?

You will want to use /opt/sensu/bin/sensu-install which is a wrapper around the sensu-install script in /opt/sensu/embedded/bin/sensu-install that sets a few environment variables including PATH.

···

On Fri, 14 Apr 2017 at 13:42 Alexander Skiba ghostlyrics@gmail.com wrote:

On Friday, April 7, 2017 at 10:34:10 PM UTC+2, Mark Foster wrote:

[SENSU-INSTALL] failed to install Sensu gem ‘sensu-plugins-pagerduty’

[SENSU-INSTALL] please take note of any failure messages above

[SENSU-INSTALL] make sure you have build tools installed (e.g. gcc)

[SENSU-INSTALL] trying to determine the Sensu plugin homepage for sensu-plugins-pagerduty …

sh: 1: gem: not found

Is there an expectation that /opt/sensu/embedded/bin would be in my $PATH?

Have you made sure that you have installed:

  • gcc
  • ruby-dev (possibly)

The bin location does not need to be in your path, it is in the path of the sensu user and is used in the correct way by the plugin installer automatically (as far as I remember).