Issue #1496 has been updated by marthag. File namevars.diff added
Until this get fixed properly, the following patch sets more reasonable defaults for the nagios namevars. Since the service names have to be unique anyway, this allows one dependency per service, instead of one per host. Similarly with service escalation, service extinfo and host dependencies. ---------------------------------------- Bug #1496: nagios_servicedependency needs a unique host_name? http://reductivelabs.com/redmine/issues/show/1496 Author: tstoop Status: Needs design decision Priority: Normal Assigned to: community Category: nagios Target version: Complexity: Unknown Affected version: 0.24.5 Keywords: Hi all, I might be doing something wrong here, but... I've created a definition that adds exported resources for websites that are hosted on that machine. However, these Nagios service checks depend on the overall availability of apache. So I tried to simply add a dependency on the apache check for each of the http website checks. The definition looks like this: <pre> define my_site ($documentroot = "/var/www", $check_priority = "important") { apache::site { $name: documentroot => $documentroot, } @@nagios_service { "$fqdn $name http check": ensure => present, target => "/etc/nagios2/cust/services-by-puppet.cfg", use => "${check_priority}-service", host_name => $fqdn, service_description => "$name at $hostname", #notify => Service["nagios2"], check_command => "check_http2!$name!10!20", } @@nagios_servicedependency { "$fqdn $name http dependency": ensure => present, target => "/tmp/servicedependencies-by-puppet.cfg", dependent_host_name => $fqdn, dependent_service_description => "$name at $hostname", host_name => $fqdn, service_description => "apache", execution_failure_criteria => "c", notification_failure_criteria => "w,c", } } </pre> I get the following error: @err: Could not create sharedhosting1.example.com test1.example.com http dependency: sharedhosting1.example.com test2.example.com http dependency already exists with name sharedhosting1.example.com@ Adding an alias to the nagios_servicedependency doesn't seem to solve this. Am I doing something wrong or is this a bug in the type? ---------------------------------------- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
