example42 / puppet-nagios

Puppet module for Nagios
Other
4 stars 18 forks source link

Issue with auto including nagios::target #16

Closed lieutdan13 closed 11 years ago

lieutdan13 commented 11 years ago

In init.pp on line 396 (https://github.com/example42/puppet-nagios/blob/master/manifests/init.pp#L396), nagios::target is included, causing a nagios host to be created. This causes an issue if I want to have a custom host configuration for the Nagios server itself.

It looks like ${nagios::target::magic_tag} is the reason for including it there in the first place. In nagios::target line 21 (https://github.com/example42/puppet-nagios/blob/master/manifests/target.pp#L21), there is a TODO that may fix this issue.

alvagante commented 11 years ago

This is a bit tricky to manage. I might add ANOTHER top scope variable (like $nagios_host_template) that allows the setting of the host template to use (with generic-host being the default). Would that suffice for you?

lieutdan13 commented 11 years ago

Ideally I would be able to declare the host of my Nagios Server just like I do any other host. I'm mostly looking for the ability to add a parent host and possibly an icon. What if you allowed a hash of host settings to be passed to the nagios class? This would allow for more flexibility in creating the host.

I will experiment today with the above solution. I'll let you know if I find the answer.