That's strange but I had to rename nagios class to nagios-server and include it instead to fix the problem.
Maybe it's related to that I have similar problem class nagios-client { include nagios::params, nagios::nrpe, nagios::plugins } class ssa::nagios-client { # include nagios-client include nagios::params, nagios::nrpe, nagios::plugins $nrpe_checks = [ cpu, uptime, mem, postfix ] nagios::nrpe::nrpe_check { $nrpe_checks: } } Note that in ssa::nagios-client "include nagios-client" did not work and I got similar error "Could not find dependency ..." on another resource and had to use "include nagios::params, nagios::nrpe, nagios::plugins" instead. Any idea what's going on here? Thanks On Aug 10, 9:04 pm, piavlo <lolitus...@gmail.com> wrote: > Hi, > > I have the following: > > class nagios { > > include nagios::params > > file { [ "${nagios::params::nagios_confdir}", > "${nagios::params::nagios_confdir}/app_alerts", > "${nagios::params::nagios_confdir}/app_alerts/ssa", > "${nagios::params::nagios_confdir}/app_alerts/ssa/ > services" ]: > ensure => directory, > owner => 'root', > group => 'root', > mode => 755, > } > > define couchdb_check () { > > $couchdb_bind_address = "localhost" > $couchdb_port = "5984" > $couchdb_baseurl = "http://${couchdb_bind_address}:$ > {couchdb_port}" > $couchdb_url = "${couchdb_baseurl}/nagios_alerts/${name}" > > nagios_service { "ssa_${name}": > target => "${nagios::params::nagios_confdir}/app_alerts/ssa/ > services/${name}.cfg", > use => "pnp4nagios-service", > service_description => couchdblookup($couchdb_url, "desc"), > require => File["${nagios::params::nagios_confdir}/app_alerts/ > ssa/services"] > } > > } > > } > > class ssa::nagios { > > include nagios > > nagios::couchdb_check { ["check1", "check2" ]: } > > } > > So there is ssa::nagios that includes nagios class > but I get error > > err: Could not run Puppet configuration client: Could not find > dependency File[/etc/nagios/conf.d/app_alerts/ssa/services] for > Nagios_service[check1] at /etc/puppet/modules/nagios/manifests/init.pp: > 32 > > Changed "include nagios" to "require nagios" - same error. > Of course nagios::params::nagios_confdir=/etc/nagios/conf.d > And nagios class is supposed to be evaluated before ssa::nagios - so > how come it does not find the File dependency declared in the nagios > class? > > Thanks > Alex -- 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.