On 08-06-11 16:29, Chris Phillips wrote:
updated, and hopefully finished:
Facter.add(:bp_nagios_hostgroups) do
setcode do
if FileTest.exists?(/var/lib/puppet/classes.txt)
bp_nagios_hostgroups =
File.open(/var/lib/puppet/classes.txt) { |file|
Hello
i want to archive the following:
i define an exported ressource for HostX to be monitored in nagios:
@@nagios_host { $fqdn:
ensure = present,
alias = $hostname,
address= $ipadress,
use=
On 8 June 2011 13:30, Martijn Grendelman mart...@iphion.nl wrote:
Hi,
i want to archive the following:
i define an exported ressource for HostX to be monitored in nagios:
@@nagios_host { $fqdn:
ensure = present,
alias = $hostname,
I solved this in a similar manner. I wrote a custom fact (which essentially
returned /var/lib/puppet/state/classes.txt) and then a custom function that
generated a list of hostgroups based on that.
On Wed, Jun 8, 2011 at 6:47 AM, Chris Phillips ch...@untrepid.com wrote:
On 8 June 2011 13:30,
Some more specifics on *exactly* how you manage this text file would be
appreciated.
On 8 June 2011 15:00, Brian Gallew g...@gallew.org wrote:
I solved this in a similar manner. I wrote a custom fact (which
essentially returned /var/lib/puppet/state/classes.txt) and then a custom
function
Actually, I think I see what you mean here, I have a custom fact mid write
which looks like this:
Facter.add(:nagios_hostgroups) do
setcode do
if FileTest.exists?(/var/lib/puppet/classes.txt)
nagios_hostgroups =
File.open(/var/lib/puppet/classes.txt) { |file|
updated, and hopefully finished:
Facter.add(:bp_nagios_hostgroups) do
setcode do
if FileTest.exists?(/var/lib/puppet/classes.txt)
bp_nagios_hostgroups =
File.open(/var/lib/puppet/classes.txt) { |file|
file.each { |line|
if