hi!

I have no idea why i can't get this to work. i'm using puppet to 
automatically add nodes to my nagios server. So far i can add the nodes as 
hosts and add the services just fine (with a workaround with permissions). 
But when i try to add a host to a host group, i'm only seeing it being 
defined in the host.cfg definition not in the hostgroup.cfg file as a 
member. The host group got created but there are not members in the cfg 
file.

Here is the current definition. which i know currently works as it should, 
where it adds the host group name in the host definition. I've fiddled with 
these configs a bunch to try and get the member added but just can't figure 
it out. Any help would be AMAZING!

my puppet configs are:

Server side-
class nagios_server::import{

Nagioshost <<||>>{ require => Class['nagiosserver::install'], notify => 
File['hosts'] }

Nagiosservice <<||>>{ require => Class['nagiosserver::install'], notify => 
File['services'] }

Nagioshostgroup {require => Class['nagiosserver::install'], notify => 
File['hostgroups'],}

nagios_hostgroup { "all-hosts": target => 
"/etc/nagios3/objects/hostgroups/all-hosts.cfg", notify => 
File['hostgroups'], }

}


client side-
class nagios_client::targets {

@@nagios_host { $fqdn: 

ensure => present, 

alias => $hostname, address => $ipaddress, 

use => "linux-server", 

hostgroups => "all-hosts", 

target => "/etc/nagios3/objects/hosts/${::hostname}.cfg",

}

@@nagiosservice { "checkping${hostname}": 

checkcommand => "checkping!100.0,20%!500.0,60%", 

use => "generic-service", hostname => "$fqdn", 

notificationperiod => "24x7", 

servicedescription => "PING", 

target => "/etc/nagios3/objects/services/ping.cfg", }

}


I've tried doing 

   @@nagios_hostgroup {

        "all-hosts":

        target => "/etc/nagios3/objects/hostgroups/all-hosts.cfg",

        members => $hostname,

}


but that didn't work.  





-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/061ab6ab-4f27-46a5-9859-65c746f4f4d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to