Recommit for updates in build 200

This commit is contained in:
Jenkins Server
2026-03-10 11:16:37 +01:00
parent 6571015114
commit 9e44259f8e
5 changed files with 119 additions and 327 deletions

View File

@@ -153,6 +153,11 @@
</li> </li>
<li>
<span class='object_link'><a href="puppet_classes/confdroid_nagios_3A_3Aserver_3A_3Anagios.html" title="puppet_classes::confdroid_nagios::server::nagios (puppet_class)">confdroid_nagios::server::nagios</a></span>
</li>
<li> <li>
<span class='object_link'><a href="puppet_classes/confdroid_nagios_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_nagios::server::service (puppet_class)">confdroid_nagios::server::service</a></span> <span class='object_link'><a href="puppet_classes/confdroid_nagios_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_nagios::server::service (puppet_class)">confdroid_nagios::server::service</a></span>

View File

@@ -159,7 +159,14 @@
</li> </li>
<li id="object_puppet_classes::confdroid_nagios::server::service" class="even"> <li id="object_puppet_classes::confdroid_nagios::server::nagios" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/confdroid_nagios_3A_3Aserver_3A_3Anagios.html" title="puppet_classes::confdroid_nagios::server::nagios (puppet_class)">confdroid_nagios::server::nagios</a></span>
</div>
</li>
<li id="object_puppet_classes::confdroid_nagios::server::service" class="odd">
<div class="item"> <div class="item">
<span class='object_link'><a href="puppet_classes/confdroid_nagios_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_nagios::server::service (puppet_class)">confdroid_nagios::server::service</a></span> <span class='object_link'><a href="puppet_classes/confdroid_nagios_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_nagios::server::service (puppet_class)">confdroid_nagios::server::service</a></span>
</div> </div>

View File

@@ -79,6 +79,8 @@
<span class='object_link'><a href="confdroid_nagios_3A_3Anagios_3A_3Aconfig.html" title="puppet_classes::confdroid_nagios::nagios::config (puppet_class)">confdroid_nagios::nagios::config</a></span><br/> <span class='object_link'><a href="confdroid_nagios_3A_3Anagios_3A_3Aconfig.html" title="puppet_classes::confdroid_nagios::nagios::config (puppet_class)">confdroid_nagios::nagios::config</a></span><br/>
<span class='object_link'><a href="confdroid_nagios_3A_3Aserver_3A_3Anagios.html" title="puppet_classes::confdroid_nagios::server::nagios (puppet_class)">confdroid_nagios::server::nagios</a></span><br/>
<span class='object_link'><a href="confdroid_nagios_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_nagios::server::service (puppet_class)">confdroid_nagios::server::service</a></span><br/> <span class='object_link'><a href="confdroid_nagios_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_nagios::server::service (puppet_class)">confdroid_nagios::server::service</a></span><br/>
<span class='object_link'><a href="confdroid_nagios_3A_3Aserver_3A_3Aaccess_rules.html" title="puppet_classes::confdroid_nagios::server::access_rules (puppet_class)">confdroid_nagios::server::access_rules</a></span><br/> <span class='object_link'><a href="confdroid_nagios_3A_3Aserver_3A_3Aaccess_rules.html" title="puppet_classes::confdroid_nagios::server::access_rules (puppet_class)">confdroid_nagios::server::access_rules</a></span><br/>

View File

@@ -77,7 +77,7 @@
</div> </div>
<h2>Summary</h2> <h2>Summary</h2>
Class manages nagios resources for the confdroid_nagios module. Class manages Nagios configuration for the confdroid_nagios module.
<h2>Overview</h2> <h2>Overview</h2>
<div class="docstring"> <div class="docstring">
@@ -217,7 +217,57 @@
119 119
120 120
121 121
122</pre> 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</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/server/nagios.pp', line 6</span> <pre class="code"><span class="info file"># File 'manifests/server/nagios.pp', line 6</span>
@@ -226,6 +276,23 @@ class confdroid_nagios::server::nagios (
) inherits confdroid_nagios::params { ) inherits confdroid_nagios::params {
if $ng_nagios_server == $fqdn { if $ng_nagios_server == $fqdn {
@@nagios_host { &#39;localhost&#39;:
ensure =&gt; $ng_ping_ensure,
alias =&gt; &#39;localhost&#39;,
address =&gt; &#39;127.0.0.1&#39;,
use =&gt; &#39;linux-server&#39;,
target =&gt; $ng_target_localhost,
hostgroups =&gt; &#39;linux-servers&#39;,
contacts =&gt; $ng_contact_name,
max_check_attempts =&gt; $ng_max_check_attempts,
notification_period =&gt; &#39;24x7&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
check_command =&gt; &quot;check_ping!${ng_ping_warn}!${ng_ping_crit}&quot;,
notify =&gt; Service[$ng_service],
}
@@nagios_service { &#39;check_nagios_localhost&#39;: @@nagios_service { &#39;check_nagios_localhost&#39;:
check_command =&gt; &quot;check_nagios!${ng_spool_dir}/status.dat!5!/usr/sbin/nagios&quot;, check_command =&gt; &quot;check_nagios!${ng_spool_dir}/status.dat!5!/usr/sbin/nagios&quot;,
use =&gt; &#39;generic-service&#39;, use =&gt; &#39;generic-service&#39;,
@@ -337,6 +404,39 @@ class confdroid_nagios::server::nagios (
mode =&gt; &#39;0640&#39;, mode =&gt; &#39;0640&#39;,
notify =&gt; Service[$ng_service], notify =&gt; Service[$ng_service],
} }
resources { [&#39;nagios_host&#39;,
&#39;nagios_hostgroup&#39;,
&#39;nagios_hostdependency&#39;,
&#39;nagios_hostescalation&#39;,
&#39;nagios_hostextinfo&#39;,
&#39;nagios_service&#39;,
&#39;nagios_servicegroup&#39;,
&#39;nagios_servicedependency&#39;,
&#39;nagios_serviceescalation&#39;,
&#39;nagios_serviceextinfo&#39;,
&#39;nagios_contact&#39;,
&#39;nagios_contactgroup&#39;,
&#39;nagios_command&#39;,
&#39;nagios_timeperiod&#39;]:
purge =&gt; true,
}
# collect resources and populate /etc/nagios/conf.d/nagios_*.cfg
Nagios_host &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostgroup &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostdependency &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostescalation &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostextinfo &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_service &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_servicegroup &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_servicedependency &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_serviceescalation &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_serviceextinfo &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_contact &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_contactgroup &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_command &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_timeperiod &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
} }
}</pre> }</pre>
</td> </td>

View File

@@ -125,168 +125,7 @@
27 27
28 28
29 29
30 30</pre>
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</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>
@@ -298,6 +137,7 @@ class confdroid_nagios::server::service (
if $ng_nagios_server == $fqdn { if $ng_nagios_server == $fqdn {
require confdroid_nagios::server::access_rules require confdroid_nagios::server::access_rules
require confdroid_nagios::nagios::config require confdroid_nagios::nagios::config
require confdroid_nagios::server::nagios
exec { &#39;ng_restart_httpd&#39;: exec { &#39;ng_restart_httpd&#39;:
command =&gt; &#39;systemctl restart httpd&#39;, command =&gt; &#39;systemctl restart httpd&#39;,
@@ -313,168 +153,6 @@ class confdroid_nagios::server::service (
hasstatus =&gt; true, hasstatus =&gt; true,
require =&gt; Exec[&#39;ng_restart_httpd&#39;], require =&gt; Exec[&#39;ng_restart_httpd&#39;],
} }
@@nagios_host { &#39;localhost&#39;:
ensure =&gt; $ng_ping_ensure,
alias =&gt; &#39;localhost&#39;,
address =&gt; &#39;127.0.0.1&#39;,
use =&gt; &#39;linux-server&#39;,
target =&gt; $ng_target_localhost,
hostgroups =&gt; &#39;linux-servers&#39;,
contacts =&gt; $ng_contact_name,
max_check_attempts =&gt; $ng_max_check_attempts,
notification_period =&gt; &#39;24x7&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
check_command =&gt; &quot;check_ping!${ng_ping_warn}!${ng_ping_crit}&quot;,
notify =&gt; Service[$ng_service],
}
@@nagios_service { &#39;check_nagios_localhost&#39;:
check_command =&gt; &quot;check_nagios!${ng_spool_dir}/status.dat!5!/usr/sbin/nagios&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; &#39;localhost&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &#39;localhost_nagios_service&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
contacts =&gt; $ng_contact_name,
notify =&gt; Service[$ng_service],
}
@@nagios_service { &#39;root_partition_localhost&#39;:
ensure =&gt; $ng_disk_ensure,
check_command =&gt; &quot;check_nrpe!check_disk!${ng_disk_warn}!${ng_disk_crit}!/&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; &#39;localhost&#39;,
contacts =&gt; $ng_contact_name,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &#39;localhost_root_partition&#39;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
notify =&gt; Service[$ng_service],
}
if $ng_enable_swap_check == true {
@@nagios_service { &#39;Swap_Usage_localhost&#39;:
ensure =&gt; $ng_swap_ensure,
check_command =&gt; &quot;check_nrpe!check_swap!${ng_swap_warn}!${ng_swap_crit}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; &#39;localhost&#39;,
contacts =&gt; $ng_contact_name,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &#39;localhost_swap_usage&#39;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
notify =&gt; Service[$ng_service],
}
}
@@nagios_service { &#39;Local_Users_localhost&#39;:
ensure =&gt; $ng_users_ensure,
check_command =&gt; &quot;check_nrpe!check_users!${ng_users_warn}!${ng_users_crit}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; &#39;localhost&#39;,
contacts =&gt; $ng_contact_name,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &#39;localhost_local_users&#39;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
notify =&gt; Service[$ng_service],
}
@@nagios_service { &#39;Total_Processes_localhost&#39;:
ensure =&gt; $ng_procs_tot_ensure,
check_command =&gt; &quot;check_nrpe!check_procs!${ng_procs_tot_warn}!${ng_procs_tot_crit}!${ng_procs_tot_param}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; &#39;localhost&#39;,
contacts =&gt; $ng_contact_name,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &#39;localhost_total_processes&#39;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
notify =&gt; Service[$ng_service],
}
@@nagios_service { &#39;Zombie_Processes_localhost&#39;:
ensure =&gt; $ng_procs_z_ensure,
check_command =&gt; &quot;check_nrpe!check_procs!${ng_procs_z_warn}!${ng_procs_z_crit}!${ng_procs_z_param}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; &#39;localhost&#39;,
contacts =&gt; $ng_contact_name,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &#39;localhost_zombie_processes&#39;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
notify =&gt; Service[$ng_service],
}
@@nagios_service { &#39;Current_Load_localhost&#39;:
ensure =&gt; $ng_load_ensure,
check_command =&gt; &quot;check_nrpe!check_load!${ng_load_warn}!${ng_load_crit}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; &#39;localhost&#39;,
contacts =&gt; $ng_contact_name,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &#39;localhost_current_load&#39;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
notify =&gt; Service[$ng_service],
}
# resources { [&#39;nagios_host&#39;,
# &#39;nagios_hostgroup&#39;,
# &#39;nagios_hostdependency&#39;,
# &#39;nagios_hostescalation&#39;,
# &#39;nagios_hostextinfo&#39;,
# &#39;nagios_service&#39;,
# &#39;nagios_servicegroup&#39;,
# &#39;nagios_servicedependency&#39;,
# &#39;nagios_serviceescalation&#39;,
# &#39;nagios_serviceextinfo&#39;,
# &#39;nagios_contact&#39;,
# &#39;nagios_contactgroup&#39;,
# &#39;nagios_command&#39;,
# &#39;nagios_timeperiod&#39;]:
# purge =&gt; true,
# }
# collect resources and populate /etc/nagios/conf.d/nagios_*.cfg
Nagios_host &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostgroup &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostdependency &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostescalation &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostextinfo &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_service &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_servicegroup &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_servicedependency &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_serviceescalation &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_serviceextinfo &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_contact &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_contactgroup &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_command &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_timeperiod &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
} }
}</pre> }</pre>
</td> </td>