nagios - puppet: Syntax error at 'target'; expected '}' - parsing error -


syntax error while parsing puppet resource.

    class nagios::export {       @@nagios_host { $::fqdn:         address       => $::ipaddress,         use           => "linux-server",         check_command => 'check-host-alive!3000.0,80%!5000.0,100%!10',         hostgroups    => 'all-servers',         target        => "/etc/nagios/resource.d/host_${::fqdn}.cfg"       }       @@nagios_service { "check_ping_${hostname}":          check_command => "check-host-alive!100.0,20%!500.0,60%",          use => "generic-service",          host_name => "$fqdn",          notification_period => "24x7",          #target => "/etc/nagios/resource.d/service_${::fqdn}.cfg"          service_description => "${hostname}_check_ping"          target => "/etc/nagios/resource.d/service_${::fqdn}.cfg"   } } 

when run puppet apply , following error seen..

[root@ip-10-172-161-25 manifests]# puppet apply export.pp --noop

could not parse environment production: syntax error @ 'target'; expected '}' @ /etc/puppet/modules/nagios/manifests/export.pp:28 on node ip-10-172-161-25.us-west-1.compute.internal 

class nagios::export {   @@nagios_host { $::fqdn:     address       => $::ipaddress,     use           => "linux-server",     check_command => 'check-host-alive!3000.0,80%!5000.0,100%!10',     hostgroups    => 'all-servers',     target        => "/etc/nagios/resource.d/host_${::fqdn}.cfg",   }   @@nagios_service { "check_ping_${hostname}":      check_command => "check-host-alive!100.0,20%!500.0,60%",      use => "generic-service",      host_name => "$fqdn",      notification_period => "24x7",      #target => "/etc/nagios/resource.d/service_${::fqdn}.cfg",      service_description => "${hostname}_check_ping",      target => "/etc/nagios/resource.d/service_${::fqdn}.cfg",  } } 

was few missing commas @ end.

i finish comma on last line. it's not needed, catches gotcha's happen when add line end.


Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -