Sensu puppet keeps installing plugins globally

I’m not entirely sure if this is normal behavior or not, but I’m trying to configure Sensu via puppet to use the embedded ruby.

Below is a snippet of my hiera config:

sensu::use_embedded_ruby:true
sensu::package_list:

  • sensu-plugins-http
  • sensu-plugins-disk-checks
  • sensu-plugins-cpu-checks

``

And below is the relevant portion of my manifest:

$plugins = hiera_array(‘sensu::package_list’)
package { $plugins:
provider => sensu_gem,
ensure => ‘latest’
}

``

Some other things I tried with no results…

  • using sensu::plugin instead of package
  • defining sensu::gem_path
···

Everything for sensu installs only in the embedded ruby, it’s just plugins that aren’t abiding by that rule. Is there another way to install plugins that I’m missing?

Thanks!

The puppet code looks correct to me.

What makes you think that they are *not* installed using the embedded ruby?
Can you pastebin /opt/sensu/embedded/bin/gem list ?

···

On Tue, Apr 5, 2016 at 12:16 PM, Joshua Porter <joshporter1@gmail.com> wrote:

I'm not entirely sure if this is normal behavior or not, but I'm trying to
configure Sensu via puppet to use the embedded ruby.

Below is a snippet of my hiera config:

sensu::use_embedded_ruby:true
sensu::package_list:
  - sensu-plugins-http
  - sensu-plugins-disk-checks
  - sensu-plugins-cpu-checks

And below is the relevant portion of my manifest:

$plugins = hiera_array('sensu::package_list')
package { $plugins:
  provider => sensu_gem,
  ensure => 'latest'
}

Some other things I tried with no results..

using sensu::plugin instead of package
defining sensu::gem_path

Everything for sensu installs only in the embedded ruby, it's just plugins
that aren't abiding by that rule. Is there another way to install plugins
that I'm missing?

Thanks!

Here’s the list from /opt/sensu/embedded/bin/gem: http://pastebin.com/zCg7Tfs4

And the global gem list: http://pastebin.com/hSMwj7EC

After messing with things a little more, I noticed some odd behavior… dunno if it’s sensu-puppet or just puppet in general…

I uninstalled all plugin gems from the global and embedded ruby…

  • puppet agent -t installed the gems globally and not in the embedded ruby
  • the puppet daemon installed the gems in the embedded ruby
    So I’m not sure if that’s normal behavior for puppet agent -t, but I just uninstalled the global plugins and I’ll wait to see if they get reinstalled by the puppet daemon.
···

On Wednesday, April 6, 2016 at 12:06:34 AM UTC-4, Kyle Anderson wrote:

The puppet code looks correct to me.

What makes you think that they are not installed using the embedded ruby?
Can you pastebin /opt/sensu/embedded/bin/gem list ?

On Tue, Apr 5, 2016 at 12:16 PM, Joshua Porter joshp...@gmail.com wrote:

I’m not entirely sure if this is normal behavior or not, but I’m trying to
configure Sensu via puppet to use the embedded ruby.

Below is a snippet of my hiera config:

sensu::use_embedded_ruby:true
sensu::package_list:

  • sensu-plugins-http
  • sensu-plugins-disk-checks
  • sensu-plugins-cpu-checks

And below is the relevant portion of my manifest:

$plugins = hiera_array(‘sensu::package_list’)
package { $plugins:
provider => sensu_gem,
ensure => ‘latest’
}

Some other things I tried with no results…

using sensu::plugin instead of package
defining sensu::gem_path

Everything for sensu installs only in the embedded ruby, it’s just plugins
that aren’t abiding by that rule. Is there another way to install plugins
that I’m missing?

Thanks!

I would like to see a puppet agent -t --debug.
It almost sounds like they are applying different puppet code.

···

On Wed, Apr 6, 2016 at 11:41 AM, Joshua Porter <joshporter1@gmail.com> wrote:

Here's the list from /opt/sensu/embedded/bin/gem:
amq-protocol (1.9.2)amqp (1.5.0)async_sinatra (1.2.0)aws (2.10.2)bigdeci - Pastebin.com
And the global gem list: aws (2.10.2)bigdecimal (1.2.8)bundler (1.11.2)bundler-unload (1.0.2)di - Pastebin.com

After messing with things a little more, I noticed some odd behavior.. dunno
if it's sensu-puppet or just puppet in general..

I uninstalled all plugin gems from the global and embedded ruby...

puppet agent -t installed the gems globally and not in the embedded ruby
the puppet daemon installed the gems in the embedded ruby

So I'm not sure if that's normal behavior for puppet agent -t, but I just
uninstalled the global plugins and I'll wait to see if they get reinstalled
by the puppet daemon.

On Wednesday, April 6, 2016 at 12:06:34 AM UTC-4, Kyle Anderson wrote:

The puppet code looks correct to me.

What makes you think that they are *not* installed using the embedded
ruby?
Can you pastebin /opt/sensu/embedded/bin/gem list ?

On Tue, Apr 5, 2016 at 12:16 PM, Joshua Porter <joshp...@gmail.com> wrote:
> I'm not entirely sure if this is normal behavior or not, but I'm trying
> to
> configure Sensu via puppet to use the embedded ruby.
>
> Below is a snippet of my hiera config:
>
> sensu::use_embedded_ruby:true
> sensu::package_list:
> - sensu-plugins-http
> - sensu-plugins-disk-checks
> - sensu-plugins-cpu-checks
>
>
>
> And below is the relevant portion of my manifest:
>
> $plugins = hiera_array('sensu::package_list')
> package { $plugins:
> provider => sensu_gem,
> ensure => 'latest'
> }
>
> Some other things I tried with no results..
>
> using sensu::plugin instead of package
> defining sensu::gem_path
>
>
> Everything for sensu installs only in the embedded ruby, it's just
> plugins
> that aren't abiding by that rule. Is there another way to install
> plugins
> that I'm missing?
>
> Thanks!

I think we’ve figured it out… I was doing a sudo su - and that pulled in GEM_HOME which was causing the issues. Thanks again for the help!

···

On Wednesday, April 6, 2016 at 9:54:10 PM UTC-4, Kyle Anderson wrote:

I would like to see a puppet agent -t --debug.
It almost sounds like they are applying different puppet code.

On Wed, Apr 6, 2016 at 11:41 AM, Joshua Porter joshp...@gmail.com wrote:

Here’s the list from /opt/sensu/embedded/bin/gem:
http://pastebin.com/zCg7Tfs4

And the global gem list: http://pastebin.com/hSMwj7EC

After messing with things a little more, I noticed some odd behavior… dunno
if it’s sensu-puppet or just puppet in general…

I uninstalled all plugin gems from the global and embedded ruby…

puppet agent -t installed the gems globally and not in the embedded ruby
the puppet daemon installed the gems in the embedded ruby

So I’m not sure if that’s normal behavior for puppet agent -t, but I just
uninstalled the global plugins and I’ll wait to see if they get reinstalled
by the puppet daemon.

On Wednesday, April 6, 2016 at 12:06:34 AM UTC-4, Kyle Anderson wrote:

The puppet code looks correct to me.

What makes you think that they are not installed using the embedded
ruby?
Can you pastebin /opt/sensu/embedded/bin/gem list ?

On Tue, Apr 5, 2016 at 12:16 PM, Joshua Porter joshp...@gmail.com wrote:

I’m not entirely sure if this is normal behavior or not, but I’m trying
to
configure Sensu via puppet to use the embedded ruby.

Below is a snippet of my hiera config:

sensu::use_embedded_ruby:true
sensu::package_list:

  • sensu-plugins-http
  • sensu-plugins-disk-checks
  • sensu-plugins-cpu-checks

And below is the relevant portion of my manifest:

$plugins = hiera_array(‘sensu::package_list’)
package { $plugins:
provider => sensu_gem,
ensure => ‘latest’
}

Some other things I tried with no results…

using sensu::plugin instead of package
defining sensu::gem_path

Everything for sensu installs only in the embedded ruby, it’s just
plugins
that aren’t abiding by that rule. Is there another way to install
plugins
that I’m missing?

Thanks!