OP#436 disable commands
This commit is contained in:
@@ -7,7 +7,7 @@ class confdroid_nagios::nagios::config (
|
||||
|
||||
) inherits confdroid_nagios::params {
|
||||
if $ng_nagios_server == $fqdn {
|
||||
require confdroid_nagios::nagios::objects::commands
|
||||
# require confdroid_nagios::nagios::objects::commands
|
||||
require confdroid_nagios::nagios::objects::template_rules
|
||||
require confdroid_nagios::nagios::objects::add_contact_rules
|
||||
require confdroid_nagios::nagios::objects::add_contactgroups_rules
|
||||
|
||||
@@ -7,134 +7,134 @@ class confdroid_nagios::server::nagios (
|
||||
|
||||
) inherits confdroid_nagios::params {
|
||||
if $ng_nagios_server == $fqdn {
|
||||
# @@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 => $ng_contact_name,
|
||||
# max_check_attempts => $ng_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[$ng_service],
|
||||
# }
|
||||
@@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 => $ng_contact_name,
|
||||
max_check_attempts => $ng_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[$ng_service],
|
||||
}
|
||||
|
||||
# @@nagios_service { 'check_nagios_localhost':
|
||||
# check_command => "check_nagios!${ng_spool_dir}/status.dat!5!/usr/sbin/nagios",
|
||||
# use => 'generic-service',
|
||||
# host_name => 'localhost',
|
||||
# notification_period => '24x7',
|
||||
# service_description => 'localhost_nagios_service',
|
||||
# target => $ng_target_service,
|
||||
# owner => $ng_user,
|
||||
# group => $ng_user,
|
||||
# mode => '0640',
|
||||
# contacts => $ng_contact_name,
|
||||
# notify => Service[$ng_service],
|
||||
# }
|
||||
@@nagios_service { 'check_nagios_localhost':
|
||||
check_command => "check_nagios!${ng_spool_dir}/status.dat!5!/usr/sbin/nagios",
|
||||
use => 'generic-service',
|
||||
host_name => 'localhost',
|
||||
notification_period => '24x7',
|
||||
service_description => 'localhost_nagios_service',
|
||||
target => $ng_target_service,
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
contacts => $ng_contact_name,
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
# @@nagios_service { 'root_partition_localhost':
|
||||
# ensure => $ng_disk_ensure,
|
||||
# check_command => "check_nrpe!check_disk!${ng_disk_warn}!${ng_disk_crit}!/",
|
||||
# use => 'generic-service',
|
||||
# host_name => 'localhost',
|
||||
# contacts => $ng_contact_name,
|
||||
# notification_period => '24x7',
|
||||
# service_description => 'localhost_root_partition',
|
||||
# servicegroups => 'linux-services',
|
||||
# target => $ng_target_service,
|
||||
# owner => $ng_user,
|
||||
# group => $ng_user,
|
||||
# mode => '0640',
|
||||
# notify => Service[$ng_service],
|
||||
# }
|
||||
@@nagios_service { 'root_partition_localhost':
|
||||
ensure => $ng_disk_ensure,
|
||||
check_command => "check_nrpe!check_disk!${ng_disk_warn}!${ng_disk_crit}!/",
|
||||
use => 'generic-service',
|
||||
host_name => 'localhost',
|
||||
contacts => $ng_contact_name,
|
||||
notification_period => '24x7',
|
||||
service_description => 'localhost_root_partition',
|
||||
servicegroups => 'linux-services',
|
||||
target => $ng_target_service,
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
# if $ng_enable_swap_check == true {
|
||||
# @@nagios_service { 'Swap_Usage_localhost':
|
||||
# ensure => $ng_swap_ensure,
|
||||
# check_command => "check_nrpe!check_swap!${ng_swap_warn}!${ng_swap_crit}",
|
||||
# use => 'generic-service',
|
||||
# host_name => 'localhost',
|
||||
# contacts => $ng_contact_name,
|
||||
# notification_period => '24x7',
|
||||
# service_description => 'localhost_swap_usage',
|
||||
# servicegroups => 'linux-services',
|
||||
# target => $ng_target_service,
|
||||
# owner => $ng_user,
|
||||
# group => $ng_user,
|
||||
# mode => '0640',
|
||||
# notify => Service[$ng_service],
|
||||
# }
|
||||
# }
|
||||
if $ng_enable_swap_check == true {
|
||||
@@nagios_service { 'Swap_Usage_localhost':
|
||||
ensure => $ng_swap_ensure,
|
||||
check_command => "check_nrpe!check_swap!${ng_swap_warn}!${ng_swap_crit}",
|
||||
use => 'generic-service',
|
||||
host_name => 'localhost',
|
||||
contacts => $ng_contact_name,
|
||||
notification_period => '24x7',
|
||||
service_description => 'localhost_swap_usage',
|
||||
servicegroups => 'linux-services',
|
||||
target => $ng_target_service,
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
}
|
||||
|
||||
# @@nagios_service { 'Local_Users_localhost':
|
||||
# ensure => $ng_users_ensure,
|
||||
# check_command => "check_nrpe!check_users!${ng_users_warn}!${ng_users_crit}",
|
||||
# use => 'generic-service',
|
||||
# host_name => 'localhost',
|
||||
# contacts => $ng_contact_name,
|
||||
# notification_period => '24x7',
|
||||
# service_description => 'localhost_local_users',
|
||||
# servicegroups => 'linux-services',
|
||||
# target => $ng_target_service,
|
||||
# owner => $ng_user,
|
||||
# group => $ng_user,
|
||||
# mode => '0640',
|
||||
# notify => Service[$ng_service],
|
||||
# }
|
||||
@@nagios_service { 'Local_Users_localhost':
|
||||
ensure => $ng_users_ensure,
|
||||
check_command => "check_nrpe!check_users!${ng_users_warn}!${ng_users_crit}",
|
||||
use => 'generic-service',
|
||||
host_name => 'localhost',
|
||||
contacts => $ng_contact_name,
|
||||
notification_period => '24x7',
|
||||
service_description => 'localhost_local_users',
|
||||
servicegroups => 'linux-services',
|
||||
target => $ng_target_service,
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
# @@nagios_service { 'Total_Processes_localhost':
|
||||
# ensure => $ng_procs_tot_ensure,
|
||||
# check_command => "check_nrpe!check_procs!${ng_procs_tot_warn}!${ng_procs_tot_crit}!${ng_procs_tot_param}",
|
||||
# use => 'generic-service',
|
||||
# host_name => 'localhost',
|
||||
# contacts => $ng_contact_name,
|
||||
# notification_period => '24x7',
|
||||
# service_description => 'localhost_total_processes',
|
||||
# servicegroups => 'linux-services',
|
||||
# target => $ng_target_service,
|
||||
# owner => $ng_user,
|
||||
# group => $ng_user,
|
||||
# mode => '0640',
|
||||
# notify => Service[$ng_service],
|
||||
# }
|
||||
@@nagios_service { 'Total_Processes_localhost':
|
||||
ensure => $ng_procs_tot_ensure,
|
||||
check_command => "check_nrpe!check_procs!${ng_procs_tot_warn}!${ng_procs_tot_crit}!${ng_procs_tot_param}",
|
||||
use => 'generic-service',
|
||||
host_name => 'localhost',
|
||||
contacts => $ng_contact_name,
|
||||
notification_period => '24x7',
|
||||
service_description => 'localhost_total_processes',
|
||||
servicegroups => 'linux-services',
|
||||
target => $ng_target_service,
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
# @@nagios_service { 'Zombie_Processes_localhost':
|
||||
# ensure => $ng_procs_z_ensure,
|
||||
# check_command => "check_nrpe!check_procs!${ng_procs_z_warn}!${ng_procs_z_crit}!${ng_procs_z_param}",
|
||||
# use => 'generic-service',
|
||||
# host_name => 'localhost',
|
||||
# contacts => $ng_contact_name,
|
||||
# notification_period => '24x7',
|
||||
# service_description => 'localhost_zombie_processes',
|
||||
# servicegroups => 'linux-services',
|
||||
# target => $ng_target_service,
|
||||
# owner => $ng_user,
|
||||
# group => $ng_user,
|
||||
# mode => '0640',
|
||||
# notify => Service[$ng_service],
|
||||
# }
|
||||
@@nagios_service { 'Zombie_Processes_localhost':
|
||||
ensure => $ng_procs_z_ensure,
|
||||
check_command => "check_nrpe!check_procs!${ng_procs_z_warn}!${ng_procs_z_crit}!${ng_procs_z_param}",
|
||||
use => 'generic-service',
|
||||
host_name => 'localhost',
|
||||
contacts => $ng_contact_name,
|
||||
notification_period => '24x7',
|
||||
service_description => 'localhost_zombie_processes',
|
||||
servicegroups => 'linux-services',
|
||||
target => $ng_target_service,
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
# @@nagios_service { 'Current_Load_localhost':
|
||||
# ensure => $ng_load_ensure,
|
||||
# check_command => "check_nrpe!check_load!${ng_load_warn}!${ng_load_crit}",
|
||||
# use => 'generic-service',
|
||||
# host_name => 'localhost',
|
||||
# contacts => $ng_contact_name,
|
||||
# notification_period => '24x7',
|
||||
# service_description => 'localhost_current_load',
|
||||
# servicegroups => 'linux-services',
|
||||
# target => $ng_target_service,
|
||||
# owner => $ng_user,
|
||||
# group => $ng_user,
|
||||
# mode => '0640',
|
||||
# notify => Service[$ng_service],
|
||||
# }
|
||||
@@nagios_service { 'Current_Load_localhost':
|
||||
ensure => $ng_load_ensure,
|
||||
check_command => "check_nrpe!check_load!${ng_load_warn}!${ng_load_crit}",
|
||||
use => 'generic-service',
|
||||
host_name => 'localhost',
|
||||
contacts => $ng_contact_name,
|
||||
notification_period => '24x7',
|
||||
service_description => 'localhost_current_load',
|
||||
servicegroups => 'linux-services',
|
||||
target => $ng_target_service,
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
resources { ['nagios_host',
|
||||
'nagios_hostgroup',
|
||||
|
||||
Reference in New Issue
Block a user