summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README73
1 files changed, 37 insertions, 36 deletions
diff --git a/README b/README
index 0949071..2b3791d 100644
--- a/README
+++ b/README
@@ -22,9 +22,9 @@ Monitor
-------
On one node the "nagios" class has to be included. By default this installs
-apache using the "apache" module. To use lighttpd instead, include
-"nagios::lighttpd", or, if the web server is not to be managed by puppet,
-include "nagios::headless".
+apache using the "apache" module. To use lighttpd instead, set the "httpd"
+parameter to the "nagios" class to "lighttpd", or, if the web server is not to
+be managed by puppet, set the "httpd" parameter to "absent".
Hosts
@@ -73,7 +73,7 @@ nagios server define a service that will check the NRPE command 'check_cpu' on
the current node:
nagios::service { 'CPU Usage':
- use_nrpe => 'true',
+ use_nrpe => true,
check_command => "check_cpu",
nrpe_args => "-t 60"
}
@@ -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': } -> 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
====