Re: [Puppet Users] Puppet Nagios resources

2013-07-26 Thread Nikola Petrov
You can set Nagios_host { target => "/etc/nagios/conf.d/${::fqdn}.cfg", } somewhere in site.pp file; just make sure it is in the global scope. This is just defining a default parameter for the resource. Note that this is a bad practice as everything global -- Nikola On Mon, Jul 22, 2013

Re: [Puppet Users] Puppet Nagios resources

2013-07-23 Thread Jonathan Gazeley
On 23/07/13 02:50, Pete Brown wrote: I find it best to not use a target for the nagios resources. The provider is only able to delete them if you use the default locations. Yes, I'm aware of the limitations and have avoided setting the target until now. Unfortunately our Nagios config is so la

Re: [Puppet Users] Puppet Nagios resources

2013-07-23 Thread Jonathan Gazeley
Hi Matthew, Thanks for your response. I know your approach will work, but I'm reluctant to go through my manifests and change every reference to nagios_* to include a 'target' parameter. It's not only an effort to change now, but I also have to remember to add a 'target' every time I add Nagi

Re: [Puppet Users] Puppet Nagios resources

2013-07-22 Thread Pete Brown
On 23 July 2013 02:47, Matthew Nicholson wrote: > Jonathan, > > You would want to do it on the client level, when its exporting its host > definition, like: > > @@nagios_host { $hostname: > ensure => present, > alias => $hostname, > address => $ipaddress, > use => $template

Re: [Puppet Users] Puppet Nagios resources

2013-07-22 Thread Matthew Nicholson
Jonathan, You would want to do it on the client level, when its exporting its host definition, like: @@nagios_host { $hostname: ensure => present, alias => $hostname, address => $ipaddress, use => $template, hostgroups => $hostgroups, notes => "$manufacturer $p

[Puppet Users] Puppet Nagios resources

2013-07-22 Thread Jonathan Gazeley
Hi all, We've been using Puppet to write out our Nagios configs for ages. I think I understand it pretty well. Recently we've had reason to set 'target' on all Nagios resources, based on the fqdn of the monitored host. However I don't want to have to set 'target' by hand on all Nagios resourc