[Puppet Users] Dependency of the collection of virtual ressources.

2011-05-26 Thread elderdakkar
Hello

i'm managing nagios with exported ressources.
i have some @@nagios_host a lot of @@nagios_service ressources.
Collecting the ressouces itself works fine with Nagios_host || and
Nagios_service ||.

BUT :D

i have a special nagios configuration layout: every host has its own
cfg file with the depending servicechecks. This means i have ONE file
with one host definition and all checks for this single host. And this
results in one problem on the puppet side: it seems, that
Nagios_service || locks the config file and the Nagios_host ||
process can't write its config to the same file. The means: the first
run writes some of the exported ressources to the nagios cfg. The
restart of nagios fails, because some of the hosts aren't written to
the cfg. The next run does the rest and nagios restarts successful.

Is there a way, to force puppet to start the collection of
Nagios_service || after Nagios_host || finishes?
Some kind of dependency?

i already tried chaining like:
Nagios_host || - Nagios_service || , but then the puppetrun
does nothing.

hope i expressed myself clear  :)

greetings

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Dependency of the collection of virtual ressources.

2011-05-26 Thread Adam Heinz
On Thu, May 26, 2011 at 7:14 AM, elderdakkar elderdak...@googlemail.com wrote:
 And this
 results in one problem on the puppet side: it seems, that
 Nagios_service || locks the config file and the Nagios_host ||
 process can't write its config to the same file.

Is it a requirement that all puppet-written nagios configuration go
into the same file?  Personally I do something like

@@nagios_host { $fqdn: target = /etc/nagios/conf.d/nagios_host.cfg }

@@nagios_hostextinfo { $fqdn: target =
/etc/nagios/conf.d/nagios_hostextinfo.cfg }

@@nagios_service { check_ping_$fqdn: target =
/etc/nagios/conf.d/$fqdn.cfg }
@@nagios_service { check_http_$fqdn: target =
/etc/nagios/conf.d/$fqdn.cfg }

So my services are grouped by host, but other configuration types all
go into the same file.

That said -- if I had it to do again, I think I would assign my
services to hostgroups in a static cfg file, and just have puppet do
host configuration.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.