Hello,
I've been trying to build multiple Nagios servers using Puppet (2.6.12), with no luck. I've got a nagios::server class that includes:
include nagios::server::commands
include nagios::server::contacts
include nagios::server::contactgroups
include nagios::server::timeperiods
include nagios::server::servicegroups
include nagios::server::hostgroups
and then it does it's collection by running all the Nagios_command <<| |>>, Nagios_contactgroups <<| |>>, etc.
In the contactgroups.pp manifest, for example, I have something like:
@@nagios_contactgroup {
"foo-admins_${hostname}":
contactgroup_name => 'foo-admins',
alias => 'foo-admins',
members => 'sysadmin1, sysadmin2';
}
My thinking was that by including the _${hostname} in the resource name, that it wouldn't cause conflicts between servers. However, when I run nagios::server on more than one system, I get err: Failed to apply catalog: Parameter alias failed: foo-admins can not create alias foo-admins: object already exists.
Everything seems to be working on the @@nagios_host and @@nagios_service resources, which include $hostname in their resource names.
Any help greatly appreciated.