recommit for updates in build 7
This commit is contained in:
@@ -0,0 +1,243 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: cd_nagios::nagios::resources::resource
|
||||
|
||||
— Documentation by YARD 0.9.12
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
pathId = "puppet_classes::cd_nagios::nagios::resources::resource";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">cd_nagios::nagios::resources::resource</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: cd_nagios::nagios::resources::resource</h1>
|
||||
<div class="box_info">
|
||||
|
||||
<dl>
|
||||
<dt>Inherits:</dt>
|
||||
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/nagios/resources/resource.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class manages the resource config file header.
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>cd_nagios::nagios::resources::resource.pp
|
||||
Module name: cd_nagios
|
||||
Author:
|
||||
Arne Teuke (arne_teuke@ConfDroid.com)</p>
|
||||
|
||||
<h1 id="label-License%3A">License:</h1>
|
||||
|
||||
<p>This file is part of cd_nagios.</p>
|
||||
|
||||
<p>cd_nagios is used for providing automatic configuration of Nagios
|
||||
|
||||
Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
|
||||
This program is
|
||||
free software: you can redistribute it and/or modify
|
||||
it under the terms of
|
||||
the GNU General Public License as published by
|
||||
the Free Software
|
||||
Foundation, either version 3 of the License, or
|
||||
(at your option) any later
|
||||
version.</p>
|
||||
|
||||
<p>This program is distributed in the hope that it will be useful,
|
||||
but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License
|
||||
for more details.</p>
|
||||
|
||||
<p>You should have received a copy of the GNU General Public License
|
||||
along
|
||||
with this program. If not, see <a
|
||||
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.
|
||||
}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
<div class="examples">
|
||||
<p class="tag_title">Examples:</p>
|
||||
|
||||
|
||||
<p class="example_title"><div class='inline'>
|
||||
<p>concat::fragment { “user_rule_plugins”:</p>
|
||||
</div></p>
|
||||
|
||||
<pre class="example code"><code>ng_user_arg_name => "$user1$",
|
||||
ng_user_arg_value => '/usr/lib64/nagios/plugins',
|
||||
ng_user_arg_comment => "Sets $USER1$ to be the path to the plugins",</code></pre>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
28
|
||||
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</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/nagios/resources/resource.pp', line 28</span>
|
||||
|
||||
class cd_nagios::nagios::resources::resource (
|
||||
|
||||
) inherits cd_nagios::params {
|
||||
|
||||
if $fqdn == $ng_nagios_server {
|
||||
|
||||
concat { $ng_resource_file:
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => nagios_etc_t,
|
||||
seluser => system_u,
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
concat::fragment { 'header':
|
||||
target => $ng_resource_file,
|
||||
content => template($ng_resource_erb),
|
||||
order => '000',
|
||||
}
|
||||
|
||||
# plugins rule
|
||||
|
||||
cd_nagios::nagios::resources::resource_df { 'user_rule_plugins':
|
||||
ng_user_arg_name => 'user1',
|
||||
ng_user_arg_value => '/usr/lib64/nagios/plugins',
|
||||
ng_user_arg_comment => "Sets user1 to be the path to the plugins",
|
||||
}
|
||||
|
||||
# eventhandlers rule
|
||||
cd_nagios::nagios::resources::resource_df { 'user_rule_eventhandlers':
|
||||
ng_user_arg_name => 'user2',
|
||||
ng_user_arg_value => '/usr/lib64/nagios/plugins/eventhandlers',
|
||||
ng_user_arg_comment => "Sets user2 to be the path to the eventhandlers",
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -97,6 +97,8 @@
|
||||
|
||||
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Ahostgroups.html" title="puppet_classes::cd_nagios::nagios::objects::hostgroups (puppet_class)">cd_nagios::nagios::objects::hostgroups</a></span><br/>
|
||||
|
||||
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aresources_3A_3Aresource.html" title="puppet_classes::cd_nagios::nagios::resources::resource (puppet_class)">cd_nagios::nagios::resources::resource</a></span><br/>
|
||||
|
||||
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atimeperiods.html" title="puppet_classes::cd_nagios::nagios::objects::timeperiods (puppet_class)">cd_nagios::nagios::objects::timeperiods</a></span><br/>
|
||||
|
||||
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acontactgroups.html" title="puppet_classes::cd_nagios::nagios::objects::contactgroups (puppet_class)">cd_nagios::nagios::objects::contactgroups</a></span><br/>
|
||||
@@ -4915,6 +4917,42 @@ the check declaration from there, so the
|
||||
Nagios check is properly aligned
|
||||
to the Puppet module controlling the
|
||||
particular item.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>ng_user_arg1</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>string</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>'/usr/lib64/nagios/plugins'</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>the user argument for $user1$</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>ng_user_arg2</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>string</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>'/usr/lib64/nagios/plugins/eventhandlers'</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>the user argument for $user2$</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
@@ -4936,8 +4974,6 @@ particular item.</p>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
653
|
||||
654
|
||||
655
|
||||
656
|
||||
657
|
||||
@@ -5295,10 +5331,16 @@ particular item.</p>
|
||||
1009
|
||||
1010
|
||||
1011
|
||||
1012</pre>
|
||||
1012
|
||||
1013
|
||||
1014
|
||||
1015
|
||||
1016
|
||||
1017
|
||||
1018</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 653</span>
|
||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 655</span>
|
||||
|
||||
class cd_nagios::params (
|
||||
|
||||
@@ -5554,6 +5596,9 @@ $ng_loadctl_options = 'jobs_max=100;backoff_limit=10;rampup_change=5
|
||||
# single nagios checks
|
||||
$ng_enable_swap_check = true,
|
||||
|
||||
# resource.cfg
|
||||
$ng_user_arg1 = '/usr/lib64/nagios/plugins',
|
||||
$ng_user_arg2 = '/usr/lib64/nagios/plugins/eventhandlers',
|
||||
|
||||
) {
|
||||
|
||||
@@ -5614,6 +5659,7 @@ $ng_ssl_vhost_file = '/etc/httpd/conf.d/nagios_ssl.conf'
|
||||
$ng_ssl_vhost_erb = 'cd_nagios/httpd/nagios_ssl_vhost.erb'
|
||||
$ng_nagios_cfg_file = "${ng_main_dir}/nagios.cfg"
|
||||
$ng_nagios_cfg_erb = 'cd_nagios/nagios/nagios_cfg.erb'
|
||||
$ng_resource_erb = 'cd_nagios/nagios/resource_cfg.erb'
|
||||
|
||||
# certbot
|
||||
$ng_certbot_main_dir = '/etc/letsencrypt'
|
||||
|
||||
@@ -225,7 +225,26 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
||||
116
|
||||
117
|
||||
118
|
||||
119</pre>
|
||||
119
|
||||
120
|
||||
121
|
||||
122
|
||||
123
|
||||
124
|
||||
125
|
||||
126
|
||||
127
|
||||
128
|
||||
129
|
||||
130
|
||||
131
|
||||
132
|
||||
133
|
||||
134
|
||||
135
|
||||
136
|
||||
137
|
||||
138</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/server/files.pp', line 23</span>
|
||||
@@ -277,6 +296,25 @@ class cd_nagios::server::files (
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
# manage resources.cfg file
|
||||
|
||||
file { $ng_resource_file:
|
||||
ensure => file,
|
||||
path => $ng_resource_file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => nagios_etc_t,
|
||||
seluser => system_u,
|
||||
content => template($ng_cgi_cfg_erb),
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
|
||||
|
||||
## Apache files
|
||||
# since we use vhost files, we do not want the regular file to appear
|
||||
# after upgrades to avoid conflicts
|
||||
|
||||
|
||||
@@ -324,7 +324,8 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
||||
215
|
||||
216
|
||||
217
|
||||
218</pre>
|
||||
218
|
||||
219</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/server/service.pp', line 23</span>
|
||||
@@ -341,6 +342,7 @@ class cd_nagios::server::service (
|
||||
require cd_nagios::server::files
|
||||
require cd_nagios::server::access_rules
|
||||
require cd_nagios::nagios::objects::config
|
||||
require cd_nagios::nagios::resources::resource
|
||||
|
||||
service { $ng_service:
|
||||
ensure => running,
|
||||
@@ -349,7 +351,7 @@ class cd_nagios::server::service (
|
||||
enable => true,
|
||||
}
|
||||
|
||||
@@nagios_host { 'localhost':
|
||||
@@nagios_host { "localhost_${::hostname}":
|
||||
ensure => $ng_ping_ensure,
|
||||
alias => 'localhost',
|
||||
address => '127.0.0.1',
|
||||
|
||||
Reference in New Issue
Block a user