example42 / puppet-nrpe

Nrpe Puppet Module
http://www.example42.com
Other
7 stars 27 forks source link

Pass array to pluginspackage #25

Open DimitriSteyaert opened 9 years ago

DimitriSteyaert commented 9 years ago

Hi, I want to disable the installation of pluginspackage "nagios-plugins-all" and instead install a few defined plugins such as nagios-plugins-ssh, nagios-plugins-disk, nagios-plugins-procs-1.4.16-10.el6.x86_64...

So I tried the following code:

$nrpeplugins = ['nagios-plugins-ssh','nagios-plugins-disk']
  class { '::nrpe':
    allowed_hosts   => 'nagios.myhost.be',
    dont_blame_nrpe => '0',
    use_ssl         => false,
    pluginspackage  => $nrpeplugins,
  }

This generates the following error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid argument of type 'Array' to 'defined' at /etc/puppetlabs/puppet/environments/production/modules/nrpe/manifests/init.pp:518 on node

Is there a way to pass an array of plugins that I want to see installed?

DimitriSteyaert commented 9 years ago

Hi, is it clear what I am asking or do you want some additional information?

alvagante commented 9 years ago

Yes it's clear. I currently have not much time to dedicate to the issue. As a workaround I would do something like:


$nrpeplugins = ['nagios-plugins-ssh','nagios-plugins-disk']
package { $nrpeplugins: ensure => present }
  class { '::nrpe':
    allowed_hosts   => 'nagios.myhost.be',
    dont_blame_nrpe => '0',
    use_ssl         => false,
    pluginspackage  => '',
  }
DimitriSteyaert commented 9 years ago

Thanks, I was already using this workaround in my environment :) I will see possible changes when you have more time.