Compare commits
1 Commits
master
...
0826e9c574
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0826e9c574 |
22
README.md
22
README.md
@@ -11,7 +11,6 @@
|
|||||||
- [Puppet server and agent](#puppet-server-and-agent)
|
- [Puppet server and agent](#puppet-server-and-agent)
|
||||||
- [Firewall](#firewall)
|
- [Firewall](#firewall)
|
||||||
- [Directories, Files and Services](#directories-files-and-services)
|
- [Directories, Files and Services](#directories-files-and-services)
|
||||||
- [Nagios monitoring](#nagios-monitoring)
|
|
||||||
- [Optional](#optional)
|
- [Optional](#optional)
|
||||||
- [R10k service](#r10k-service)
|
- [R10k service](#r10k-service)
|
||||||
- [R10k Web hook](#r10k-web-hook)
|
- [R10k Web hook](#r10k-web-hook)
|
||||||
@@ -58,28 +57,9 @@ This module is also designed to work with [Foreman][def] as External Node Class
|
|||||||
### Directories, Files and Services
|
### Directories, Files and Services
|
||||||
|
|
||||||
- manage directories and required files including
|
- manage directories and required files including
|
||||||
permissions and selinux context
|
permissions and selinux context (todo)
|
||||||
- start services as required
|
- start services as required
|
||||||
|
|
||||||
### Nagios monitoring
|
|
||||||
|
|
||||||
When `$pt_manage_nagios` is `true`, the module exports a Puppet agent check on
|
|
||||||
every node and a Puppet Server check on the Puppet Server node. The target
|
|
||||||
Nagios installation must provide the NRPE command alias used by the export.
|
|
||||||
The Puppet Server check can use the standard `check_procs` plugin:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
command[check_puppet_server]=/usr/lib64/nagios/plugins/check_procs -c $ARG1$ -a $ARG2$
|
|
||||||
```
|
|
||||||
|
|
||||||
With the exported command, `check_puppet_server!1:!puppetserver` alerts when no
|
|
||||||
running process has `puppetserver` in its full command line. It does not check
|
|
||||||
whether the systemd service is enabled.
|
|
||||||
|
|
||||||
Same goes for the puppetdb service where enabled.
|
|
||||||
|
|
||||||
The modules `confdroid_nagios` and `confdroid_nrpe` include the proper commands already.
|
|
||||||
|
|
||||||
### Optional
|
### Optional
|
||||||
|
|
||||||
#### R10k service
|
#### R10k service
|
||||||
|
|||||||
@@ -98,11 +98,6 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_puppet::monitoring::target (puppet_class)">confdroid_puppet::monitoring::target</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span>
|
||||||
|
|
||||||
|
|||||||
@@ -76,8 +76,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<p><a href="#directories-files-and-services">Directories, Files and Services</a></p>
|
<p><a href="#directories-files-and-services">Directories, Files and Services</a></p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p><a href="#nagios-monitoring">Nagios monitoring</a></p>
|
|
||||||
</li><li>
|
|
||||||
<p><a href="#optional">Optional</a></p>
|
<p><a href="#optional">Optional</a></p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p><a href="#r10k-service">R10k service</a></p>
|
<p><a href="#r10k-service">R10k service</a></p>
|
||||||
@@ -144,24 +142,11 @@
|
|||||||
|
|
||||||
<h3 id="label-Directories-2C+Files+and+Services">Directories, Files and Services</h3>
|
<h3 id="label-Directories-2C+Files+and+Services">Directories, Files and Services</h3>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
<p>manage directories and required files including permissions and selinux context</p>
|
<p>manage directories and required files including permissions and selinux context (todo)</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>start services as required</p>
|
<p>start services as required</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<h3 id="label-Nagios+monitoring">Nagios monitoring</h3>
|
|
||||||
|
|
||||||
<p>When <code>$pt_manage_nagios</code> is <code>true</code>, the module exports a Puppet agent check on every node and a Puppet Server check on the Puppet Server node. The target Nagios installation must provide the NRPE command alias used by the export. The Puppet Server check can use the standard <code>check_procs</code> plugin:</p>
|
|
||||||
|
|
||||||
<pre class="code ruby"><code class="ruby">command[check_puppet_server]=/usr/lib64/nagios/plugins/check_procs -c $ARG1$ -a $ARG2$
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
<p>With the exported command, <code>check_puppet_server!1:!puppetserver</code> alerts when no running process has <code>puppetserver</code> in its full command line. It does not check whether the systemd service is enabled.</p>
|
|
||||||
|
|
||||||
<p>Same goes for the puppetdb service where enabled.</p>
|
|
||||||
|
|
||||||
<p>The modules <code>confdroid_nagios</code> and <code>confdroid_nrpe</code> include the proper commands already.</p>
|
|
||||||
|
|
||||||
<h3 id="label-Optional">Optional</h3>
|
<h3 id="label-Optional">Optional</h3>
|
||||||
|
|
||||||
<h4 id="label-R10k+service">R10k service</h4>
|
<h4 id="label-R10k+service">R10k service</h4>
|
||||||
|
|||||||
@@ -76,8 +76,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<p><a href="#directories-files-and-services">Directories, Files and Services</a></p>
|
<p><a href="#directories-files-and-services">Directories, Files and Services</a></p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p><a href="#nagios-monitoring">Nagios monitoring</a></p>
|
|
||||||
</li><li>
|
|
||||||
<p><a href="#optional">Optional</a></p>
|
<p><a href="#optional">Optional</a></p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p><a href="#r10k-service">R10k service</a></p>
|
<p><a href="#r10k-service">R10k service</a></p>
|
||||||
@@ -144,24 +142,11 @@
|
|||||||
|
|
||||||
<h3 id="label-Directories-2C+Files+and+Services">Directories, Files and Services</h3>
|
<h3 id="label-Directories-2C+Files+and+Services">Directories, Files and Services</h3>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
<p>manage directories and required files including permissions and selinux context</p>
|
<p>manage directories and required files including permissions and selinux context (todo)</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>start services as required</p>
|
<p>start services as required</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<h3 id="label-Nagios+monitoring">Nagios monitoring</h3>
|
|
||||||
|
|
||||||
<p>When <code>$pt_manage_nagios</code> is <code>true</code>, the module exports a Puppet agent check on every node and a Puppet Server check on the Puppet Server node. The target Nagios installation must provide the NRPE command alias used by the export. The Puppet Server check can use the standard <code>check_procs</code> plugin:</p>
|
|
||||||
|
|
||||||
<pre class="code ruby"><code class="ruby">command[check_puppet_server]=/usr/lib64/nagios/plugins/check_procs -c $ARG1$ -a $ARG2$
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
<p>With the exported command, <code>check_puppet_server!1:!puppetserver</code> alerts when no running process has <code>puppetserver</code> in its full command line. It does not check whether the systemd service is enabled.</p>
|
|
||||||
|
|
||||||
<p>Same goes for the puppetdb service where enabled.</p>
|
|
||||||
|
|
||||||
<p>The modules <code>confdroid_nagios</code> and <code>confdroid_nrpe</code> include the proper commands already.</p>
|
|
||||||
|
|
||||||
<h3 id="label-Optional">Optional</h3>
|
<h3 id="label-Optional">Optional</h3>
|
||||||
|
|
||||||
<h4 id="label-R10k+service">R10k service</h4>
|
<h4 id="label-R10k+service">R10k service</h4>
|
||||||
|
|||||||
@@ -78,42 +78,35 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::confdroid_puppet::monitoring::target" class="odd">
|
<li id="object_puppet_classes::confdroid_puppet::params" class="odd">
|
||||||
<div class="item">
|
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_puppet::monitoring::target (puppet_class)">confdroid_puppet::monitoring::target</a></span>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::confdroid_puppet::params" class="even">
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::confdroid_puppet::puppetdb::dirs" class="odd">
|
<li id="object_puppet_classes::confdroid_puppet::puppetdb::dirs" class="even">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Apuppetdb_3A_3Adirs.html" title="puppet_classes::confdroid_puppet::puppetdb::dirs (puppet_class)">confdroid_puppet::puppetdb::dirs</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Apuppetdb_3A_3Adirs.html" title="puppet_classes::confdroid_puppet::puppetdb::dirs (puppet_class)">confdroid_puppet::puppetdb::dirs</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::confdroid_puppet::puppetdb::files" class="even">
|
<li id="object_puppet_classes::confdroid_puppet::puppetdb::files" class="odd">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Apuppetdb_3A_3Afiles.html" title="puppet_classes::confdroid_puppet::puppetdb::files (puppet_class)">confdroid_puppet::puppetdb::files</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Apuppetdb_3A_3Afiles.html" title="puppet_classes::confdroid_puppet::puppetdb::files (puppet_class)">confdroid_puppet::puppetdb::files</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::confdroid_puppet::r10k::install" class="odd">
|
<li id="object_puppet_classes::confdroid_puppet::r10k::install" class="even">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Ar10k_3A_3Ainstall.html" title="puppet_classes::confdroid_puppet::r10k::install (puppet_class)">confdroid_puppet::r10k::install</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Ar10k_3A_3Ainstall.html" title="puppet_classes::confdroid_puppet::r10k::install (puppet_class)">confdroid_puppet::r10k::install</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::confdroid_puppet::server::service" class="even">
|
<li id="object_puppet_classes::confdroid_puppet::server::service" class="odd">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_puppet::server::service (puppet_class)">confdroid_puppet::server::service</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_puppet_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_puppet::server::service (puppet_class)">confdroid_puppet::server::service</a></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>confdroid_puppet::main::config.pp Module name: confdroid_puppet Author: 12ww1160 (12ww1160@confdroid.com)</p>
|
<p>confdroid_puppet::main::config.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,11 +109,7 @@
|
|||||||
11
|
11
|
||||||
12
|
12
|
||||||
13
|
13
|
||||||
14
|
14</pre>
|
||||||
15
|
|
||||||
16
|
|
||||||
17
|
|
||||||
18</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 6</span>
|
||||||
@@ -126,10 +122,6 @@ class confdroid_puppet::main::config (
|
|||||||
if $pt_use_r10k == true {
|
if $pt_use_r10k == true {
|
||||||
include confdroid_puppet::r10k::install
|
include confdroid_puppet::r10k::install
|
||||||
}
|
}
|
||||||
|
|
||||||
if $pt_manage_nagios == true {
|
|
||||||
include confdroid_puppet::monitoring::target
|
|
||||||
}
|
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>confdroid_puppet::main::dirs.pp Module name: confdroid_puppet Author: 12ww1160 (12ww1160@confdroid.com)</p>
|
<p>confdroid_puppet::main::dirs.pp Module name: confdroid_puppet Author: Arne Teuke (arne_teuke@confdroid)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -117,47 +117,7 @@
|
|||||||
19
|
19
|
||||||
20
|
20
|
||||||
21
|
21
|
||||||
22
|
22</pre>
|
||||||
23
|
|
||||||
24
|
|
||||||
25
|
|
||||||
26
|
|
||||||
27
|
|
||||||
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</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
||||||
@@ -178,46 +138,6 @@ class confdroid_puppet::main::dirs (
|
|||||||
seltype => puppet_etc_t,
|
seltype => puppet_etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { $pt_puppetdir:
|
|
||||||
ensure => directory,
|
|
||||||
path => $pt_puppetdir,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0755',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => puppet_etc_t,
|
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
|
|
||||||
if $fqdn == $pt_pm_fqdn {
|
|
||||||
# puppetserver dir
|
|
||||||
file { $pt_server_dir:
|
|
||||||
ensure => directory,
|
|
||||||
path => $pt_server_dir,
|
|
||||||
owner => 'puppet',
|
|
||||||
group => 'puppet',
|
|
||||||
mode => '0750',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => puppet_etc_t,
|
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
|
|
||||||
# code dir
|
|
||||||
file { $pt_code_dir:
|
|
||||||
ensure => directory,
|
|
||||||
path => $pt_code_dir,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0755',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => puppet_etc_t,
|
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,224 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>
|
|
||||||
Puppet Class: confdroid_puppet::monitoring::target
|
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
|
||||||
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
pathId = "puppet_classes::confdroid_puppet::monitoring::target";
|
|
||||||
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">confdroid_puppet::monitoring::target</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: confdroid_puppet::monitoring::target</h1>
|
|
||||||
<div class="box_info">
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>Inherits:</dt>
|
|
||||||
<dd><span class='object_link'><a href="confdroid_puppet_3A_3Aparams.html" title="puppet_classes::confdroid_puppet::params (puppet_class)">confdroid_puppet::params</a></span></dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>Defined in:</dt>
|
|
||||||
<dd>
|
|
||||||
manifests/monitoring/target.pp
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h2>Summary</h2>
|
|
||||||
class manages exports for nagios monitoring
|
|
||||||
|
|
||||||
<h2>Overview</h2>
|
|
||||||
<div class="docstring">
|
|
||||||
<div class="discussion">
|
|
||||||
|
|
||||||
<p>confdroid_puppet::monitoring::target.pp Module name: confdroid_puppet Author: 12ww1160 (12ww1160@puppetsoft.com)</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="tags">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div><div class="method_details_list">
|
|
||||||
<table class="source_code">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<pre class="lines">
|
|
||||||
|
|
||||||
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
10
|
|
||||||
11
|
|
||||||
12
|
|
||||||
13
|
|
||||||
14
|
|
||||||
15
|
|
||||||
16
|
|
||||||
17
|
|
||||||
18
|
|
||||||
19
|
|
||||||
20
|
|
||||||
21
|
|
||||||
22
|
|
||||||
23
|
|
||||||
24
|
|
||||||
25
|
|
||||||
26
|
|
||||||
27
|
|
||||||
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</pre>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<pre class="code"><span class="info file"># File 'manifests/monitoring/target.pp', line 6</span>
|
|
||||||
|
|
||||||
class confdroid_puppet::monitoring::target (
|
|
||||||
|
|
||||||
) inherits confdroid_puppet::params {
|
|
||||||
if $pt_manage_nagios == true {
|
|
||||||
# puppet agent service
|
|
||||||
@@nagios_service { "check_puppet_${fqdn}":
|
|
||||||
check_command => "check_nrpe!check_puppet!${pt_procs_allowed}!puppet",
|
|
||||||
use => 'generic-service',
|
|
||||||
host_name => $fqdn,
|
|
||||||
notification_period => '24x7',
|
|
||||||
service_description => "${fqdn}_check_puppet",
|
|
||||||
target => $pt_target_service,
|
|
||||||
owner => 'nagios',
|
|
||||||
group => 'nagios',
|
|
||||||
mode => '0640',
|
|
||||||
contacts => $pt_target_contacts,
|
|
||||||
}
|
|
||||||
|
|
||||||
if $fqdn == $pt_pm_fqdn {
|
|
||||||
# puppet server service
|
|
||||||
@@nagios_service { "check_puppet_server_${fqdn}":
|
|
||||||
check_command => "check_nrpe!check_puppet_server!${pt_procs_allowed}!puppetserver",
|
|
||||||
use => 'generic-service',
|
|
||||||
host_name => $fqdn,
|
|
||||||
notification_period => '24x7',
|
|
||||||
service_description => "${fqdn}_check_puppet_server",
|
|
||||||
target => $pt_target_service,
|
|
||||||
owner => 'nagios',
|
|
||||||
group => 'nagios',
|
|
||||||
mode => '0640',
|
|
||||||
contacts => $pt_target_contacts,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if $fqdn == $pt_puppetdb_fqdn and $pt_use_puppetdb == true {
|
|
||||||
# puppetdb service
|
|
||||||
@@nagios_service { "check_puppetdb_${fqdn}":
|
|
||||||
check_command => "check_nrpe!check_puppetdb!${pt_procs_allowed}!puppetdb",
|
|
||||||
use => 'generic-service',
|
|
||||||
host_name => $fqdn,
|
|
||||||
notification_period => '24x7',
|
|
||||||
service_description => "${fqdn}_check_puppetdb",
|
|
||||||
target => $pt_target_service,
|
|
||||||
owner => 'nagios',
|
|
||||||
group => 'nagios',
|
|
||||||
mode => '0640',
|
|
||||||
contacts => $pt_target_contacts,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}</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>
|
|
||||||
@@ -85,8 +85,6 @@
|
|||||||
|
|
||||||
<span class='object_link'><a href="confdroid_puppet_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::confdroid_puppet::firewall::iptables (puppet_class)">confdroid_puppet::firewall::iptables</a></span><br/>
|
<span class='object_link'><a href="confdroid_puppet_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::confdroid_puppet::firewall::iptables (puppet_class)">confdroid_puppet::firewall::iptables</a></span><br/>
|
||||||
|
|
||||||
<span class='object_link'><a href="confdroid_puppet_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_puppet::monitoring::target (puppet_class)">confdroid_puppet::monitoring::target</a></span><br/>
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
@@ -1196,73 +1194,6 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>pt_manage_nagios</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>false</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>whether to manage nagios settings</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>pt_target_service</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>String</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'/etc/nagios/conf.d/puppet_service.cfg'</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>the nagios service config file</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>pt_target_contacts</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>Array</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>['nagiosadmin']</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>the nagios contacts to notify</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>pt_procs_allowed</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>String</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'1:'</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
@@ -1274,6 +1205,9 @@
|
|||||||
<pre class="lines">
|
<pre class="lines">
|
||||||
|
|
||||||
|
|
||||||
|
69
|
||||||
|
70
|
||||||
|
71
|
||||||
72
|
72
|
||||||
73
|
73
|
||||||
74
|
74
|
||||||
@@ -1424,20 +1358,10 @@
|
|||||||
219
|
219
|
||||||
220
|
220
|
||||||
221
|
221
|
||||||
222
|
222</pre>
|
||||||
223
|
|
||||||
224
|
|
||||||
225
|
|
||||||
226
|
|
||||||
227
|
|
||||||
228
|
|
||||||
229
|
|
||||||
230
|
|
||||||
231
|
|
||||||
232</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 72</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 69</span>
|
||||||
|
|
||||||
class confdroid_puppet::params (
|
class confdroid_puppet::params (
|
||||||
|
|
||||||
@@ -1514,12 +1438,6 @@ class confdroid_puppet::params (
|
|||||||
String $pt_r10k_basedir = '/etc/puppetlabs/code/environments',
|
String $pt_r10k_basedir = '/etc/puppetlabs/code/environments',
|
||||||
String $pt_r10k_webhook_port = '8085',
|
String $pt_r10k_webhook_port = '8085',
|
||||||
|
|
||||||
# nagios
|
|
||||||
Boolean $pt_manage_nagios = false,
|
|
||||||
String $pt_target_service = '/etc/nagios/conf.d/puppet_service.cfg',
|
|
||||||
Array $pt_target_contacts = ['nagiosadmin'],
|
|
||||||
String $pt_procs_allowed = '1:'
|
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# facts
|
# facts
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
@@ -1532,7 +1450,6 @@ class confdroid_puppet::params (
|
|||||||
$pt_main_dir = '/etc/puppetlabs'
|
$pt_main_dir = '/etc/puppetlabs'
|
||||||
$pt_puppetdir = "${pt_main_dir}/puppet"
|
$pt_puppetdir = "${pt_main_dir}/puppet"
|
||||||
$pt_code_dir = "${pt_main_dir}/code"
|
$pt_code_dir = "${pt_main_dir}/code"
|
||||||
$pt_server_dir = "${pt_main_dir}/puppetserver"
|
|
||||||
$pt_environmentspath = "${pt_code_dir}/environments"
|
$pt_environmentspath = "${pt_code_dir}/environments"
|
||||||
$pt_ssldir = "${pt_puppetdir}/ssl"
|
$pt_ssldir = "${pt_puppetdir}/ssl"
|
||||||
$pt_privatekeydir = "${pt_ssldir}/private_keys"
|
$pt_privatekeydir = "${pt_ssldir}/private_keys"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
## confdroid_puppet::main::config.pp
|
## confdroid_puppet::main::config.pp
|
||||||
# Module name: confdroid_puppet
|
# Module name: confdroid_puppet
|
||||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||||
# @summary Class manages main logic for the confdroid_puppet module.
|
# @summary Class manages main logic for the confdroid_puppet module.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class confdroid_puppet::main::config (
|
class confdroid_puppet::main::config (
|
||||||
@@ -11,8 +11,4 @@ class confdroid_puppet::main::config (
|
|||||||
if $pt_use_r10k == true {
|
if $pt_use_r10k == true {
|
||||||
include confdroid_puppet::r10k::install
|
include confdroid_puppet::r10k::install
|
||||||
}
|
}
|
||||||
|
|
||||||
if $pt_manage_nagios == true {
|
|
||||||
include confdroid_puppet::monitoring::target
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
## confdroid_puppet::main::dirs.pp
|
## confdroid_puppet::main::dirs.pp
|
||||||
# Module name: confdroid_puppet
|
# Module name: confdroid_puppet
|
||||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||||
# @summary Class manages directories for the confdroid_puppet module.
|
# @summary Class manages directories for the confdroid_puppet module.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class confdroid_puppet::main::dirs (
|
class confdroid_puppet::main::dirs (
|
||||||
@@ -19,44 +19,4 @@ class confdroid_puppet::main::dirs (
|
|||||||
seltype => puppet_etc_t,
|
seltype => puppet_etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { $pt_puppetdir:
|
|
||||||
ensure => directory,
|
|
||||||
path => $pt_puppetdir,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0755',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => puppet_etc_t,
|
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
|
|
||||||
if $fqdn == $pt_pm_fqdn {
|
|
||||||
# puppetserver dir
|
|
||||||
file { $pt_server_dir:
|
|
||||||
ensure => directory,
|
|
||||||
path => $pt_server_dir,
|
|
||||||
owner => 'puppet',
|
|
||||||
group => 'puppet',
|
|
||||||
mode => '0750',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => puppet_etc_t,
|
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
|
|
||||||
# code dir
|
|
||||||
file { $pt_code_dir:
|
|
||||||
ensure => directory,
|
|
||||||
path => $pt_code_dir,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0755',
|
|
||||||
selrange => s0,
|
|
||||||
selrole => object_r,
|
|
||||||
seltype => puppet_etc_t,
|
|
||||||
seluser => system_u,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,57 +0,0 @@
|
|||||||
## confdroid_puppet::monitoring::target.pp
|
|
||||||
# Module name: confdroid_puppet
|
|
||||||
# Author: 12ww1160 (12ww1160@puppetsoft.com)
|
|
||||||
# @summary class manages exports for nagios monitoring
|
|
||||||
##############################################################################
|
|
||||||
class confdroid_puppet::monitoring::target (
|
|
||||||
|
|
||||||
) inherits confdroid_puppet::params {
|
|
||||||
if $pt_manage_nagios == true {
|
|
||||||
# puppet agent service
|
|
||||||
@@nagios_service { "check_puppet_${fqdn}":
|
|
||||||
check_command => "check_nrpe!check_puppet!${pt_procs_allowed}!puppet",
|
|
||||||
use => 'generic-service',
|
|
||||||
host_name => $fqdn,
|
|
||||||
notification_period => '24x7',
|
|
||||||
service_description => "${fqdn}_check_puppet",
|
|
||||||
target => $pt_target_service,
|
|
||||||
owner => 'nagios',
|
|
||||||
group => 'nagios',
|
|
||||||
mode => '0640',
|
|
||||||
contacts => $pt_target_contacts,
|
|
||||||
}
|
|
||||||
|
|
||||||
if $fqdn == $pt_pm_fqdn {
|
|
||||||
# puppet server service
|
|
||||||
@@nagios_service { "check_puppet_server_${fqdn}":
|
|
||||||
check_command => "check_nrpe!check_puppet_server!${pt_procs_allowed}!puppetserver",
|
|
||||||
use => 'generic-service',
|
|
||||||
host_name => $fqdn,
|
|
||||||
notification_period => '24x7',
|
|
||||||
service_description => "${fqdn}_check_puppet_server",
|
|
||||||
target => $pt_target_service,
|
|
||||||
owner => 'nagios',
|
|
||||||
group => 'nagios',
|
|
||||||
mode => '0640',
|
|
||||||
contacts => $pt_target_contacts,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if $fqdn == $pt_puppetdb_fqdn and $pt_use_puppetdb == true {
|
|
||||||
# puppetdb service
|
|
||||||
@@nagios_service { "check_puppetdb_${fqdn}":
|
|
||||||
check_command => "check_nrpe!check_puppetdb!${pt_procs_allowed}!puppetdb",
|
|
||||||
use => 'generic-service',
|
|
||||||
host_name => $fqdn,
|
|
||||||
notification_period => '24x7',
|
|
||||||
service_description => "${fqdn}_check_puppetdb",
|
|
||||||
target => $pt_target_service,
|
|
||||||
owner => 'nagios',
|
|
||||||
group => 'nagios',
|
|
||||||
mode => '0640',
|
|
||||||
contacts => $pt_target_contacts,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -65,9 +65,6 @@
|
|||||||
# @param [String] pt_pptdb_server_crt placeholder for the server.crt
|
# @param [String] pt_pptdb_server_crt placeholder for the server.crt
|
||||||
# @param [String] pt_pptdb_server_key placeholder for the server.crt
|
# @param [String] pt_pptdb_server_key placeholder for the server.crt
|
||||||
# @param [String] pt_pptdb_log_max_age the max age for puppetdb logs in days
|
# @param [String] pt_pptdb_log_max_age the max age for puppetdb logs in days
|
||||||
# @param [Boolean] pt_manage_nagios whether to manage nagios settings
|
|
||||||
# @param [String] pt_target_service the nagios service config file
|
|
||||||
# @param [Array] pt_target_contacts the nagios contacts to notify
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class confdroid_puppet::params (
|
class confdroid_puppet::params (
|
||||||
|
|
||||||
@@ -144,12 +141,6 @@ class confdroid_puppet::params (
|
|||||||
String $pt_r10k_basedir = '/etc/puppetlabs/code/environments',
|
String $pt_r10k_basedir = '/etc/puppetlabs/code/environments',
|
||||||
String $pt_r10k_webhook_port = '8085',
|
String $pt_r10k_webhook_port = '8085',
|
||||||
|
|
||||||
# nagios
|
|
||||||
Boolean $pt_manage_nagios = false,
|
|
||||||
String $pt_target_service = '/etc/nagios/conf.d/puppet_service.cfg',
|
|
||||||
Array $pt_target_contacts = ['nagiosadmin'],
|
|
||||||
String $pt_procs_allowed = '1:'
|
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# facts
|
# facts
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
@@ -162,7 +153,6 @@ class confdroid_puppet::params (
|
|||||||
$pt_main_dir = '/etc/puppetlabs'
|
$pt_main_dir = '/etc/puppetlabs'
|
||||||
$pt_puppetdir = "${pt_main_dir}/puppet"
|
$pt_puppetdir = "${pt_main_dir}/puppet"
|
||||||
$pt_code_dir = "${pt_main_dir}/code"
|
$pt_code_dir = "${pt_main_dir}/code"
|
||||||
$pt_server_dir = "${pt_main_dir}/puppetserver"
|
|
||||||
$pt_environmentspath = "${pt_code_dir}/environments"
|
$pt_environmentspath = "${pt_code_dir}/environments"
|
||||||
$pt_ssldir = "${pt_puppetdir}/ssl"
|
$pt_ssldir = "${pt_puppetdir}/ssl"
|
||||||
$pt_privatekeydir = "${pt_ssldir}/private_keys"
|
$pt_privatekeydir = "${pt_ssldir}/private_keys"
|
||||||
|
|||||||
Reference in New Issue
Block a user