Well you can tell puppet to source a whole directory and put it
somewhere for you. Here is an example from our nagios application
specific manifest



<snip>
class app {
  #install the app package
  include app::install
  include base
  #generic nagios checks like memory, load, etc
  include nagios::target



  #application specific checks
  file {'/usr/local/nagios':
    ensure => 'directory',
  }

  file {'/usr/local/nagios/libexec/':
    ensure  => 'directory',
    recurse => 'true', #enable recursive directory management
    purge   => 'true', #purge all unmanaged junk
    force   => 'true', #also purge subdirs and links etc.
    owner   => 'nagios',
    group   => 'nagios',
    mode    => '0544',
    source  => 'puppet:///modules/app/nagios',
  }

  Class['app::params'] -> Class['app']
}
</snip>

Pay attention to the file resources. You can now put
your nagios checks in *modelpath/files/nagios/*. Change the path as
/usr/local/nagios/libexec is used here for historical reasons

Hope that helps. 

Best, Nikola


On Mon, Dec 03, 2012 at 03:47:24AM -0800, Gavin Williams wrote:
> Morning all 
> 
> I've had a quick google, but couldn't find anything useful for our 
> scenario... 
> 
> Basically, we use Nagios & NRPE in our environment, along with a hand-full 
> of in-house written plugins specific to our applications etc... 
> These scripts change on a fairly regular basis, so hand rolling a RPM each 
> time is too much work as far as i'm concerned... 
> 
> So I can easily get NRPE installed on a node using Puppet... However what 
> I'm struggling with is getting all the plugins synced over aswell... 
> 
> One suggestion I read was to use a file resource, however I've also read 
> about severe performance issues when working with tens of files... 
> I dont really want to have to create some kind of NFS file share to 
> distribute the files... 
> 
> So, any other ideas? 
> 
> Cheers 
> Gavin
> 
> P.S. Env consists of a single 3.0 Puppet Master, currently with about a 
> dozen nodes connected, but this will rapidly increase once we start full 
> roll-out... 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to