Issue #19422 has been reported by Ben Roberts.
----------------------------------------
Bug #19422: Nagios_host provider undefined method file=
https://projects.puppetlabs.com/issues/19422
Author: Ben Roberts
Status: Unreviewed
Priority: Normal
Assignee:
Category: nagios
Target version:
Affected Puppet version: 3.1.0
Keywords: puppet nagios exported resources ruby19
Branch:
During a puppet run, the nagios_host provider fails to read the existing
generated hosts.cfg file with the following error:
<pre>
Error: Could not prefetch nagios_host provider 'naginator': undefined method
`file=' for #<Puppet::Error:0x000000035ae698>
</pre>
The file is then regenerated from scratch, leading to changes being generated
on every puppet run.
All clients export the following resource:
<pre>
$monitor = extlookup('foo')
$parents = extlookup('bar')
@@nagios_host {
$::fqdn:
target => '/etc/icinga/conf.d/hosts.cfg',
alias => $::hostname,
address => $::fqdn,
use => 'linux-server',
active_checks_enabled => $monitor,
parents => $parents;
}
</pre>
The icinga service collects all exported resources with:
<pre>
Nagios_host <<||>> {
target => '/etc/icinga/conf.d/hosts.cfg',
notify => Exec['icinga-verify'], # runs icinga -v icinga.cfg and
notifies Service['icinga'] if valid
}
</pre>
All hosts are running Sabayon (Gentoo), with puppet 3.1.0 and ruby "1.9.3p194
(2012-04-20 revision 35410) [x86_64-linux]"
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.