summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah <micah@riseup.net>2015-05-07 14:54:49 +0000
committerMicah <micah@riseup.net>2015-05-07 14:54:49 +0000
commit12a297b764df59c5f6b611c2f0673531b7e98ee2 (patch)
tree7f8873f9bdea1403f9e7ff54d8cd07260157c83a
parent2bbe7aae540d987303a352c9e3148da58f04076d (diff)
parent9e5616f3d39db4bd53bf2b580c35cb2948eb23b6 (diff)
Merge branch 'ordering_in_example' into 'master'
Ordering in example The usage example in the readme has a couple of small and bigger problems. This branch makes the example more accurate. See merge request !6
-rw-r--r--README65
1 files changed, 33 insertions, 32 deletions
diff --git a/README b/README
index 4e5a824..8a47ddd 100644
--- a/README
+++ b/README
@@ -203,50 +203,51 @@ 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';
- }
+ class { 'nagios::apache': } -> class { '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
====