sensu / sensu-puppet

Sensu Puppet module.
https://github.com/sensu/sensu-puppet
MIT License
165 stars 291 forks source link

allow to remove the prefix "^sensu-(plugins|extensions)" from sensu::plugins #1155

Closed maxadamo closed 4 years ago

maxadamo commented 5 years ago

Description of problem

I installed sensu-plugins-memory-checks one of the scripts contained in the plugin is called: check-ram.rb check-ram.rb requires a gem called vmstat You can check the documentation on Bonsai: sensu-plugins-memory-checks

I tried to install the gem vmstat using sensu::plugins but it fails because it prepends the prefix and it's not possible to customize this prefix.

I'd like to have a parameter called, for instance, prefix, which defaults to ^sensu-(plugins|extensions) but, for instance, it can be set to null: prefix => '',

treydock commented 5 years ago

@maxadamo I added #1156 that would allow you to install gems into Sensu's embedded Ruby. Adding a prefix property to the sensu_plugin type would be difficult as there are two types of prefixes and the property extension already modifies the prefix of the gem that gets installed.

treydock commented 5 years ago

Usage would either be:

package { 'vmstat':
  ensure   => 'installed',
  provider => 'sensu_gem',
}

Or

class { 'sensu::plugins':
  gem_dependencies => ['vmstat'],
}
maxadamo commented 5 years ago

I didn't comment yet, but that's of course better (it is the same as the old sensu if I recall correctly). Thanks.