druide.stats@gmail.com
2014-Feb-11 14:53 UTC
[Puppet Users] Nagios default files being overwritten
Hi,
I have a strange problem here. Most of my Nagios configuration are from
file {} directive, but I also need to modify a couple of Nagios' default
configuration. To do this, I use classes like this:
class nagios::gabarits {
nagios_host { 'linux-server':
use => 'generic-host',
check_period => '24x7',
check_interval => 5,
retry_interval => 1,
max_check_attempts => 10,
check_command => 'check-host-alive',
notification_period => 'notifications',
notification_interval => 120,
notification_options => 'd,u,r',
contact_groups => 'admins',
register => 0,
statusmap_image => 'linux40.png',
target => '/etc/nagios/objects/templates.cfg',
ensure => present,
}
}
Problem is: it replace the content of /etc/nagios/objects/templates.cfg
with the new host definition, but everything else in the file is gone!
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/0dd248af-9958-4486-a31b-72df7c6d8a66%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.