10
CHANGELOG.md
10
CHANGELOG.md
@@ -8,6 +8,16 @@ Changelog of Git Changelog.
|
||||
<h2> No issue </h2>
|
||||
|
||||
|
||||
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/05036af24182601">05036af24182601</a> Jenkins Server <i>2017-07-20 16:26:40</i>
|
||||
<p>
|
||||
<h3>recommit for updates in build 12</h3>
|
||||
|
||||
</p>
|
||||
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/6e251a61a25bb1d">6e251a61a25bb1d</a> Arne Teuke <i>2017-07-20 16:26:21</i>
|
||||
<p>
|
||||
<h3>changed wrong refresh</h3>
|
||||
|
||||
</p>
|
||||
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/2d7dc8a5c57ed98">2d7dc8a5c57ed98</a> Jenkins Server <i>2017-07-20 16:21:27</i>
|
||||
<p>
|
||||
<h3>recommit for updates in build 11</h3>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|Repo Name| version | Build Status|
|
||||
|---|---|---|---|
|
||||
|`cd_nagios`| 0.0.0.6 | [](https://jenkins.confdroid.com/job/cd_nagios/)|
|
||||
|`cd_nagios`| 0.0.0.7 | [](https://jenkins.confdroid.com/job/cd_nagios/)|
|
||||
|
||||
### Synopsis
|
||||
Nagios is a powerful open source software solution for monitoring your IT environments.
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
| |-- init.pp
|
||||
| `-- params.pp
|
||||
|-- templates
|
||||
| |-- httpd
|
||||
| | `-- nagios_conf.erb
|
||||
| |-- nagios
|
||||
| | |-- cgi_cfg.erb
|
||||
| | `-- htpasswd_rule.erb
|
||||
@@ -65,4 +67,4 @@
|
||||
|-- README.md
|
||||
`-- REPOSTRUCTURE.md
|
||||
|
||||
15 directories, 50 files
|
||||
16 directories, 51 files
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:35 2017 by
|
||||
Generated on Fri Jul 21 13:06:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<p>|Repo Name| version | Build
|
||||
Status|
|
||||
|---|---|---|---|
|
||||
|<code>cd_nagios</code>| 0.0.0.6 | <a
|
||||
|<code>cd_nagios</code>| 0.0.0.7 | <a
|
||||
href="https://jenkins.confdroid.com/buildStatus/icon?job=cd_nagios">{Build
|
||||
Status</a>/]|</p>
|
||||
|
||||
@@ -297,7 +297,7 @@ environments.</p>
|
||||
</div></div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:36 2017 by
|
||||
Generated on Fri Jul 21 13:06:55 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<p>|Repo Name| version | Build
|
||||
Status|
|
||||
|---|---|---|---|
|
||||
|<code>cd_nagios</code>| 0.0.0.6 | <a
|
||||
|<code>cd_nagios</code>| 0.0.0.7 | <a
|
||||
href="https://jenkins.confdroid.com/buildStatus/icon?job=cd_nagios">{Build
|
||||
Status</a>/]|</p>
|
||||
|
||||
@@ -297,7 +297,7 @@ environments.</p>
|
||||
</div></div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:35 2017 by
|
||||
Generated on Fri Jul 21 13:06:54 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -139,7 +139,7 @@ class cd_nagios {
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:36 2017 by
|
||||
Generated on Fri Jul 21 13:06:55 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -207,7 +207,7 @@ class cd_nagios::firewall::iptables (
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:38 2017 by
|
||||
Generated on Fri Jul 21 13:06:57 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -187,7 +187,7 @@ class cd_nagios::main::config (
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:37 2017 by
|
||||
Generated on Fri Jul 21 13:06:56 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -468,7 +468,7 @@ class cd_nagios::main::dirs (
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:37 2017 by
|
||||
Generated on Fri Jul 21 13:06:56 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -235,7 +235,7 @@ class cd_nagios::main::install (
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:38 2017 by
|
||||
Generated on Fri Jul 21 13:06:56 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -200,7 +200,7 @@ class cd_nagios::main::user (
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:37 2017 by
|
||||
Generated on Fri Jul 21 13:06:56 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -1803,6 +1803,27 @@ unchecked.</p>
|
||||
<p>Whether to enable selinux tools and
|
||||
policies. only effective if selinux is
|
||||
enabled.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>ng_required_hosts</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>array</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>['']</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Array of FQDNs for hosts which should be
|
||||
allowed/required. every entry in
|
||||
the array creates a new line in the
|
||||
configuration file.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
@@ -1824,9 +1845,6 @@ enabled.</p>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
198
|
||||
199
|
||||
200
|
||||
201
|
||||
202
|
||||
203
|
||||
@@ -1974,10 +1992,19 @@ enabled.</p>
|
||||
345
|
||||
346
|
||||
347
|
||||
348</pre>
|
||||
348
|
||||
349
|
||||
350
|
||||
351
|
||||
352
|
||||
353
|
||||
354
|
||||
355
|
||||
356
|
||||
357</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 198</span>
|
||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 201</span>
|
||||
|
||||
class cd_nagios::params (
|
||||
|
||||
@@ -2085,6 +2112,9 @@ $ng_ack_no_send = '0',
|
||||
# selinux
|
||||
$ng_use_selinux_tools = true,
|
||||
|
||||
# httpd
|
||||
$ng_required_hosts = [''],
|
||||
|
||||
) {
|
||||
|
||||
# installation section
|
||||
@@ -2100,30 +2130,33 @@ $ng_use_selinux_tools = true,
|
||||
}
|
||||
|
||||
# service
|
||||
$ng_service = 'nagios'
|
||||
$ng_service = 'nagios'
|
||||
$ae_service = 'httpd'
|
||||
|
||||
# directories
|
||||
$ng_main_dir = '/etc/nagios'
|
||||
$ng_conf_d_dir = "${ng_main_dir}/conf.d"
|
||||
$ng_objects_dir = "${ng_main_dir}/objects"
|
||||
$ng_private_dir = "${ng_main_dir}/private"
|
||||
$ng_usr_incl = '/usr/include/nagios'
|
||||
$ng_lib_dir = '/usr/lib64/nagios'
|
||||
$ng_log_dir = '/var/log/nagios'
|
||||
$ng_log_archives = "${ng_log_dir}/archives"
|
||||
$ng_spool_dir = '/var/spool/nagios'
|
||||
$ng_usr_share = '/usr/share/nagios'
|
||||
$ng_share_html = "${ng_usr_share}/html"
|
||||
$ng_main_dir = '/etc/nagios'
|
||||
$ng_conf_d_dir = "${ng_main_dir}/conf.d"
|
||||
$ng_objects_dir = "${ng_main_dir}/objects"
|
||||
$ng_private_dir = "${ng_main_dir}/private"
|
||||
$ng_usr_incl = '/usr/include/nagios'
|
||||
$ng_lib_dir = '/usr/lib64/nagios'
|
||||
$ng_log_dir = '/var/log/nagios'
|
||||
$ng_log_archives = "${ng_log_dir}/archives"
|
||||
$ng_spool_dir = '/var/spool/nagios'
|
||||
$ng_usr_share = '/usr/share/nagios'
|
||||
$ng_share_html = "${ng_usr_share}/html"
|
||||
|
||||
# files
|
||||
$ng_main_config = "${ng_main_dir}/nagios.cfg"
|
||||
$ng_cgi_cfg_file = "${ng_main_dir}/cgi.cfg"
|
||||
$ng_cgi_cfg_erb = 'cd_nagios/nagios/cgi_cfg.erb'
|
||||
$ng_htpasswd_file = "${ng_main_dir}/passwd"
|
||||
$ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb'
|
||||
$ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb'
|
||||
$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb'
|
||||
$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb'
|
||||
$ng_main_config = "${ng_main_dir}/nagios.cfg"
|
||||
$ng_cgi_cfg_file = "${ng_main_dir}/cgi.cfg"
|
||||
$ng_cgi_cfg_erb = 'cd_nagios/nagios/cgi_cfg.erb'
|
||||
$ng_htpasswd_file = "${ng_main_dir}/passwd"
|
||||
$ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb'
|
||||
$ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb'
|
||||
$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb'
|
||||
$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb'
|
||||
$ng_nagios_conf = '/etc/httpd/conf.d/nagios.conf'
|
||||
$ng_nagios_conf_erb = 'cd_nagios/httpd/nagios_conf.erb'
|
||||
|
||||
# includes must be last
|
||||
|
||||
@@ -2137,7 +2170,7 @@ $ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb'
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:37 2017 by
|
||||
Generated on Fri Jul 21 13:06:56 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -182,7 +182,8 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
||||
73
|
||||
74
|
||||
75
|
||||
76</pre>
|
||||
76
|
||||
77</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/selinux/config.pp', line 24</span>
|
||||
@@ -218,7 +219,7 @@ class cd_nagios::selinux::config (
|
||||
path => ['/usr/bin','/usr/sbin'],
|
||||
cwd => $ng_user_home,
|
||||
require => Exec['create_policy_taccgi'],
|
||||
refreshonly => true,
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
# sealert status.cgi
|
||||
@@ -236,7 +237,8 @@ class cd_nagios::selinux::config (
|
||||
path => ['/usr/bin','/usr/sbin'],
|
||||
cwd => $ng_user_home,
|
||||
require => Exec['create_policy_statuscgi'],
|
||||
refreshonly => true,
|
||||
refreshonly => true,
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
@@ -247,7 +249,7 @@ class cd_nagios::selinux::config (
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:38 2017 by
|
||||
Generated on Fri Jul 21 13:06:57 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -195,7 +195,7 @@ class cd_nagios::server::access_rules (
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:38 2017 by
|
||||
Generated on Fri Jul 21 13:06:57 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -156,7 +156,23 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
||||
47
|
||||
48
|
||||
49
|
||||
50</pre>
|
||||
50
|
||||
51
|
||||
52
|
||||
53
|
||||
54
|
||||
55
|
||||
56
|
||||
57
|
||||
58
|
||||
59
|
||||
60
|
||||
61
|
||||
62
|
||||
63
|
||||
64
|
||||
65
|
||||
66</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/server/files.pp', line 23</span>
|
||||
@@ -187,6 +203,22 @@ class cd_nagios::server::files (
|
||||
content => template($ng_cgi_cfg_erb),
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
# manage nagios.conf for httpd
|
||||
|
||||
file { $ng_nagios_conf:
|
||||
ensure => file,
|
||||
path => $ng_nagios_conf,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => httpd_config_t,
|
||||
seluser => system_u,
|
||||
content => template($ng_nagios_conf_erb),
|
||||
notify => Service[$ae_service],
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
@@ -196,7 +228,7 @@ class cd_nagios::server::files (
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:38 2017 by
|
||||
Generated on Fri Jul 21 13:06:56 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -174,7 +174,7 @@ class cd_nagios::server::service (
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:38 2017 by
|
||||
Generated on Fri Jul 21 13:06:57 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -209,7 +209,7 @@ $ng_service = $::cd_nagios::params::ng_service
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:38 2017 by
|
||||
Generated on Fri Jul 21 13:06:57 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Thu Jul 20 18:26:36 2017 by
|
||||
Generated on Fri Jul 21 13:06:55 2017 by
|
||||
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.9 (ruby-2.0.0).
|
||||
</div>
|
||||
|
||||
@@ -194,6 +194,9 @@
|
||||
# "Send Notification" to be unchecked.
|
||||
# @param [boolean] ng_use_selinux_tools Whether to enable selinux tools and
|
||||
# policies. only effective if selinux is enabled.
|
||||
# @param [array] ng_required_hosts Array of FQDNs for hosts which should be
|
||||
# allowed/required. every entry in the array creates a new line in the
|
||||
# configuration file.
|
||||
###############################################################################
|
||||
class cd_nagios::params (
|
||||
|
||||
@@ -301,6 +304,9 @@ $ng_ack_no_send = '0',
|
||||
# selinux
|
||||
$ng_use_selinux_tools = true,
|
||||
|
||||
# httpd
|
||||
$ng_required_hosts = [''],
|
||||
|
||||
) {
|
||||
|
||||
# installation section
|
||||
@@ -316,30 +322,33 @@ $ng_use_selinux_tools = true,
|
||||
}
|
||||
|
||||
# service
|
||||
$ng_service = 'nagios'
|
||||
$ng_service = 'nagios'
|
||||
$ae_service = 'httpd'
|
||||
|
||||
# directories
|
||||
$ng_main_dir = '/etc/nagios'
|
||||
$ng_conf_d_dir = "${ng_main_dir}/conf.d"
|
||||
$ng_objects_dir = "${ng_main_dir}/objects"
|
||||
$ng_private_dir = "${ng_main_dir}/private"
|
||||
$ng_usr_incl = '/usr/include/nagios'
|
||||
$ng_lib_dir = '/usr/lib64/nagios'
|
||||
$ng_log_dir = '/var/log/nagios'
|
||||
$ng_log_archives = "${ng_log_dir}/archives"
|
||||
$ng_spool_dir = '/var/spool/nagios'
|
||||
$ng_usr_share = '/usr/share/nagios'
|
||||
$ng_share_html = "${ng_usr_share}/html"
|
||||
$ng_main_dir = '/etc/nagios'
|
||||
$ng_conf_d_dir = "${ng_main_dir}/conf.d"
|
||||
$ng_objects_dir = "${ng_main_dir}/objects"
|
||||
$ng_private_dir = "${ng_main_dir}/private"
|
||||
$ng_usr_incl = '/usr/include/nagios'
|
||||
$ng_lib_dir = '/usr/lib64/nagios'
|
||||
$ng_log_dir = '/var/log/nagios'
|
||||
$ng_log_archives = "${ng_log_dir}/archives"
|
||||
$ng_spool_dir = '/var/spool/nagios'
|
||||
$ng_usr_share = '/usr/share/nagios'
|
||||
$ng_share_html = "${ng_usr_share}/html"
|
||||
|
||||
# files
|
||||
$ng_main_config = "${ng_main_dir}/nagios.cfg"
|
||||
$ng_cgi_cfg_file = "${ng_main_dir}/cgi.cfg"
|
||||
$ng_cgi_cfg_erb = 'cd_nagios/nagios/cgi_cfg.erb'
|
||||
$ng_htpasswd_file = "${ng_main_dir}/passwd"
|
||||
$ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb'
|
||||
$ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb'
|
||||
$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb'
|
||||
$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb'
|
||||
$ng_main_config = "${ng_main_dir}/nagios.cfg"
|
||||
$ng_cgi_cfg_file = "${ng_main_dir}/cgi.cfg"
|
||||
$ng_cgi_cfg_erb = 'cd_nagios/nagios/cgi_cfg.erb'
|
||||
$ng_htpasswd_file = "${ng_main_dir}/passwd"
|
||||
$ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb'
|
||||
$ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb'
|
||||
$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb'
|
||||
$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb'
|
||||
$ng_nagios_conf = '/etc/httpd/conf.d/nagios.conf'
|
||||
$ng_nagios_conf_erb = 'cd_nagios/httpd/nagios_conf.erb'
|
||||
|
||||
# includes must be last
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class cd_nagios::selinux::config (
|
||||
path => ['/usr/bin','/usr/sbin'],
|
||||
cwd => $ng_user_home,
|
||||
require => Exec['create_policy_taccgi'],
|
||||
refreshonly => true,
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
# sealert status.cgi
|
||||
@@ -70,7 +70,8 @@ class cd_nagios::selinux::config (
|
||||
path => ['/usr/bin','/usr/sbin'],
|
||||
cwd => $ng_user_home,
|
||||
require => Exec['create_policy_statuscgi'],
|
||||
refreshonly => true,
|
||||
refreshonly => true,
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,5 +46,21 @@ class cd_nagios::server::files (
|
||||
content => template($ng_cgi_cfg_erb),
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
# manage nagios.conf for httpd
|
||||
|
||||
file { $ng_nagios_conf:
|
||||
ensure => file,
|
||||
path => $ng_nagios_conf,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => httpd_config_t,
|
||||
seluser => system_u,
|
||||
content => template($ng_nagios_conf_erb),
|
||||
notify => Service[$ae_service],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
78
templates/httpd/nagios_conf.erb
Normal file
78
templates/httpd/nagios_conf.erb
Normal file
@@ -0,0 +1,78 @@
|
||||
################################################################################
|
||||
########## /etc/httpd/conf.d/nagios.conf created by Puppet ###########
|
||||
########## manual changes will be overwritten !!! ###########
|
||||
################################################################################
|
||||
########## full reference is available at ###########
|
||||
########## https://confdroid.com/2017/07/nagios-nagios-conf/ ###########
|
||||
################################################################################
|
||||
|
||||
ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/"
|
||||
|
||||
<Directory "/usr/lib64/nagios/cgi-bin/">
|
||||
<% if @ng_use_https == true -%>
|
||||
SSLRequireSSL
|
||||
<% else -%>
|
||||
# SSLRequireSSL
|
||||
<% end -%>
|
||||
Options ExecCGI
|
||||
AllowOverride None
|
||||
<IfVersion >= 2.3>
|
||||
<RequireAll>
|
||||
Require all granted
|
||||
Require local
|
||||
<% @ng_required_hosts.each do |required_host| -%>
|
||||
Require host <%= required_host %>
|
||||
<% end -%>
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/nagios/passwd
|
||||
Require valid-user
|
||||
</RequireAll>
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
# Order deny,allow
|
||||
# Deny from all
|
||||
# Allow from 127.0.0.1
|
||||
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/nagios/passwd
|
||||
Require valid-user
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
Alias /nagios "/usr/share/nagios/html"
|
||||
|
||||
<Directory "/usr/share/nagios/html">
|
||||
# SSLRequireSSL
|
||||
Options None
|
||||
AllowOverride None
|
||||
<IfVersion >= 2.3>
|
||||
<RequireAll>
|
||||
Require all granted
|
||||
Require local
|
||||
<% @ng_required_hosts.each do |required_host| -%>
|
||||
Require host <%= required_host %>
|
||||
<% end -%>
|
||||
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/nagios/passwd
|
||||
Require valid-user
|
||||
</RequireAll>
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
# Order deny,allow
|
||||
# Deny from all
|
||||
# Allow from 127.0.0.1
|
||||
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/nagios/passwd
|
||||
Require valid-user
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
Reference in New Issue
Block a user