Merge branch 'jenkins' into 'master'

Jenkins

See merge request !66
This commit is contained in:
12ww1160
2017-07-27 15:12:45 +02:00
48 changed files with 1075 additions and 105 deletions

View File

@@ -8,6 +8,16 @@ Changelog of Git Changelog.
<h2> No issue </h2>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/dd4d061fe556bfb">dd4d061fe556bfb</a> Jenkins Server <i>2017-07-27 12:47:24</i>
<p>
<h3>recommit for updates in build 115</h3>
</p>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/25a31ffc1bc0790">25a31ffc1bc0790</a> Arne Teuke <i>2017-07-27 12:46:46</i>
<p>
<h3>edited README and fixed template</h3>
</p>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/5193e6a8d2dedc5">5193e6a8d2dedc5</a> Jenkins Server <i>2017-07-27 12:33:19</i>
<p>
<h3>recommit for updates in build 114</h3>

View File

@@ -52,6 +52,7 @@ Configuration
* manage Nagios main contacts through Puppet exports. Additional contacts can be created through external Puppet rules via define, to avoid having to alter the module code.
* manage Nagios main contactgroups through Puppet exports. Additional contact groups can be created through external Puppet rules via define, to avoid having to alter the module code.
* manage Nagios main hostgroups through Puppet exports. Additional host groups can be created through external Puppet rules via define, to avoid having to alter the module code.
* manage Nagios main servicegroups through Puppet exports. Additional service groups can be created through external Puppet rules via define, to avoid having to alter the module code.
* configure NRPE on clients (optional)
* configure firewall (optional)
* configure selinux policies (optional)

View File

@@ -65,11 +65,14 @@
| | |-- add_contact_rules.pp
| | |-- add_hostgroup_rules.pp
| | |-- add_hostgroups.pp
| | |-- add_servicegroup_rules.pp
| | |-- add_servicegroups.pp
| | |-- commands.pp
| | |-- config.pp
| | |-- contactgroups.pp
| | |-- contacts.pp
| | |-- hostgroups.pp
| | |-- servicegroups.pp
| | |-- template_rules.pp
| | `-- templates.pp
| |-- selinux
@@ -101,6 +104,8 @@
| | |-- hostgroups_cfg_rule.erb
| | |-- htpasswd_rule.erb
| | |-- nagios_cfg.erb
| | |-- svcgroups_cfg_head.erb
| | |-- svcgroups_cfg_rule.erb
| | |-- templates_cfg_head.erb
| | `-- templates_cfg_rule.erb
| `-- selinux
@@ -116,4 +121,4 @@
|-- README.md
`-- REPOSTRUCTURE.md
20 directories, 96 files
20 directories, 101 files

View File

@@ -123,6 +123,11 @@
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_servicegroup_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_servicegroup_rules (puppet_class)">cd_nagios::nagios::objects::add_servicegroup_rules</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acommands.html" title="puppet_classes::cd_nagios::nagios::objects::commands (puppet_class)">cd_nagios::nagios::objects::commands</a></span>
@@ -148,6 +153,11 @@
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aservicegroups.html" title="puppet_classes::cd_nagios::nagios::objects::servicegroups (puppet_class)">cd_nagios::nagios::objects::servicegroups</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html" title="puppet_classes::cd_nagios::nagios::objects::template_rules (puppet_class)">cd_nagios::nagios::objects::template_rules</a></span>
@@ -208,6 +218,11 @@
</li>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_servicegroups.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_servicegroups (puppet_defined_type)">cd_nagios::nagios::objects::add_servicegroups</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html" title="puppet_defined_types::cd_nagios::nagios::objects::templates (puppet_defined_type)">cd_nagios::nagios::objects::templates</a></span>
@@ -246,7 +261,7 @@
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:11 2017 by
Generated on Thu Jul 27 15:22:36 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>

View File

@@ -161,15 +161,18 @@ the module code.
* manage Nagios main hostgroups through Puppet exports.
Additional host groups can be created through external Puppet rules via
define, to avoid having to alter the module code.
* configure NRPE on
clients (optional)
* configure firewall (optional)
* configure selinux
policies (optional)
* configure forwarding http to https including accesing
the /nagios url directly (optional)
* manage TLS certificates through
certbot (optional)</p>
* manage Nagios main
servicegroups through Puppet exports. Additional service groups can be
created through external Puppet rules via define, to avoid having to alter
the module code.
* configure NRPE on clients (optional)
* configure
firewall (optional)
* configure selinux policies (optional)
* configure
forwarding http to https including accesing the /nagios url directly
(optional)
* manage TLS certificates through certbot (optional)</p>
<p>Service
* manage Nagios service on server
@@ -369,7 +372,7 @@ environments.</p>
</div></div>
<div id="footer">
Generated on Thu Jul 27 14:47:13 2017 by
Generated on Thu Jul 27 15:22:38 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>

View File

@@ -161,15 +161,18 @@ the module code.
* manage Nagios main hostgroups through Puppet exports.
Additional host groups can be created through external Puppet rules via
define, to avoid having to alter the module code.
* configure NRPE on
clients (optional)
* configure firewall (optional)
* configure selinux
policies (optional)
* configure forwarding http to https including accesing
the /nagios url directly (optional)
* manage TLS certificates through
certbot (optional)</p>
* manage Nagios main
servicegroups through Puppet exports. Additional service groups can be
created through external Puppet rules via define, to avoid having to alter
the module code.
* configure NRPE on clients (optional)
* configure
firewall (optional)
* configure selinux policies (optional)
* configure
forwarding http to https including accesing the /nagios url directly
(optional)
* manage TLS certificates through certbot (optional)</p>
<p>Service
* manage Nagios service on server
@@ -369,7 +372,7 @@ environments.</p>
</div></div>
<div id="footer">
Generated on Thu Jul 27 14:47:12 2017 by
Generated on Thu Jul 27 15:22:37 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>

View File

@@ -117,41 +117,55 @@
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::commands" class="even">
<li id="object_puppet_classes::cd_nagios::nagios::objects::add_servicegroup_rules" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_servicegroup_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_servicegroup_rules (puppet_class)">cd_nagios::nagios::objects::add_servicegroup_rules</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::commands" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acommands.html" title="puppet_classes::cd_nagios::nagios::objects::commands (puppet_class)">cd_nagios::nagios::objects::commands</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::config" class="odd">
<li id="object_puppet_classes::cd_nagios::nagios::objects::config" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aconfig.html" title="puppet_classes::cd_nagios::nagios::objects::config (puppet_class)">cd_nagios::nagios::objects::config</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::contactgroups" class="even">
<li id="object_puppet_classes::cd_nagios::nagios::objects::contactgroups" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/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>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::contacts" class="odd">
<li id="object_puppet_classes::cd_nagios::nagios::objects::contacts" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acontacts.html" title="puppet_classes::cd_nagios::nagios::objects::contacts (puppet_class)">cd_nagios::nagios::objects::contacts</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::hostgroups" class="even">
<li id="object_puppet_classes::cd_nagios::nagios::objects::hostgroups" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/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>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::servicegroups" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aservicegroups.html" title="puppet_classes::cd_nagios::nagios::objects::servicegroups (puppet_class)">cd_nagios::nagios::objects::servicegroups</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::template_rules" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html" title="puppet_classes::cd_nagios::nagios::objects::template_rules (puppet_class)">cd_nagios::nagios::objects::template_rules</a></span>

View File

@@ -139,7 +139,7 @@ class cd_nagios {
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:13 2017 by
Generated on Thu Jul 27 15:22:38 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>

View File

@@ -230,7 +230,7 @@ class cd_nagios::certbot::certs (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:18 2017 by
Generated on Thu Jul 27 15:22:42 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>

View File

@@ -368,7 +368,7 @@ class cd_nagios::client::target (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:19 2017 by
Generated on Thu Jul 27 15:22:42 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>

View File

@@ -207,7 +207,7 @@ class cd_nagios::firewall::iptables (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:19 2017 by
Generated on Thu Jul 27 15:22:42 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>

View File

@@ -195,7 +195,7 @@ class cd_nagios::main::config (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:18 2017 by
Generated on Thu Jul 27 15:22:42 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>

View File

@@ -468,7 +468,7 @@ class cd_nagios::main::dirs (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:18 2017 by
Generated on Thu Jul 27 15:22:42 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>

View File

@@ -235,7 +235,7 @@ class cd_nagios::main::install (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:18 2017 by
Generated on Thu Jul 27 15:22:42 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>

View File

@@ -200,7 +200,7 @@ class cd_nagios::main::user (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:18 2017 by
Generated on Thu Jul 27 15:22:42 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>

View File

@@ -210,7 +210,7 @@ class cd_nagios::nagios::objects::add_contact_rules (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:20 2017 by
Generated on Thu Jul 27 15:22:43 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>

View File

@@ -172,13 +172,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
57
58
59
60
61
62
63
64
65
66</pre>
60</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_contactgroups_rules.pp', line 30</span>
@@ -212,12 +206,6 @@ class cd_nagios::nagios::objects::add_contactgroups_rules (
content =&gt; template($ng_cntctgrps_head_erb),
order =&gt; &#39;000&#39;,
}
cd_nagios::nagios::objects::add_contactgroups { &#39;example_group&#39;:
ng_contactgroup_name =&gt; &#39;example_group&#39;,
ng_contactgroup_alias =&gt; &#39;Example Group&#39;,
ng_contactgroup_register =&gt; &#39;1&#39;,
}
}
}</pre>
</td>
@@ -227,7 +215,7 @@ class cd_nagios::nagios::objects::add_contactgroups_rules (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:20 2017 by
Generated on Thu Jul 27 15:22:44 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>

View File

@@ -171,12 +171,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
56
57
58
59
60
61
62
63
64</pre>
59</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_hostgroup_rules.pp', line 29</span>
@@ -210,11 +205,6 @@ class cd_nagios::nagios::objects::add_hostgroup_rules (
content =&gt; template($ng_tgt_hostgrp_head_erb),
order =&gt; &#39;000&#39;,
}
cd_nagios::nagios::objects::add_hostgroups { &#39;example_hostgroup&#39;:
ng_hostgroup_name =&gt; &#39;example_hostgroup&#39;,
ng_hostgroup_alias =&gt; &#39;Example Hostgroup&#39;,
}
}
}</pre>
</td>
@@ -224,7 +214,7 @@ class cd_nagios::nagios::objects::add_hostgroup_rules (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:20 2017 by
Generated on Thu Jul 27 15:22:43 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>

View File

@@ -0,0 +1,234 @@
<!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::objects::add_servicegroup_rules
&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_nagios::nagios::objects::add_servicegroup_rules";
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_nagios::nagios::objects::add_servicegroup_rules</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::objects::add_servicegroup_rules</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/objects/add_servicegroup_rules.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages /etc/nagios_conf.d/nagios_servicegroups_add.cfg and
additional servicegroups through external Puppet rules via define.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_servicegroup_rules.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>
<pre class="example code"><code>cd_nagios::nagios::objects::add_servicegroups { &#39;example_servicegroup&#39;:
ng_servicegroup_name =&gt; &#39;example_servicegroup&#39;,
ng_servicegroup_alias =&gt; &#39;Example Servicegroup&#39;,
}</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_servicegroup_rules.pp', line 29</span>
class cd_nagios::nagios::objects::add_servicegroup_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios_conf.d/nagios_servicegroups_add.cfg
concat { $ng_tgt_servicegroup_add:
ensure =&gt; present,
path =&gt; $ng_tgt_servicegroup_add,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
notify =&gt; Service[$ng_service],
}
# manage file header
concat::fragment { &#39;servicegroups_header&#39;:
target =&gt; $ng_tgt_servicegroup_add,
content =&gt; template($ng_tgt_svcgrp_head_erb),
order =&gt; &#39;000&#39;,
}
cd_nagios::nagios::objects::add_servicegroups { &#39;example_servicegroup&#39;:
ng_servicegroup_name =&gt; &#39;example_servicegroup&#39;,
ng_servicegroup_alias =&gt; &#39;Example Servicegroup&#39;,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 27 15:22:43 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

@@ -595,7 +595,7 @@ class cd_nagios::nagios::objects::commands (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:19 2017 by
Generated on Thu Jul 27 15:22:43 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>

View File

@@ -145,7 +145,8 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
36
37
38
39</pre>
39
40</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/config.pp', line 23</span>
@@ -164,7 +165,8 @@ class cd_nagios::nagios::objects::config (
require cd_nagios::nagios::objects::add_contactgroups_rules
require cd_nagios::nagios::objects::hostgroups
require cd_nagios::nagios::objects::add_hostgroup_rules
require cd_nagios::nagios::objects::servicegroups
require cd_nagios::nagios::objects::add_servicegroup_rules
}
}</pre>
</td>
@@ -174,7 +176,7 @@ class cd_nagios::nagios::objects::config (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:19 2017 by
Generated on Thu Jul 27 15:22:43 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>

View File

@@ -237,7 +237,7 @@ class cd_nagios::nagios::objects::contactgroups (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:19 2017 by
Generated on Thu Jul 27 15:22:43 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>

View File

@@ -280,7 +280,7 @@ class cd_nagios::nagios::objects::contacts (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:19 2017 by
Generated on Thu Jul 27 15:22:43 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>

View File

@@ -551,7 +551,7 @@ class cd_nagios::nagios::objects::hostgroups (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:19 2017 by
Generated on Thu Jul 27 15:22:43 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>

View File

@@ -0,0 +1,245 @@
<!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::objects::servicegroups
&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_nagios::nagios::objects::servicegroups";
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_nagios::nagios::objects::servicegroups</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::objects::servicegroups</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/objects/servicegroups.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages basic hostgroups known to NAGIOS through Puppet
exports, and populates /etc/nagios/conf.d/nagios_base_hostgroups.cfg.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::servicegroups.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><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
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
63
64
65
66
67
68
69
70</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/servicegroups.pp', line 24</span>
class cd_nagios::nagios::objects::servicegroups (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# network services
@@nagios_servicegroup { &#39;network-services&#39;:
ensure =&gt; present,
servicegroup_name =&gt; &#39;network-services&#39;,
alias =&gt; &#39;Network Services&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_svcgrp_base,
}
# linux services
@@nagios_servicegroup { &#39;linux-services&#39;:
ensure =&gt; present,
servicegroup_name =&gt; &#39;linux-services&#39;,
alias =&gt; &#39;Linux Services&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_svcgrp_base,
}
# database services
@@nagios_servicegroup { &#39;database-services&#39;:
ensure =&gt; present,
servicegroup_name =&gt; &#39;database-services&#39;,
alias =&gt; &#39;Database Services&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_svcgrp_base,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 27 15:22:43 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

@@ -305,7 +305,7 @@ class cd_nagios::nagios::objects::template_rules (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:20 2017 by
Generated on Thu Jul 27 15:22:43 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>

View File

@@ -97,12 +97,16 @@
<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/>
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aservicegroups.html" title="puppet_classes::cd_nagios::nagios::objects::servicegroups (puppet_class)">cd_nagios::nagios::objects::servicegroups</a></span><br/>
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html" title="puppet_classes::cd_nagios::nagios::objects::template_rules (puppet_class)">cd_nagios::nagios::objects::template_rules</a></span><br/>
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_contact_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_contact_rules (puppet_class)">cd_nagios::nagios::objects::add_contact_rules</a></span><br/>
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_hostgroup_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_hostgroup_rules (puppet_class)">cd_nagios::nagios::objects::add_hostgroup_rules</a></span><br/>
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_servicegroup_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_servicegroup_rules (puppet_class)">cd_nagios::nagios::objects::add_servicegroup_rules</a></span><br/>
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_contactgroups_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_contactgroups_rules (puppet_class)">cd_nagios::nagios::objects::add_contactgroups_rules</a></span><br/>
</dd>
@@ -4865,6 +4869,19 @@ up</p>
</li>
<li>
<span class='name'>ng_nagios_service_cmd</span>
<span class='type'>(<tt>Any</tt>)</span>
<em class="default">(defaults to: <tt>&#39;check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios&#39;</tt>)</em>
</li>
</ul>
@@ -5228,7 +5245,12 @@ up</p>
989
990
991
992</pre>
992
993
994
995
996
997</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 646</span>
@@ -5482,6 +5504,8 @@ $ng_check_workers = &#39;&#39;,
$ng_host_down_svc_checks = &#39;0&#39;,
$ng_enable_load_ctl_options = false,
$ng_loadctl_options = &#39;jobs_max=100;backoff_limit=10;rampup_change=5&#39;,
$ng_nagios_service_cmd = &#39;check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios&#39;,
) {
# installation section
@@ -5563,9 +5587,12 @@ $ng_target_hostdep = &quot;${ng_conf_d_dir}/nagios_hostdependency.cfg&quo
$ng_target_hostesc = &quot;${ng_conf_d_dir}/nagios_hostescalation.cfg&quot;
$ng_target_hostext = &quot;${ng_conf_d_dir}/nagios_hostextinfo.cfg&quot;
$ng_target_service = &quot;${ng_conf_d_dir}/nagios_service.cfg&quot;
$ng_target_servicegroup = &quot;${ng_conf_d_dir}/nagios_servicegroup.cfg&quot;
$ng_target_base_contact = &quot;${ng_conf_d_dir}/nagios_base_contact.cfg&quot;
$ng_target_add_contact = &quot;${ng_conf_d_dir}/nagios_add_contact.cfg&quot;
$ng_target_svcgrp_base = &quot;${ng_conf_d_dir}/nagios_servicegroups_base.cfg&quot;
$ng_tgt_servicegroup_add = &quot;${ng_conf_d_dir}/nagios_servicegroups_add.cfg&quot;
$ng_tgt_svcgrp_head_erb = &#39;cd_nagios/nagios/svcgroups_cfg_head.erb&#39;
$ng_tgt_hostgrp_rule_erb = &#39;cd_nagios/nagios/svcgroups_cfg_rule.erb&#39;
$ng_target_base_contact = &quot;${ng_conf_d_dir}/nagios_contact_base.cfg&quot;
$ng_target_add_contact = &quot;${ng_conf_d_dir}/nagios_contact_add.cfg&quot;
$ng_contacts_head_erb = &#39;cd_nagios/nagios/contacts_cfg_head.erb&#39;
$ng_contacts_rule_erb = &#39;cd_nagios/nagios/contacts_cfg_rule.erb&#39;
$ng_tgt_contactgroup_base = &quot;${ng_conf_d_dir}/nagios_contactgroup_base.cfg&quot;
@@ -5587,7 +5614,7 @@ $ng_target_command = &quot;${ng_conf_d_dir}/nagios_commands_base.cfg&quot
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:18 2017 by
Generated on Thu Jul 27 15:22:41 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>

View File

@@ -249,7 +249,7 @@ class cd_nagios::selinux::config (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:19 2017 by
Generated on Thu Jul 27 15:22:42 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>

View File

@@ -195,7 +195,7 @@ class cd_nagios::server::access_rules (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:19 2017 by
Generated on Thu Jul 27 15:22:42 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>

View File

@@ -334,7 +334,7 @@ class cd_nagios::server::files (
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:18 2017 by
Generated on Thu Jul 27 15:22:42 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>

View File

@@ -61,14 +61,21 @@
</li>
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::templates" class="even">
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::add_servicegroups" class="even">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_servicegroups.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_servicegroups (puppet_defined_type)">cd_nagios::nagios::objects::add_servicegroups</a></span>
</div>
</li>
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::templates" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html" title="puppet_defined_types::cd_nagios::nagios::objects::templates (puppet_defined_type)">cd_nagios::nagios::objects::templates</a></span>
</div>
</li>
<li id="object_puppet_defined_types::cd_nagios::server::access" class="odd">
<li id="object_puppet_defined_types::cd_nagios::server::access" class="even">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html" title="puppet_defined_types::cd_nagios::server::access (puppet_defined_type)">cd_nagios::server::access</a></span>
</div>

View File

@@ -260,7 +260,7 @@ $ng_contacts_rule_erb = $::cd_nagios::params::ng_contacts_rule_erb
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:21 2017 by
Generated on Thu Jul 27 15:22:44 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>

View File

@@ -237,7 +237,7 @@ $ng_cntctgrps_rule_erb = $::cd_nagios::params::ng_cntctgrps_rule_erb
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:21 2017 by
Generated on Thu Jul 27 15:22:44 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>

View File

@@ -230,7 +230,7 @@ $ng_tgt_hostgrp_rule_erb = $::cd_nagios::params::ng_tgt_hostgrp_rule_erb
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:21 2017 by
Generated on Thu Jul 27 15:22:44 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>

View File

@@ -0,0 +1,238 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Defined Type: cd_nagios::nagios::objects::add_servicegroups
&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_defined_types::cd_nagios::nagios::objects::add_servicegroups";
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_defined_type_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'>Defined Types</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::add_servicegroups</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>Defined Type: cd_nagios::nagios::objects::add_servicegroups</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_servicegroups.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
define populates /etc/nagios/conf.d/nagios_servicegroups_add through
extermal Puppet rules.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_servicegroups.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>
<pre class="example code"><code>cd_nagios::nagios::objects::add_servicegroups { &#39;example_servicegroup&#39;:
ng_servicegroup_name =&gt; &#39;example_servicegroup&#39;,
ng_servicegroup_alias =&gt; &#39;Example servicegroup&#39;,
}</code></pre>
</div>
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ng_servicegroup_name</span>
<span class='type'>(<tt>Any</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
</li>
<li>
<span class='name'>ng_servicegroup_alias</span>
<span class='type'>(<tt>Any</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
</li>
<li>
<span class='name'>ng_servicegroup_register</span>
<span class='type'>(<tt>Any</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_servicegroups.pp', line 29</span>
define cd_nagios::nagios::objects::add_servicegroups (
$ng_servicegroup_name = undef,
$ng_servicegroup_alias = undef,
$ng_servicegroup_register = &#39;1&#39;,
) {
$ng_nagios_server = $::cd_nagios::params::ng_nagios_server
$ng_tgt_servicegroup_add = $::cd_nagios::params::ng_tgt_servicegroup_add
$ng_tgt_svcgrp_rule_erb = $::cd_nagios::params::ng_tgt_svcgrp_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target =&gt; $ng_tgt_servicegroup_add,
content =&gt; template($ng_tgt_svcgrp_rule_erb),
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 27 15:22:45 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

@@ -935,7 +935,7 @@ $ng_templates_rule_erb = $::cd_nagios::params::ng_templates_rule_erb
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:21 2017 by
Generated on Thu Jul 27 15:22:44 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>

View File

@@ -220,7 +220,7 @@ $ng_service = $::cd_nagios::params::ng_service
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:20 2017 by
Generated on Thu Jul 27 15:22:44 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>

View File

@@ -90,7 +90,7 @@
</div>
<div id="footer">
Generated on Thu Jul 27 14:47:13 2017 by
Generated on Thu Jul 27 15:22:38 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>

View File

@@ -56,11 +56,5 @@ class cd_nagios::nagios::objects::add_contactgroups_rules (
content => template($ng_cntctgrps_head_erb),
order => '000',
}
cd_nagios::nagios::objects::add_contactgroups { 'example_group':
ng_contactgroup_name => 'example_group',
ng_contactgroup_alias => 'Example Group',
ng_contactgroup_register => '1',
}
}
}

View File

@@ -55,10 +55,5 @@ class cd_nagios::nagios::objects::add_hostgroup_rules (
content => template($ng_tgt_hostgrp_head_erb),
order => '000',
}
cd_nagios::nagios::objects::add_hostgroups { 'example_hostgroup':
ng_hostgroup_name => 'example_hostgroup',
ng_hostgroup_alias => 'Example Hostgroup',
}
}
}

View File

@@ -0,0 +1,64 @@
## cd_nagios::nagios::objects::add_servicegroup_rules.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# 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.
#
# 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 Class manages /etc/nagios_conf.d/nagios_servicegroups_add.cfg and
# additional servicegroups through external Puppet rules via define.
# @example
# cd_nagios::nagios::objects::add_servicegroups { 'example_servicegroup':
# ng_servicegroup_name => 'example_servicegroup',
# ng_servicegroup_alias => 'Example Servicegroup',
# }
################################################################################
class cd_nagios::nagios::objects::add_servicegroup_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios_conf.d/nagios_servicegroups_add.cfg
concat { $ng_tgt_servicegroup_add:
ensure => present,
path => $ng_tgt_servicegroup_add,
owner => $ng_user,
group => $ng_user,
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
notify => Service[$ng_service],
}
# manage file header
concat::fragment { 'servicegroups_header':
target => $ng_tgt_servicegroup_add,
content => template($ng_tgt_svcgrp_head_erb),
order => '000',
}
cd_nagios::nagios::objects::add_servicegroups { 'example_servicegroup':
ng_servicegroup_name => 'example_servicegroup',
ng_servicegroup_alias => 'Example Servicegroup',
}
}
}

View File

@@ -0,0 +1,48 @@
## cd_nagios::nagios::objects::add_servicegroups.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# 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.
#
# 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 define populates /etc/nagios/conf.d/nagios_servicegroups_add through
# extermal Puppet rules.
# @example
# cd_nagios::nagios::objects::add_servicegroups { 'example_servicegroup':
# ng_servicegroup_name => 'example_servicegroup',
# ng_servicegroup_alias => 'Example servicegroup',
# }
###############################################################################
define cd_nagios::nagios::objects::add_servicegroups (
$ng_servicegroup_name = undef,
$ng_servicegroup_alias = undef,
$ng_servicegroup_register = '1',
) {
$ng_nagios_server = $::cd_nagios::params::ng_nagios_server
$ng_tgt_servicegroup_add = $::cd_nagios::params::ng_tgt_servicegroup_add
$ng_tgt_svcgrp_rule_erb = $::cd_nagios::params::ng_tgt_svcgrp_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target => $ng_tgt_servicegroup_add,
content => template($ng_tgt_svcgrp_rule_erb),
}
}
}

View File

@@ -34,6 +34,7 @@ class cd_nagios::nagios::objects::config (
require cd_nagios::nagios::objects::add_contactgroups_rules
require cd_nagios::nagios::objects::hostgroups
require cd_nagios::nagios::objects::add_hostgroup_rules
require cd_nagios::nagios::objects::servicegroups
require cd_nagios::nagios::objects::add_servicegroup_rules
}
}

View File

@@ -0,0 +1,70 @@
## cd_nagios::nagios::objects::servicegroups.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# 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.
#
# 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 Class manages basic hostgroups known to NAGIOS through Puppet
# exports, and populates /etc/nagios/conf.d/nagios_base_hostgroups.cfg.
################################################################################
class cd_nagios::nagios::objects::servicegroups (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# network services
@@nagios_servicegroup { 'network-services':
ensure => present,
servicegroup_name => 'network-services',
alias => 'Network Services',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_svcgrp_base,
}
# linux services
@@nagios_servicegroup { 'linux-services':
ensure => present,
servicegroup_name => 'linux-services',
alias => 'Linux Services',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_svcgrp_base,
}
# database services
@@nagios_servicegroup { 'database-services':
ensure => present,
servicegroup_name => 'database-services',
alias => 'Database Services',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_svcgrp_base,
}
}
}

View File

@@ -892,6 +892,8 @@ $ng_check_workers = '',
$ng_host_down_svc_checks = '0',
$ng_enable_load_ctl_options = false,
$ng_loadctl_options = 'jobs_max=100;backoff_limit=10;rampup_change=5',
$ng_nagios_service_cmd = 'check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios',
) {
# installation section
@@ -973,9 +975,12 @@ $ng_target_hostdep = "${ng_conf_d_dir}/nagios_hostdependency.cfg"
$ng_target_hostesc = "${ng_conf_d_dir}/nagios_hostescalation.cfg"
$ng_target_hostext = "${ng_conf_d_dir}/nagios_hostextinfo.cfg"
$ng_target_service = "${ng_conf_d_dir}/nagios_service.cfg"
$ng_target_servicegroup = "${ng_conf_d_dir}/nagios_servicegroup.cfg"
$ng_target_base_contact = "${ng_conf_d_dir}/nagios_base_contact.cfg"
$ng_target_add_contact = "${ng_conf_d_dir}/nagios_add_contact.cfg"
$ng_target_svcgrp_base = "${ng_conf_d_dir}/nagios_servicegroups_base.cfg"
$ng_tgt_servicegroup_add = "${ng_conf_d_dir}/nagios_servicegroups_add.cfg"
$ng_tgt_svcgrp_head_erb = 'cd_nagios/nagios/svcgroups_cfg_head.erb'
$ng_tgt_hostgrp_rule_erb = 'cd_nagios/nagios/svcgroups_cfg_rule.erb'
$ng_target_base_contact = "${ng_conf_d_dir}/nagios_contact_base.cfg"
$ng_target_add_contact = "${ng_conf_d_dir}/nagios_contact_add.cfg"
$ng_contacts_head_erb = 'cd_nagios/nagios/contacts_cfg_head.erb'
$ng_contacts_rule_erb = 'cd_nagios/nagios/contacts_cfg_rule.erb'
$ng_tgt_contactgroup_base = "${ng_conf_d_dir}/nagios_contactgroup_base.cfg"

View File

@@ -54,13 +54,13 @@ class cd_nagios::server::service (
notify => Service ['nagios'],
}
@@nagios_service { "check_nagios_localhost":
check_command => 'check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios',
@@nagios_service { 'check_nagios_localhost':
check_command => $ng_nagios_service_cmd,
use => 'generic-service',
host_name => 'localhost',
notification_period => '24x7',
service_description => 'localhost_nagios_service',
target => $ng_target_service,
service_description => 'localhost_nagios_service',
target => $ng_target_service,
owner => $ng_user,
group => $ng_user,
mode => '0640',

View File

@@ -0,0 +1,5 @@
###############################################################################
########## nagios_servicegroups_add.cfg created by Puppet ##########
########## manual changes are overwritten! ##########
###############################################################################
# rules are created below by external puppet rules.

View File

@@ -0,0 +1,6 @@
define servicegroup {
servicegroup_name <%= @ng_servicegroup_name %>
alias <%= @ng_servicegroup_alias %>
register <%= @ng_servicegroup_register %>
}