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") { |fi
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|
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") { |
Some more specifics on *exactly* how you manage this text file would be
appreciated.
On 8 June 2011 15:00, Brian Gallew 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 that generated
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 wrote:
>
>
> On 8 June 2011 13:30, Martijn Grendel
On 8 June 2011 13:30, Martijn Grendelman 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,
>
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,
> address=> $ipadress,
> use
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=> "generi