diff options
author | mh <mh@immerda.ch> | 2015-10-25 14:43:23 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2015-10-25 14:44:25 +0100 |
commit | edd580ab2dc92adcb8291fd17d268cfbb6226c3b (patch) | |
tree | 2c713b514212c71d67ae90d6f31041630941a616 /README | |
parent | cfff7d115e4cff2a4aa5bcfbd01e7ebe265b7a48 (diff) | |
parent | f215de3de43f141ae71fd124a84003d157da7295 (diff) |
Merge remote-tracking branch 'shared/master'
Diffstat (limited to 'README')
-rw-r--r-- | README | 73 |
1 files changed, 37 insertions, 36 deletions
@@ -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 ==== |