From 5273240a93f6e1e78de99bff7c7c71d8d984343d Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 25 Apr 2008 16:20:52 +0000 Subject: fixed syntax errors, removed some empty lines in README --- README | 5 ----- manifests/init.pp | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/README b/README index 6385353..9886479 100644 --- a/README +++ b/README @@ -20,7 +20,6 @@ Monitor On one node the "nagios" class has to be included. This installes nagios and apache2 and installs the cgi - Hosts ----- @@ -47,8 +46,6 @@ The intention being obviously to put such declarations into a component defining a service, thereby being automatically applied together with all instances of the service. - - Caveats ======= @@ -71,8 +68,6 @@ neither automatically valid - it is not guaranteed that all components declare a nagios::service - and even if the configuration is valid it definitly is unverified, since that is always a judgment call for an external observer. - - Examples ======== diff --git a/manifests/init.pp b/manifests/init.pp index 93032c0..9627b14 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -127,7 +127,7 @@ class nagios::base { # old way of commands to not break the current config # TODO: integrate these commands into native nagios types file{ "$etc_nagios_path/legacy": - source => "puppet://$server/files/nagios/legacy" + source => "puppet://$server/files/nagios/legacy", ensure => directory, recurse => true, purge => true, @@ -158,7 +158,7 @@ class nagios::base { Nagios_serviceextinfo <<||>> Nagios_timeperiod <<||>> - if defined(Class["munin::client"] { + if defined(Class["munin::client"]) { include munin::plugins::nagios } } # end nagios::base @@ -212,14 +212,14 @@ class nagios::target::host { # defines define nagios::host( $ip = $fqdn, - $alias = $hostname, + $nagios_alias = $hostname, $use = 'generic-host', $parents = 'none' ) { @@nagios_host { $name: ensure => present, - alias => $alias, - address => $ip. + alias => $nagios_alias, + address => $ip, use => $use, } case $parents { @@ -237,12 +237,12 @@ define nagios::host( # please note: # - you can use it only on the nagios master (no exported resources) # - you can not use this host for any other services! -define nagios::extra_host($ip, $alias, $host_use = 'generic-host', $parents = 'none' ) { +define nagios::extra_host($ip, $nagios_alias, $host_use = 'generic-host', $parents = 'none' ) { nagios::host{$name: ip => $ip, - alias = $alias, - $use = $use, - parents = $parents + nagios_alias => $nagios_alias, + use => $use, + parents => $parents } nagios_service { "check_ping_${name}": check_command => "check_ping!100.0,20%!500.0,60%", @@ -257,7 +257,7 @@ define nagios::service( $check_command, $host_name = $fqdn, $use = 'generic-service', - notification_period = "24x7", + $notification_period = "24x7", $service_description = ''){ -- cgit v1.2.3