From 1746232173f04ce1536445280660b86ec490ae0d Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 19 Apr 2015 15:52:56 -0400 Subject: fix alignment and lint usage example Example uses weird spacing in the beginning of the lines. Also the example usage of nagios::command is broken: it lacks the closing curly brace. --- README | 66 ++++++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/README b/README index 0949071..3ff5138 100644 --- a/README +++ b/README @@ -203,50 +203,52 @@ Examples Usage example: +~~~ node nagios { - include nagios::apache - include nagios::defaults - - # Declare another nagios command - nagios::command { http_port: command_line -=> '/usr/lib/nagios/plugins/check_http -p $ARG1$ -H $HOSTADDRESS$ -I -$HOSTADDRESS$' - - # Declare unmanaged hosts - nagios_host { - 'router01.mydomain.com': - alias => 'router01', - notes => 'MyDomain Gateway', - address => "10.0.0.1", - use => 'generic-host'; - "router02.mydomain.com": - alias => 'router02', - address => '192.168.0.1', - parents => 'router01', - use => 'generic-host'; - } + include nagios::apache + include nagios::defaults + + # Declare another nagios command + nagios::command { http_port: + command_line => '/usr/lib/nagios/plugins/check_http -p $ARG1$ -H $HOSTADDRESS$ -I $HOSTADDRESS$' + } + + # Declare unmanaged hosts + nagios_host { + 'router01.mydomain.com': + alias => 'router01', + notes => 'MyDomain Gateway', + address => '10.0.0.1', + use => 'generic-host'; + 'router02.mydomain.com': + alias => 'router02', + address => '192.168.0.1', + parents => 'router01', + use => 'generic-host'; + } } node target { - # Monitor this host - class{'nagios::target': - parents = 'router01' - } + # Monitor this host + class{'nagios::target': + parents = 'router01' + } - # monitor a service - $apache2_port = 8080 - include apache2 + # monitor a service + $apache2_port = 8080 + include apache2 - # This actually does this somewhere: - #nagios::service { "http_${apache2_port}": - # check_command => "http_port!${apache2_port}" - #} + # This actually does this somewhere: + #nagios::service { "http_${apache2_port}": + # check_command => "http_port!${apache2_port}" + #} } +~~~ TODO ==== -- cgit v1.2.3 From 9e5616f3d39db4bd53bf2b580c35cb2948eb23b6 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 19 Apr 2015 15:54:46 -0400 Subject: wrong example with nagios::defaults The example doesn't set any ordering on the classes and this leads to errors at first install since all of the configuration files that the nagios::defaults class installs need the nagios package to be installed first in order for the config dirs to exist. --- README | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README b/README index 3ff5138..67f3ada 100644 --- a/README +++ b/README @@ -206,8 +206,7 @@ Usage example: ~~~ node nagios { - include nagios::apache - include nagios::defaults + class { 'nagios::apache': } -> class { 'nagios::defaults': } # Declare another nagios command nagios::command { http_port: -- cgit v1.2.3