Recommit for updates in build 111
This commit is contained in:
@@ -937,6 +937,24 @@ inherited by all classes except defines.
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ng_user</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'nagios'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>The user to run the Nagios service as. Default is ‘nagios’.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class='name'>ng_contactgroup_members</span>
|
<span class='name'>ng_contactgroup_members</span>
|
||||||
@@ -961,8 +979,6 @@ inherited by all classes except defines.
|
|||||||
<pre class="lines">
|
<pre class="lines">
|
||||||
|
|
||||||
|
|
||||||
101
|
|
||||||
102
|
|
||||||
103
|
103
|
||||||
104
|
104
|
||||||
105
|
105
|
||||||
@@ -1130,10 +1146,14 @@ inherited by all classes except defines.
|
|||||||
267
|
267
|
||||||
268
|
268
|
||||||
269
|
269
|
||||||
270</pre>
|
270
|
||||||
|
271
|
||||||
|
272
|
||||||
|
273
|
||||||
|
274</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 101</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 103</span>
|
||||||
|
|
||||||
class confdroid_nagios::params (
|
class confdroid_nagios::params (
|
||||||
|
|
||||||
@@ -1148,6 +1168,7 @@ class confdroid_nagios::params (
|
|||||||
String $ng_max_check_attempts = '10',
|
String $ng_max_check_attempts = '10',
|
||||||
String $ng_status_upd_interval = '10',
|
String $ng_status_upd_interval = '10',
|
||||||
String $ng_check_ext_commands = '1',
|
String $ng_check_ext_commands = '1',
|
||||||
|
String $ng_user = 'nagios',
|
||||||
|
|
||||||
# contact groups
|
# contact groups
|
||||||
String $ng_contactgroup_name = 'admins',
|
String $ng_contactgroup_name = 'admins',
|
||||||
@@ -1211,6 +1232,7 @@ class confdroid_nagios::params (
|
|||||||
) {
|
) {
|
||||||
# Default facts
|
# Default facts
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
|
$hostname = $facts['networking']['hostname']
|
||||||
$domain = $facts['networking']['domain']
|
$domain = $facts['networking']['domain']
|
||||||
$os_name = $facts['os']['name']
|
$os_name = $facts['os']['name']
|
||||||
$os_release = $facts['os']['release']['major']
|
$os_release = $facts['os']['release']['major']
|
||||||
|
|||||||
@@ -124,7 +124,181 @@
|
|||||||
26
|
26
|
||||||
27
|
27
|
||||||
28
|
28
|
||||||
29</pre>
|
29
|
||||||
|
30
|
||||||
|
31
|
||||||
|
32
|
||||||
|
33
|
||||||
|
34
|
||||||
|
35
|
||||||
|
36
|
||||||
|
37
|
||||||
|
38
|
||||||
|
39
|
||||||
|
40
|
||||||
|
41
|
||||||
|
42
|
||||||
|
43
|
||||||
|
44
|
||||||
|
45
|
||||||
|
46
|
||||||
|
47
|
||||||
|
48
|
||||||
|
49
|
||||||
|
50
|
||||||
|
51
|
||||||
|
52
|
||||||
|
53
|
||||||
|
54
|
||||||
|
55
|
||||||
|
56
|
||||||
|
57
|
||||||
|
58
|
||||||
|
59
|
||||||
|
60
|
||||||
|
61
|
||||||
|
62
|
||||||
|
63
|
||||||
|
64
|
||||||
|
65
|
||||||
|
66
|
||||||
|
67
|
||||||
|
68
|
||||||
|
69
|
||||||
|
70
|
||||||
|
71
|
||||||
|
72
|
||||||
|
73
|
||||||
|
74
|
||||||
|
75
|
||||||
|
76
|
||||||
|
77
|
||||||
|
78
|
||||||
|
79
|
||||||
|
80
|
||||||
|
81
|
||||||
|
82
|
||||||
|
83
|
||||||
|
84
|
||||||
|
85
|
||||||
|
86
|
||||||
|
87
|
||||||
|
88
|
||||||
|
89
|
||||||
|
90
|
||||||
|
91
|
||||||
|
92
|
||||||
|
93
|
||||||
|
94
|
||||||
|
95
|
||||||
|
96
|
||||||
|
97
|
||||||
|
98
|
||||||
|
99
|
||||||
|
100
|
||||||
|
101
|
||||||
|
102
|
||||||
|
103
|
||||||
|
104
|
||||||
|
105
|
||||||
|
106
|
||||||
|
107
|
||||||
|
108
|
||||||
|
109
|
||||||
|
110
|
||||||
|
111
|
||||||
|
112
|
||||||
|
113
|
||||||
|
114
|
||||||
|
115
|
||||||
|
116
|
||||||
|
117
|
||||||
|
118
|
||||||
|
119
|
||||||
|
120
|
||||||
|
121
|
||||||
|
122
|
||||||
|
123
|
||||||
|
124
|
||||||
|
125
|
||||||
|
126
|
||||||
|
127
|
||||||
|
128
|
||||||
|
129
|
||||||
|
130
|
||||||
|
131
|
||||||
|
132
|
||||||
|
133
|
||||||
|
134
|
||||||
|
135
|
||||||
|
136
|
||||||
|
137
|
||||||
|
138
|
||||||
|
139
|
||||||
|
140
|
||||||
|
141
|
||||||
|
142
|
||||||
|
143
|
||||||
|
144
|
||||||
|
145
|
||||||
|
146
|
||||||
|
147
|
||||||
|
148
|
||||||
|
149
|
||||||
|
150
|
||||||
|
151
|
||||||
|
152
|
||||||
|
153
|
||||||
|
154
|
||||||
|
155
|
||||||
|
156
|
||||||
|
157
|
||||||
|
158
|
||||||
|
159
|
||||||
|
160
|
||||||
|
161
|
||||||
|
162
|
||||||
|
163
|
||||||
|
164
|
||||||
|
165
|
||||||
|
166
|
||||||
|
167
|
||||||
|
168
|
||||||
|
169
|
||||||
|
170
|
||||||
|
171
|
||||||
|
172
|
||||||
|
173
|
||||||
|
174
|
||||||
|
175
|
||||||
|
176
|
||||||
|
177
|
||||||
|
178
|
||||||
|
179
|
||||||
|
180
|
||||||
|
181
|
||||||
|
182
|
||||||
|
183
|
||||||
|
184
|
||||||
|
185
|
||||||
|
186
|
||||||
|
187
|
||||||
|
188
|
||||||
|
189
|
||||||
|
190
|
||||||
|
191
|
||||||
|
192
|
||||||
|
193
|
||||||
|
194
|
||||||
|
195
|
||||||
|
196
|
||||||
|
197
|
||||||
|
198
|
||||||
|
199
|
||||||
|
200
|
||||||
|
201
|
||||||
|
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>
|
||||||
@@ -151,6 +325,180 @@ class confdroid_nagios::server::service (
|
|||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
require => Exec['ng_restart_httpd'],
|
require => Exec['ng_restart_httpd'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@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 => $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 => $ng_nagios_service_cmd,
|
||||||
|
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 => 'ops',
|
||||||
|
}
|
||||||
|
|
||||||
|
@@nagios_host { $fqdn:
|
||||||
|
ensure => $ng_ping_ensure,
|
||||||
|
alias => $hostname,
|
||||||
|
address => $fqdn,
|
||||||
|
use => 'linux-server',
|
||||||
|
target => $ng_target_host,
|
||||||
|
hostgroups => 'linux-servers',
|
||||||
|
contacts => 'ops',
|
||||||
|
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_user],
|
||||||
|
}
|
||||||
|
|
||||||
|
@@nagios_service { "root_partition_${hostname}":
|
||||||
|
ensure => $ng_disk_ensure,
|
||||||
|
check_command => "check_nrpe!check_disk!${ng_disk_warn}!${ng_disk_crit}!/",
|
||||||
|
use => 'generic-service',
|
||||||
|
host_name => $fqdn,
|
||||||
|
contacts => 'ops',
|
||||||
|
notification_period => '24x7',
|
||||||
|
service_description => "${hostname}_root_partition",
|
||||||
|
servicegroups => 'linux-services',
|
||||||
|
target => $ng_target_service,
|
||||||
|
owner => $ng_user,
|
||||||
|
group => $ng_user,
|
||||||
|
mode => '0640',
|
||||||
|
}
|
||||||
|
|
||||||
|
if $ng_enable_swap_check == true {
|
||||||
|
@@nagios_service { "Swap_Usage_${hostname}":
|
||||||
|
ensure => $ng_swap_ensure,
|
||||||
|
check_command => "check_nrpe!check_swap!${ng_swap_warn}!${ng_swap_crit}",
|
||||||
|
use => 'generic-service',
|
||||||
|
host_name => $fqdn,
|
||||||
|
contacts => 'ops',
|
||||||
|
notification_period => '24x7',
|
||||||
|
service_description => "${hostname}_swap_usage",
|
||||||
|
servicegroups => 'linux-services',
|
||||||
|
target => $ng_target_service,
|
||||||
|
owner => $ng_user,
|
||||||
|
group => $ng_user,
|
||||||
|
mode => '0640',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@nagios_service { "Local_Users_${hostname}":
|
||||||
|
ensure => $ng_users_ensure,
|
||||||
|
check_command => "check_nrpe!check_users!${ng_users_warn}!${ng_users_crit}",
|
||||||
|
use => 'generic-service',
|
||||||
|
host_name => $fqdn,
|
||||||
|
contacts => 'ops',
|
||||||
|
notification_period => '24x7',
|
||||||
|
service_description => "${hostname}_local_users",
|
||||||
|
servicegroups => 'linux-services',
|
||||||
|
target => $ng_target_service,
|
||||||
|
owner => $ng_user,
|
||||||
|
group => $ng_user,
|
||||||
|
mode => '0640',
|
||||||
|
}
|
||||||
|
|
||||||
|
@@nagios_service { "Total Processes_${hostname}":
|
||||||
|
ensure => $ng_procs_tot_ens,
|
||||||
|
check_command => "check_nrpe!check_procs!${ng_procs_tot_warn}!${ng_procs_tot_crit}!${ng_procs_tot_param}",
|
||||||
|
use => 'generic-service',
|
||||||
|
host_name => $fqdn,
|
||||||
|
contacts => 'ops',
|
||||||
|
notification_period => '24x7',
|
||||||
|
service_description => "${hostname}_total_processes",
|
||||||
|
servicegroups => 'linux-services',
|
||||||
|
target => $ng_target_service,
|
||||||
|
owner => $ng_user,
|
||||||
|
group => $ng_user,
|
||||||
|
mode => '0640',
|
||||||
|
}
|
||||||
|
|
||||||
|
@@nagios_service { "Zombie Processes_${hostname}":
|
||||||
|
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 => $fqdn,
|
||||||
|
contacts => 'ops',
|
||||||
|
notification_period => '24x7',
|
||||||
|
service_description => "${hostname}_zombie_processes",
|
||||||
|
servicegroups => 'linux-services',
|
||||||
|
target => $ng_target_service,
|
||||||
|
owner => $ng_user,
|
||||||
|
group => $ng_user,
|
||||||
|
mode => '0640',
|
||||||
|
}
|
||||||
|
|
||||||
|
@@nagios_service { "Current_Load_${hostname}":
|
||||||
|
ensure => $ng_load_ensure,
|
||||||
|
check_command => "check_nrpe!check_load!${ng_load_warn}!${ng_load_crit}",
|
||||||
|
use => 'generic-service',
|
||||||
|
host_name => $fqdn,
|
||||||
|
contacts => 'ops',
|
||||||
|
notification_period => '24x7',
|
||||||
|
service_description => "${hostname}_current_load",
|
||||||
|
servicegroups => 'linux-services',
|
||||||
|
target => $ng_target_service,
|
||||||
|
owner => $ng_user,
|
||||||
|
group => $ng_user,
|
||||||
|
mode => '0640',
|
||||||
|
}
|
||||||
|
|
||||||
|
resources { ['nagios_host',
|
||||||
|
'nagios_hostgroup',
|
||||||
|
'nagios_hostdependency',
|
||||||
|
'nagios_hostescalation',
|
||||||
|
'nagios_hostextinfo',
|
||||||
|
'nagios_service',
|
||||||
|
'nagios_servicegroup',
|
||||||
|
'nagios_servicedependency',
|
||||||
|
'nagios_serviceescalation',
|
||||||
|
'nagios_serviceextinfo',
|
||||||
|
'nagios_contact',
|
||||||
|
'nagios_contactgroup',
|
||||||
|
'nagios_command',
|
||||||
|
'nagios_timeperiod']:
|
||||||
|
purge => true,
|
||||||
|
}
|
||||||
|
|
||||||
|
# collect resources and populate /etc/nagios/conf.d/nagios_*.cfg
|
||||||
|
Nagios_host <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_hostgroup <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_hostdependency <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_hostescalation <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_hostextinfo <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_service <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_servicegroup <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_servicedependency <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_serviceescalation <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_serviceextinfo <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_contact <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_contactgroup <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_command <<||>> { notify => Service['nagios'] }
|
||||||
|
Nagios_timeperiod <<||>> { notify => Service['nagios'] }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user