Recommit for updates in build 112
This commit is contained in:
@@ -232,7 +232,7 @@ class confdroid_nagios::client::target (
|
|||||||
|
|
||||||
@@nagios_host { $fqdn:
|
@@nagios_host { $fqdn:
|
||||||
ensure => $ng_ping_ensure,
|
ensure => $ng_ping_ensure,
|
||||||
alias => $fqdn,
|
alias => $hostname,
|
||||||
address => $fqdn,
|
address => $fqdn,
|
||||||
use => 'linux-server',
|
use => 'linux-server',
|
||||||
target => $ng_target_host,
|
target => $ng_target_host,
|
||||||
@@ -244,7 +244,7 @@ class confdroid_nagios::client::target (
|
|||||||
group => 'nagios',
|
group => 'nagios',
|
||||||
mode => '0640',
|
mode => '0640',
|
||||||
check_command => "check_ping!${ng_ping_warn}!${ng_ping_crit}",
|
check_command => "check_ping!${ng_ping_warn}!${ng_ping_crit}",
|
||||||
notify => Service[$ng_nagios_service],
|
notify => Service[$ng_service],
|
||||||
}
|
}
|
||||||
|
|
||||||
@@nagios_service { "root_partition_${fqdn}":
|
@@nagios_service { "root_partition_${fqdn}":
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ class confdroid_nagios::nagios::objects::add_contact_rules (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => nagios_etc_t,
|
seltype => nagios_etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
notify => Service[$ng_nagios_service],
|
notify => Service[$ng_service],
|
||||||
}
|
}
|
||||||
|
|
||||||
# manage file header
|
# manage file header
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ class confdroid_nagios::nagios::objects::add_contactgroups_rules (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => nagios_etc_t,
|
seltype => nagios_etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
notify => Service[$ng_nagios_service],
|
notify => Service[$ng_service],
|
||||||
}
|
}
|
||||||
|
|
||||||
# manage file header
|
# manage file header
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ class confdroid_nagios::nagios::objects::add_hostgroup_rules (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => nagios_etc_t,
|
seltype => nagios_etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
notify => Service[$ng_nagios_service],
|
notify => Service[$ng_service],
|
||||||
}
|
}
|
||||||
|
|
||||||
# manage file header
|
# manage file header
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ class confdroid_nagios::nagios::objects::add_servicegroup_rules (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => nagios_etc_t,
|
seltype => nagios_etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
notify => Service[$ng_nagios_service],
|
notify => Service[$ng_service],
|
||||||
}
|
}
|
||||||
|
|
||||||
# manage file header
|
# manage file header
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ class confdroid_nagios::nagios::resources::resource (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => nagios_etc_t,
|
seltype => nagios_etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
notify => Service[$ng_nagios_service],
|
notify => Service[$ng_service],
|
||||||
}
|
}
|
||||||
|
|
||||||
concat::fragment { 'header':
|
concat::fragment { 'header':
|
||||||
|
|||||||
@@ -1238,7 +1238,7 @@ class confdroid_nagios::params (
|
|||||||
$os_release = $facts['os']['release']['major']
|
$os_release = $facts['os']['release']['major']
|
||||||
|
|
||||||
# service
|
# service
|
||||||
$ng_nagios_service = 'nagios'
|
$ng_service = 'nagios'
|
||||||
|
|
||||||
# directories
|
# directories
|
||||||
$ng_main_dir = '/etc/nagios'
|
$ng_main_dir = '/etc/nagios'
|
||||||
@@ -1293,7 +1293,7 @@ class confdroid_nagios::params (
|
|||||||
$ng_cntctgrps_head_erb = 'confdroid_nagios/nagios/contactgroups_cfg_head.erb'
|
$ng_cntctgrps_head_erb = 'confdroid_nagios/nagios/contactgroups_cfg_head.erb'
|
||||||
$ng_cntctgrps_rule_erb = 'confdroid_nagios/nagios/contactgroups_cfg_rule.erb'
|
$ng_cntctgrps_rule_erb = 'confdroid_nagios/nagios/contactgroups_cfg_rule.erb'
|
||||||
$ng_target_command = "${ng_conf_d_dir}/nagios_commands_base.cfg"
|
$ng_target_command = "${ng_conf_d_dir}/nagios_commands_base.cfg"
|
||||||
$ng_nagios_service_cmd = 'check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios'
|
$ng_service_cmd = 'check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios'
|
||||||
$ng_htpasswd_file = "${ng_main_dir}/passwd"
|
$ng_htpasswd_file = "${ng_main_dir}/passwd"
|
||||||
$ng_htpasswd_head = 'confdroid_nagios/nagios/htpasswd_head.erb'
|
$ng_htpasswd_head = 'confdroid_nagios/nagios/htpasswd_head.erb'
|
||||||
$ng_htpasswd_rule = 'confdroid_nagios/nagios/htpasswd_rule.erb'
|
$ng_htpasswd_rule = 'confdroid_nagios/nagios/htpasswd_rule.erb'
|
||||||
|
|||||||
@@ -115,21 +115,7 @@
|
|||||||
17
|
17
|
||||||
18
|
18
|
||||||
19
|
19
|
||||||
20
|
20</pre>
|
||||||
21
|
|
||||||
22
|
|
||||||
23
|
|
||||||
24
|
|
||||||
25
|
|
||||||
26
|
|
||||||
27
|
|
||||||
28
|
|
||||||
29
|
|
||||||
30
|
|
||||||
31
|
|
||||||
32
|
|
||||||
33
|
|
||||||
34</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/server/files.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/server/files.pp', line 6</span>
|
||||||
@@ -145,22 +131,8 @@ class confdroid_nagios::server::files (
|
|||||||
group => 'nagios',
|
group => 'nagios',
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
content => template($ng_nagios_cfg_erb),
|
content => template($ng_nagios_cfg_erb),
|
||||||
notify => Service[$ng_nagios_service],
|
notify => Service[$ng_service],
|
||||||
}
|
}
|
||||||
# custom cfg files
|
|
||||||
## temp place holder, this will be done via defines
|
|
||||||
## and PuppetDB exports and imports in the future
|
|
||||||
#file { $ng_target_command:
|
|
||||||
# ensure => file,
|
|
||||||
# owner => 'nagios',
|
|
||||||
# group => 'nagios',
|
|
||||||
# mode => '0644',
|
|
||||||
# selrange => s0,
|
|
||||||
# selrole => object_r,
|
|
||||||
# seltype => nagios_etc_t,
|
|
||||||
# seluser => system_u,
|
|
||||||
# notify => Service[$ng_nagios_service],
|
|
||||||
#}
|
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -296,9 +296,7 @@
|
|||||||
198
|
198
|
||||||
199
|
199
|
||||||
200
|
200
|
||||||
201
|
201</pre>
|
||||||
202
|
|
||||||
203</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/server/service.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/server/service.pp', line 6</span>
|
||||||
@@ -317,9 +315,9 @@ class confdroid_nagios::server::service (
|
|||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
service { $ng_nagios_service:
|
service { $ng_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
name => $ng_nagios_service,
|
name => $ng_service,
|
||||||
enable => true,
|
enable => true,
|
||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
@@ -344,7 +342,7 @@ class confdroid_nagios::server::service (
|
|||||||
}
|
}
|
||||||
|
|
||||||
@@nagios_service { 'check_nagios_localhost':
|
@@nagios_service { 'check_nagios_localhost':
|
||||||
check_command => $ng_nagios_service_cmd,
|
check_command => $ng_service_cmd,
|
||||||
use => 'generic-service',
|
use => 'generic-service',
|
||||||
host_name => 'localhost',
|
host_name => 'localhost',
|
||||||
notification_period => '24x7',
|
notification_period => '24x7',
|
||||||
@@ -497,8 +495,6 @@ class confdroid_nagios::server::service (
|
|||||||
Nagios_contactgroup <<||>> { notify => Service['nagios'] }
|
Nagios_contactgroup <<||>> { notify => Service['nagios'] }
|
||||||
Nagios_command <<||>> { notify => Service['nagios'] }
|
Nagios_command <<||>> { notify => Service['nagios'] }
|
||||||
Nagios_timeperiod <<||>> { notify => Service['nagios'] }
|
Nagios_timeperiod <<||>> { notify => Service['nagios'] }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ define confdroid_nagios::server::access (
|
|||||||
$ng_nagios_server = $confdroid_nagios::params::ng_nagios_server
|
$ng_nagios_server = $confdroid_nagios::params::ng_nagios_server
|
||||||
$ng_htpasswd_file = $confdroid_nagios::params::ng_htpasswd_file
|
$ng_htpasswd_file = $confdroid_nagios::params::ng_htpasswd_file
|
||||||
$ng_htpasswd_rule = $confdroid_nagios::params::ng_htpasswd_rule
|
$ng_htpasswd_rule = $confdroid_nagios::params::ng_htpasswd_rule
|
||||||
$ng_nagios_service = $confdroid_nagios::params::ng_nagios_service
|
$ng_service = $confdroid_nagios::params::ng_service
|
||||||
|
|
||||||
if $fqdn == $ng_nagios_server {
|
if $fqdn == $ng_nagios_server {
|
||||||
# create password rules
|
# create password rules
|
||||||
|
|||||||
Reference in New Issue
Block a user