diff options
Diffstat (limited to 'README')
-rw-r--r-- | README | 65 |
1 files changed, 33 insertions, 32 deletions
@@ -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 ==== |