Merge branch 'jenkins' into 'master'

Jenkins

See merge request !27
This commit is contained in:
12ww1160
2017-07-30 13:23:04 +02:00
25 changed files with 561 additions and 48 deletions

View File

@@ -8,6 +8,16 @@ Changelog of Git Changelog.
<h2> No issue </h2> <h2> No issue </h2>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/93c4d60d239af95">93c4d60d239af95</a> Arne Teuke <i>2017-07-28 18:49:03</i>
<p>
<h3>updated parameter</h3>
</p>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/f6ce7ebb93b4562">f6ce7ebb93b4562</a> Jenkins Server <i>2017-07-28 18:48:58</i>
<p>
<h3>recommit for updates in build 39</h3>
</p>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/ba9e027f7201e79">ba9e027f7201e79</a> Arne Teuke <i>2017-07-28 18:33:24</i> <a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/ba9e027f7201e79">ba9e027f7201e79</a> Arne Teuke <i>2017-07-28 18:33:24</i>
<p> <p>
<h3>updated template</h3> <h3>updated template</h3>

View File

@@ -1,6 +1,6 @@
|Repo Name| version | Build Status| |Repo Name| version | Build Status|
|---|---|---|---| |---|---|---|---|
|`cd_nrpe`| 0.0.0.1 | [![Build Status](https://jenkins.confdroid.com/buildStatus/icon?job=cd_nrpe)](https://jenkins.confdroid.com/job/cd_nrpe/)| |`cd_nrpe`| 0.0.0.2 | [![Build Status](https://jenkins.confdroid.com/buildStatus/icon?job=cd_nrpe)](https://jenkins.confdroid.com/job/cd_nrpe/)|
### Synopsis ### Synopsis
NRPE allows monitoring tools like NAGIOS or ICINGA to connect to clients for monitoring purposes. NRPE allows monitoring tools like NAGIOS or ICINGA to connect to clients for monitoring purposes.
@@ -19,6 +19,7 @@ NRPE allows monitoring tools like NAGIOS or ICINGA to connect to clients for mon
* [native Puppet deployment](#native-puppet-deployment) * [native Puppet deployment](#native-puppet-deployment)
* [through Foreman](#through-foreman) * [through Foreman](#through-foreman)
* [Parameters](#parameters) * [Parameters](#parameters)
* [Managing Check Commands](#managing-check-commands)
* [SELINUX](#selinux) * [SELINUX](#selinux)
* [Known Problems](#known-problems) * [Known Problems](#known-problems)
* [Support](#support) * [Support](#support)
@@ -76,6 +77,18 @@ See [more details about class deployment on Confdroid.com](https://confdroid.com
The following parameters are editable via params.pp or through ENC (**__recommended__**). Values changed will take immediate effect at next puppet run. Services will be restarted where neccessary. The following parameters are editable via params.pp or through ENC (**__recommended__**). Values changed will take immediate effect at next puppet run. Services will be restarted where neccessary.
### Mandatory Parameters
There are currently no mandatory parameters, i.e. the module will function right out of box as is.
### Optional Parameters
* `$ne_manage_cmds` : Whether to manage check command definitions dynamically through a define, i.e. from other Puppet modules or profiles. Defaults to `true`.
* `$ne_incl_fw` : Whether to manage relevant firewall rules through this modules. Defaults to `true`.
* `$ne_include_selinux` : Whether to manage selinux exception rules. Defaults to `true`.
### Managing Check Commands
### SELINUX ### SELINUX
All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored. All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.

View File

@@ -31,6 +31,7 @@
| `-- top-level-namespace.html | `-- top-level-namespace.html
|-- manifests |-- manifests
| |-- commands | |-- commands
| | |-- definition_rules.pp
| | `-- definitions.pp | | `-- definitions.pp
| |-- firewall | |-- firewall
| | `-- iptables.pp | | `-- iptables.pp
@@ -44,6 +45,8 @@
| |-- init.pp | |-- init.pp
| `-- params.pp | `-- params.pp
|-- templates |-- templates
| |-- cmd_head.erb
| |-- cmd_rule.erb
| |-- nrpe_cfg.erb | |-- nrpe_cfg.erb
| `-- nrpe_conf.erb | `-- nrpe_conf.erb
|-- tests |-- tests
@@ -56,4 +59,4 @@
|-- README.md |-- README.md
`-- REPOSTRUCTURE.md `-- REPOSTRUCTURE.md
11 directories, 45 files 11 directories, 48 files

View File

@@ -73,6 +73,11 @@
</li> </li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Acommands_3A_3Adefinitions.html" title="puppet_classes::cd_nrpe::commands::definitions (puppet_class)">cd_nrpe::commands::definitions</a></span>
</li>
<li> <li>
<span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::cd_nrpe::firewall::iptables (puppet_class)">cd_nrpe::firewall::iptables</a></span> <span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::cd_nrpe::firewall::iptables (puppet_class)">cd_nrpe::firewall::iptables</a></span>
@@ -166,7 +171,7 @@
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:53 2017 by Generated on Sun Jul 30 13:32:17 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -61,7 +61,7 @@
<p>|Repo Name| version | Build <p>|Repo Name| version | Build
Status| Status|
|---|---|---|---| |---|---|---|---|
|<code>cd_nrpe</code>| 0.0.0.1 | <a |<code>cd_nrpe</code>| 0.0.0.2 | <a
href="https://jenkins.confdroid.com/buildStatus/icon?job=cd_nrpe">{Build href="https://jenkins.confdroid.com/buildStatus/icon?job=cd_nrpe">{Build
Status</a>/]|</p> Status</a>/]|</p>
@@ -101,6 +101,8 @@ Structure</a></p>
</li><li> </li><li>
<p><a href="#parameters">Parameters</a></p> <p><a href="#parameters">Parameters</a></p>
</li><li> </li><li>
<p><a href="#managing-check-commands">Managing Check Commands</a></p>
</li><li>
<p><a href="#selinux">SELINUX</a></p> <p><a href="#selinux">SELINUX</a></p>
</li><li> </li><li>
<p><a href="#known-problems">Known Problems</a></p> <p><a href="#known-problems">Known Problems</a></p>
@@ -192,6 +194,26 @@ details about class deployment on Confdroid.com</a>.</p>
(<strong>recommended</strong>). Values changed will take immediate effect (<strong>recommended</strong>). Values changed will take immediate effect
at next puppet run. Services will be restarted where neccessary.</p> at next puppet run. Services will be restarted where neccessary.</p>
<h3 id="label-Mandatory+Parameters">Mandatory Parameters</h3>
<p>There are currently no mandatory parameters, i.e. the module will function
right out of box as is.</p>
<h3 id="label-Optional+Parameters">Optional Parameters</h3>
<ul><li>
<p><code>$ne_manage_cmds</code> : Whether to manage check command definitions
dynamically through a define, i.e. from other Puppet modules or profiles.
Defaults to <code>true</code>.</p>
</li><li>
<p><code>$ne_incl_fw</code> : Whether to manage relevant firewall rules
through this modules. Defaults to <code>true</code>.</p>
</li><li>
<p><code>$ne_include_selinux</code> : Whether to manage selinux exception
rules. Defaults to <code>true</code>.</p>
</li></ul>
<h3 id="label-Managing+Check+Commands">Managing Check Commands</h3>
<h3 id="label-SELINUX">SELINUX</h3> <h3 id="label-SELINUX">SELINUX</h3>
<p>All files and directories are configured with correct selinux context. If <p>All files and directories are configured with correct selinux context. If
@@ -252,7 +274,7 @@ environments.</p>
</div></div> </div></div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:54 2017 by Generated on Sun Jul 30 13:32:18 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -61,7 +61,7 @@
<p>|Repo Name| version | Build <p>|Repo Name| version | Build
Status| Status|
|---|---|---|---| |---|---|---|---|
|<code>cd_nrpe</code>| 0.0.0.1 | <a |<code>cd_nrpe</code>| 0.0.0.2 | <a
href="https://jenkins.confdroid.com/buildStatus/icon?job=cd_nrpe">{Build href="https://jenkins.confdroid.com/buildStatus/icon?job=cd_nrpe">{Build
Status</a>/]|</p> Status</a>/]|</p>
@@ -101,6 +101,8 @@ Structure</a></p>
</li><li> </li><li>
<p><a href="#parameters">Parameters</a></p> <p><a href="#parameters">Parameters</a></p>
</li><li> </li><li>
<p><a href="#managing-check-commands">Managing Check Commands</a></p>
</li><li>
<p><a href="#selinux">SELINUX</a></p> <p><a href="#selinux">SELINUX</a></p>
</li><li> </li><li>
<p><a href="#known-problems">Known Problems</a></p> <p><a href="#known-problems">Known Problems</a></p>
@@ -192,6 +194,26 @@ details about class deployment on Confdroid.com</a>.</p>
(<strong>recommended</strong>). Values changed will take immediate effect (<strong>recommended</strong>). Values changed will take immediate effect
at next puppet run. Services will be restarted where neccessary.</p> at next puppet run. Services will be restarted where neccessary.</p>
<h3 id="label-Mandatory+Parameters">Mandatory Parameters</h3>
<p>There are currently no mandatory parameters, i.e. the module will function
right out of box as is.</p>
<h3 id="label-Optional+Parameters">Optional Parameters</h3>
<ul><li>
<p><code>$ne_manage_cmds</code> : Whether to manage check command definitions
dynamically through a define, i.e. from other Puppet modules or profiles.
Defaults to <code>true</code>.</p>
</li><li>
<p><code>$ne_incl_fw</code> : Whether to manage relevant firewall rules
through this modules. Defaults to <code>true</code>.</p>
</li><li>
<p><code>$ne_include_selinux</code> : Whether to manage selinux exception
rules. Defaults to <code>true</code>.</p>
</li></ul>
<h3 id="label-Managing+Check+Commands">Managing Check Commands</h3>
<h3 id="label-SELINUX">SELINUX</h3> <h3 id="label-SELINUX">SELINUX</h3>
<p>All files and directories are configured with correct selinux context. If <p>All files and directories are configured with correct selinux context. If
@@ -252,7 +274,7 @@ environments.</p>
</div></div> </div></div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:54 2017 by Generated on Sun Jul 30 13:32:17 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -47,56 +47,63 @@
</li> </li>
<li id="object_puppet_classes::cd_nrpe::firewall::iptables" class="even"> <li id="object_puppet_classes::cd_nrpe::commands::definitions" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Acommands_3A_3Adefinitions.html" title="puppet_classes::cd_nrpe::commands::definitions (puppet_class)">cd_nrpe::commands::definitions</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nrpe::firewall::iptables" class="odd">
<div class="item"> <div class="item">
<span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::cd_nrpe::firewall::iptables (puppet_class)">cd_nrpe::firewall::iptables</a></span> <span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::cd_nrpe::firewall::iptables (puppet_class)">cd_nrpe::firewall::iptables</a></span>
</div> </div>
</li> </li>
<li id="object_puppet_classes::cd_nrpe::main::config" class="odd"> <li id="object_puppet_classes::cd_nrpe::main::config" class="even">
<div class="item"> <div class="item">
<span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::cd_nrpe::main::config (puppet_class)">cd_nrpe::main::config</a></span> <span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::cd_nrpe::main::config (puppet_class)">cd_nrpe::main::config</a></span>
</div> </div>
</li> </li>
<li id="object_puppet_classes::cd_nrpe::main::dirs" class="even"> <li id="object_puppet_classes::cd_nrpe::main::dirs" class="odd">
<div class="item"> <div class="item">
<span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Adirs.html" title="puppet_classes::cd_nrpe::main::dirs (puppet_class)">cd_nrpe::main::dirs</a></span> <span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Adirs.html" title="puppet_classes::cd_nrpe::main::dirs (puppet_class)">cd_nrpe::main::dirs</a></span>
</div> </div>
</li> </li>
<li id="object_puppet_classes::cd_nrpe::main::files" class="odd"> <li id="object_puppet_classes::cd_nrpe::main::files" class="even">
<div class="item"> <div class="item">
<span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Afiles.html" title="puppet_classes::cd_nrpe::main::files (puppet_class)">cd_nrpe::main::files</a></span> <span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Afiles.html" title="puppet_classes::cd_nrpe::main::files (puppet_class)">cd_nrpe::main::files</a></span>
</div> </div>
</li> </li>
<li id="object_puppet_classes::cd_nrpe::main::install" class="even"> <li id="object_puppet_classes::cd_nrpe::main::install" class="odd">
<div class="item"> <div class="item">
<span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::cd_nrpe::main::install (puppet_class)">cd_nrpe::main::install</a></span> <span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::cd_nrpe::main::install (puppet_class)">cd_nrpe::main::install</a></span>
</div> </div>
</li> </li>
<li id="object_puppet_classes::cd_nrpe::main::service" class="odd"> <li id="object_puppet_classes::cd_nrpe::main::service" class="even">
<div class="item"> <div class="item">
<span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Aservice.html" title="puppet_classes::cd_nrpe::main::service (puppet_class)">cd_nrpe::main::service</a></span> <span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Aservice.html" title="puppet_classes::cd_nrpe::main::service (puppet_class)">cd_nrpe::main::service</a></span>
</div> </div>
</li> </li>
<li id="object_puppet_classes::cd_nrpe::main::user" class="even"> <li id="object_puppet_classes::cd_nrpe::main::user" class="odd">
<div class="item"> <div class="item">
<span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Auser.html" title="puppet_classes::cd_nrpe::main::user (puppet_class)">cd_nrpe::main::user</a></span> <span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Amain_3A_3Auser.html" title="puppet_classes::cd_nrpe::main::user (puppet_class)">cd_nrpe::main::user</a></span>
</div> </div>
</li> </li>
<li id="object_puppet_classes::cd_nrpe::params" class="odd"> <li id="object_puppet_classes::cd_nrpe::params" class="even">
<div class="item"> <div class="item">
<span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Aparams.html" title="puppet_classes::cd_nrpe::params (puppet_class)">cd_nrpe::params</a></span> <span class='object_link'><a href="puppet_classes/cd_nrpe_3A_3Aparams.html" title="puppet_classes::cd_nrpe::params (puppet_class)">cd_nrpe::params</a></span>
</div> </div>

View File

@@ -140,7 +140,7 @@ class cd_nrpe {
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:54 2017 by Generated on Sun Jul 30 13:32:18 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -0,0 +1,217 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nrpe::commands::definitions
&mdash; Documentation by YARD 0.9.9
</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_nrpe::commands::definitions";
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> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nrpe::commands::definitions</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_nrpe::commands::definitions</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nrpe_3A_3Aparams.html" title="puppet_classes::cd_nrpe::params (puppet_class)">cd_nrpe::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/commands/definition_rules.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
manage command definitions via define and Puppet rules.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nrpe::commands::definition_rules.pp
Module name: cd_nrpe
Author: Arne
Teuke (arne_teuke@ConfDroid.com)</p>
<h1 id="label-License%3A">License:</h1>
<p>This file is part of cd_nrpe.</p>
<p>cd_nrpe is used for providing automatic configuration of NRPE.
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><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/commands/definition_rules.pp', line 23</span>
class cd_nrpe::commands::definitions (
) inherits cd_nrpe::params {
if $ne_manage_cmds == true {
# manage the commands.cfg file
concat { $ne_cmd_file:
ensure =&gt; present,
path =&gt; $ne_cmd_file,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0640&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nrpe_etc_t,
seluser =&gt; system_u,
notify =&gt; Service[$ne_service],
}
# manage the file header
concat::fragment { &#39;nrpe_cmd_header&#39;:
target =&gt; $ne_cmd_file,
content =&gt; template($ne_cmd_head_erb),
order =&gt; &#39;000&#39;,
}
# basic example rules
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Sun Jul 30 13:32:19 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>
</div>
</body>
</html>

View File

@@ -165,7 +165,7 @@ class cd_nrpe::firewall::iptables (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:55 2017 by Generated on Sun Jul 30 13:32:19 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -154,7 +154,7 @@ class cd_nrpe::main::config (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:55 2017 by Generated on Sun Jul 30 13:32:19 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -205,7 +205,7 @@ class cd_nrpe::main::dirs (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:55 2017 by Generated on Sun Jul 30 13:32:19 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -217,7 +217,7 @@ class cd_nrpe::main::files (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:55 2017 by Generated on Sun Jul 30 13:32:19 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -160,7 +160,7 @@ class cd_nrpe::main::install (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:55 2017 by Generated on Sun Jul 30 13:32:19 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -145,7 +145,11 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
37 37
38 38
39 39
40</pre> 40
41
42
43
44</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/main/service.pp', line 23</span> <pre class="code"><span class="info file"># File 'manifests/main/service.pp', line 23</span>
@@ -160,6 +164,10 @@ class cd_nrpe::main::service (
require cd_nrpe::main::files require cd_nrpe::main::files
if $ne_manage_cmds == true {
require cd_nrpe::commands::definition_rules
}
service { $ne_service: service { $ne_service:
ensure =&gt; running, ensure =&gt; running,
hasstatus =&gt; true, hasstatus =&gt; true,
@@ -175,7 +183,7 @@ class cd_nrpe::main::service (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:55 2017 by Generated on Sun Jul 30 13:32:19 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -193,7 +193,7 @@ class cd_nrpe::main::user (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:55 2017 by Generated on Sun Jul 30 13:32:19 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -81,6 +81,8 @@
<span class='object_link'><a href="cd_nrpe_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::cd_nrpe::firewall::iptables (puppet_class)">cd_nrpe::firewall::iptables</a></span><br/> <span class='object_link'><a href="cd_nrpe_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::cd_nrpe::firewall::iptables (puppet_class)">cd_nrpe::firewall::iptables</a></span><br/>
<span class='object_link'><a href="cd_nrpe_3A_3Acommands_3A_3Adefinitions.html" title="puppet_classes::cd_nrpe::commands::definitions (puppet_class)">cd_nrpe::commands::definitions</a></span><br/>
</dd> </dd>
</dl> </dl>
@@ -843,6 +845,26 @@ needed.</p>
&mdash; &mdash;
<div class='inline'> <div class='inline'>
<p>Whether to enable SSL certificates.</p> <p>Whether to enable SSL certificates.</p>
</div>
</li>
<li>
<span class='name'>ne_manage_cmds</span>
<span class='type'>(<tt>boolean</tt>)</span>
<em class="default">(defaults to: <tt>true</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to manage command rules for NRPE
checks, to allow dynamic check
&amp; command rules.</p>
</div> </div>
</li> </li>
@@ -864,8 +886,6 @@ needed.</p>
<pre class="lines"> <pre class="lines">
99
100
101 101
102 102
103 103
@@ -939,15 +959,24 @@ needed.</p>
171 171
172 172
173 173
174</pre> 174
175
176
177
178
179
180
181</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 99</span> <pre class="code"><span class="info file"># File 'manifests/params.pp', line 101</span>
class cd_nrpe::params ( class cd_nrpe::params (
$pkg_ensure = &#39;latest&#39;, $pkg_ensure = &#39;latest&#39;,
$ne_manage_cmds = true,
# user settings # user settings
$ne_user = &#39;nrpe&#39;, $ne_user = &#39;nrpe&#39;,
$ne_user_comment = &#39;NRPE service user&#39;, $ne_user_comment = &#39;NRPE service user&#39;,
@@ -1014,6 +1043,9 @@ $ne_main_conf_erb = &#39;cd_nrpe/nrpe_cfg.erb&#39;
$ne_nrpe_pid_file = &quot;${ne_run_dir}/nrpe.pid&quot; $ne_nrpe_pid_file = &quot;${ne_run_dir}/nrpe.pid&quot;
$ne_nrpe_conf_file = &#39;/etc/sysconfig/nrpe&#39; $ne_nrpe_conf_file = &#39;/etc/sysconfig/nrpe&#39;
$ne_nrpe_conf_erb = &#39;cd_nrpe/nrpe_conf.erb&#39; $ne_nrpe_conf_erb = &#39;cd_nrpe/nrpe_conf.erb&#39;
$ne_cmd_file = &quot;${ne_main_conf_d_dir}/commands.cfg&quot;
$ne_cmd_head_erb = &#39;cd_nrpe/cmd_head.erb&#39;
$ne_cmd_rule_erb = &#39;cd_nrpe/cmd_rule.erb&#39;
# includes must be last # includes must be last
@@ -1027,7 +1059,7 @@ $ne_nrpe_conf_erb = &#39;cd_nrpe/nrpe_conf.erb&#39;
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:55 2017 by Generated on Sun Jul 30 13:32:19 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -70,7 +70,8 @@
</div> </div>
<h2>Summary</h2> <h2>Summary</h2>
manage firewall settings through cd_firewall or puppetlabs-firewall Populate command definitions through external puppet rules, i.e.
from other modules.
<h2>Overview</h2> <h2>Overview</h2>
<div class="docstring"> <div class="docstring">
@@ -112,6 +113,71 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div> </div>
</div> </div>
<div class="tags"> <div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ne_check_cmd</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the check_command to use.</p>
</div>
</li>
<li>
<span class='name'>ne_cmd_path</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>&#39;/usr/lib64/nagios/plugins/&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>The path to the command scripts, usually
where the nagis_plugins are
located. If you use your own scripts, specify
the custom location
<strong>including the trailing slash</strong></p>
</div>
</li>
<li>
<span class='name'>ne_cmd_argstring</span>
<span class='type'>(<tt>Any</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the string of valid argument for the command
, i.e. -w $ARG1$ -c
$ARG2$. See the arguments in th eman pages for the
checks.</p>
</div>
</li>
</ul>
</div><div class="method_details_list"> </div><div class="method_details_list">
@@ -121,26 +187,44 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
<pre class="lines"> <pre class="lines">
23 31
24 32
25 33
26 34
27 35
28 36
29 37
30</pre> 38
39
40
41
42
43
44
45
46
47</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/commands/definitions.pp', line 23</span> <pre class="code"><span class="info file"># File 'manifests/commands/definitions.pp', line 31</span>
<span class='id identifier rubyid_define'>define</span> <span class='id identifier rubyid_cd_nrpe'>cd_nrpe</span><span class='op'>::</span><span class='id identifier rubyid_commands'>commands</span><span class='op'>::</span><span class='id identifier rubyid_definitions'>definitions</span> <span class='lparen'>(</span> define cd_nrpe::commands::definitions (
$ne_check_cmd = undef,
$ne_cmd_path = &#39;/usr/lib64/nagios/plugins/&#39;,
$ne_cmd_argstring = undef,
) {
$ne_cmd_file = $::cd_nrpe::params::ne_cmd_file
$ne_cmd_rule_erb = $::cd_nrpe::params::ne_cmd_rule_erb
<span class='rparen'>)</span> <span class='lbrace'>{</span> concat::fragment { $name:
target =&gt; $ne_cmd_file,
content =&gt; template($ne_cmd_rule_erb),
}
<span class='rbrace'>}</span></pre> }</pre>
</td> </td>
</tr> </tr>
</table> </table>
@@ -148,7 +232,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:55 2017 by Generated on Sun Jul 30 13:32:20 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -90,7 +90,7 @@
</div> </div>
<div id="footer"> <div id="footer">
Generated on Fri Jul 28 20:48:54 2017 by Generated on Sun Jul 30 13:32:18 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -0,0 +1,56 @@
## cd_nrpe::commands::definition_rules.pp
# Module name: cd_nrpe
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nrpe.
#
# cd_nrpe is used for providing automatic configuration of NRPE.
# 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.
#
# 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.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary manage command definitions via define and Puppet rules.
###############################################################################
class cd_nrpe::commands::definitions (
) inherits cd_nrpe::params {
if $ne_manage_cmds == true {
# manage the commands.cfg file
concat { $ne_cmd_file:
ensure => present,
path => $ne_cmd_file,
owner => 'root',
group => 'root',
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => nrpe_etc_t,
seluser => system_u,
notify => Service[$ne_service],
}
# manage the file header
concat::fragment { 'nrpe_cmd_header':
target => $ne_cmd_file,
content => template($ne_cmd_head_erb),
order => '000',
}
# basic example rules
}
}

View File

@@ -18,13 +18,30 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary manage firewall settings through cd_firewall or puppetlabs-firewall # @summary Populate command definitions through external puppet rules, i.e.
# from other modules.
# @param [string] ne_check_cmd Specify the check_command to use.
# @param [string] ne_cmd_path The path to the command scripts, usually
# where the nagis_plugins are located. If you use your own scripts, specify
# the custom location **__including the trailing slash__**
# @param ne_cmd_argstring Specify the string of valid argument for the command
# , i.e. -w $ARG1$ -c $ARG2$. See the arguments in th eman pages for the
# checks.
############################################################################### ###############################################################################
define cd_nrpe::commands::definitions ( define cd_nrpe::commands::definitions (
$ne_check_cmd = undef,
$ne_cmd_path = '/usr/lib64/nagios/plugins/',
$ne_cmd_argstring = undef,
) { ) {
$ne_cmd_file = $::cd_nrpe::params::ne_cmd_file
$ne_cmd_rule_erb = $::cd_nrpe::params::ne_cmd_rule_erb
concat::fragment { $name:
target => $ne_cmd_file,
content => template($ne_cmd_rule_erb),
}
} }

View File

@@ -30,6 +30,10 @@ class cd_nrpe::main::service (
require cd_nrpe::main::files require cd_nrpe::main::files
if $ne_manage_cmds == true {
require cd_nrpe::commands::definition_rules
}
service { $ne_service: service { $ne_service:
ensure => running, ensure => running,
hasstatus => true, hasstatus => true,

View File

@@ -95,11 +95,15 @@
# @param [string] ne_allow_weak_rnd_seed Whether to allow weak random seeds # @param [string] ne_allow_weak_rnd_seed Whether to allow weak random seeds
# @param [string] ne_include_selinux Whether to manage selinux # @param [string] ne_include_selinux Whether to manage selinux
# @param [boolean] ne_enable_ssl Whether to enable SSL certificates. # @param [boolean] ne_enable_ssl Whether to enable SSL certificates.
# @param [boolean] ne_manage_cmds Whether to manage command rules for NRPE
# checks, to allow dynamic check & command rules.
############################################################################### ###############################################################################
class cd_nrpe::params ( class cd_nrpe::params (
$pkg_ensure = 'latest', $pkg_ensure = 'latest',
$ne_manage_cmds = true,
# user settings # user settings
$ne_user = 'nrpe', $ne_user = 'nrpe',
$ne_user_comment = 'NRPE service user', $ne_user_comment = 'NRPE service user',
@@ -166,6 +170,9 @@ $ne_main_conf_erb = 'cd_nrpe/nrpe_cfg.erb'
$ne_nrpe_pid_file = "${ne_run_dir}/nrpe.pid" $ne_nrpe_pid_file = "${ne_run_dir}/nrpe.pid"
$ne_nrpe_conf_file = '/etc/sysconfig/nrpe' $ne_nrpe_conf_file = '/etc/sysconfig/nrpe'
$ne_nrpe_conf_erb = 'cd_nrpe/nrpe_conf.erb' $ne_nrpe_conf_erb = 'cd_nrpe/nrpe_conf.erb'
$ne_cmd_file = "${ne_main_conf_d_dir}/commands.cfg"
$ne_cmd_head_erb = 'cd_nrpe/cmd_head.erb'
$ne_cmd_rule_erb = 'cd_nrpe/cmd_rule.erb'
# includes must be last # includes must be last

4
templates/cmd_head.erb Normal file
View File

@@ -0,0 +1,4 @@
################################################################################
########## commandsmds.cfg managed by Puppet ##########
########## manual changes will be orverwritten ##########
################################################################################

2
templates/cmd_rule.erb Normal file
View File

@@ -0,0 +1,2 @@
cmd[<%= @ne_check_cmd %>]= <%= @ne_cmd_path %><%= @ne_check_cmd %> <%= @ne_cmd_argstring %>