edited README and fixed template

This commit is contained in:
Arne Teuke
2017-07-27 13:46:46 +01:00
parent 26e2220ec9
commit 25a31ffc1b
4 changed files with 32 additions and 9 deletions

View File

@@ -37,16 +37,33 @@ class cd_nagios::server::service (
enable => true,
}
@@nagios_service { "check_nagios_${::hostname}":
@@nagios_host { 'localhost':
ensure => $ng_ping_ensure,
alias => 'localhost',
address => '127.0.0.1',
use => 'linux-server',
target => $ng_target_localhost,
hostgroups => 'linux-servers',
contacts => 'ops',
max_check_attempts => $max_check_attempts,
notification_period => '24x7',
owner => $ng_user,
group => $ng_user,
mode => '0640',
check_command => "check_ping!${ng_ping_warn}!${ng_ping_crit}",
notify => Service ['nagios'],
}
@@nagios_service { "check_nagios_localhost":
check_command => 'check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios',
use => 'generic-service',
host_name => $::fqdn,
host_name => 'localhost',
notification_period => '24x7',
service_description => "${::hostname}_nagios_service",
service_description => 'localhost_nagios_service',
target => $ng_target_service,
owner => 'nagios',
group => 'nagios',
mode => '0660',
owner => $ng_user,
group => $ng_user,
mode => '0640',
contacts => 'ops',
}