example42 / puppet-nagios

Puppet module for Nagios
Other
4 stars 18 forks source link

log_file parameter not used #30

Open ghost opened 10 years ago

ghost commented 10 years ago

There is a parameter to the nagios classed called "log_file". As far as I can tell, that parameter is never used. The default log file is called nagios._log right now. I would like to change that to nagios.log, but it doesn't look like there's a way to do that right now.

alvagante commented 10 years ago

log_file param is an example42 standard which was used by puppi, when activated. It can be used also in templates, as it SHOULD be here, but instead is used an incorrect:

log_file=<%= scope.lookupvar('nagios::log_dir') %>/nagios._log

I would change it to

log_file=<%= scope.lookupvar('nagios::log_file') %>

and verify in params.pp if it's correctly evaluated.

A PR on this is welcomed.

ghost commented 10 years ago

Sounds good, I'll get a PR pulled together. Is there a reason that you default to log file to nagios._log instead of nagios.log?

alvagante commented 10 years ago

Not that I remember of, probably a typo.