Merge branch 'jenkins' into 'master'

Jenkins

See merge request !68
This commit is contained in:
12ww1160
2017-07-27 16:28:00 +02:00
50 changed files with 1769 additions and 465 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/cba65ddb7cb64cf">cba65ddb7cb64cf</a> Jenkins Server <i>2017-07-27 13:33:36</i>
<p>
<h3>recommit for updates in build 117</h3>
</p>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/645cb4255af90d5">645cb4255af90d5</a> Arne Teuke <i>2017-07-27 13:33:00</i>
<p>
<h3>added parameter documentation</h3>
</p>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/83782a592f1fe78">83782a592f1fe78</a> Jenkins Server <i>2017-07-27 13:22:48</i>
<p>
<h3>recommit for updates in build 116</h3>

View File

@@ -53,6 +53,7 @@ Configuration
* 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.
* manage Nagios main timeperiods through Puppet exports. Additional timeperiods 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

@@ -70,6 +70,8 @@
| | |-- add_hostgroups.pp
| | |-- add_servicegroup_rules.pp
| | |-- add_servicegroups.pp
| | |-- add_timeperiod_rules.pp
| | |-- add_timeperiods.pp
| | |-- commands.pp
| | |-- config.pp
| | |-- contactgroups.pp
@@ -77,7 +79,8 @@
| | |-- hostgroups.pp
| | |-- servicegroups.pp
| | |-- template_rules.pp
| | `-- templates.pp
| | |-- templates.pp
| | `-- timeperiods.pp
| |-- selinux
| | `-- config.pp
| |-- server
@@ -110,7 +113,9 @@
| | |-- svcgroups_cfg_head.erb
| | |-- svcgroups_cfg_rule.erb
| | |-- templates_cfg_head.erb
| | `-- templates_cfg_rule.erb
| | |-- templates_cfg_rule.erb
| | |-- timeperiods_cfg_head.erb
| | `-- timeperiods_cfg_rule.erb
| `-- selinux
| |-- statuscgi.erb
| `-- taccgi.erb
@@ -124,4 +129,4 @@
|-- README.md
`-- REPOSTRUCTURE.md
20 directories, 104 files
20 directories, 109 files

View File

@@ -128,6 +128,11 @@
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_timeperiod_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_timeperiod_rules (puppet_class)">cd_nagios::nagios::objects::add_timeperiod_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>
@@ -163,6 +168,11 @@
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atimeperiods.html" title="puppet_classes::cd_nagios::nagios::objects::timeperiods (puppet_class)">cd_nagios::nagios::objects::timeperiods</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span>
@@ -228,6 +238,11 @@
</li>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_timeperiods.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_timeperiods (puppet_defined_type)">cd_nagios::nagios::objects::add_timeperiods</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>
@@ -266,7 +281,7 @@
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:24 2017 by
Generated on Thu Jul 27 16:28:52 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

@@ -165,14 +165,18 @@ define, to avoid having to alter the module code.
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>
* manage Nagios main timeperiods through Puppet exports.
Additional timeperiods 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
@@ -372,7 +376,7 @@ environments.</p>
</div></div>
<div id="footer">
Generated on Thu Jul 27 15:33:25 2017 by
Generated on Thu Jul 27 16:28:54 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -165,14 +165,18 @@ define, to avoid having to alter the module code.
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>
* manage Nagios main timeperiods through Puppet exports.
Additional timeperiods 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
@@ -372,7 +376,7 @@ environments.</p>
</div></div>
<div id="footer">
Generated on Thu Jul 27 15:33:25 2017 by
Generated on Thu Jul 27 16:28:53 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

@@ -124,55 +124,69 @@
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::commands" class="odd">
<li id="object_puppet_classes::cd_nagios::nagios::objects::add_timeperiod_rules" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_timeperiod_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_timeperiod_rules (puppet_class)">cd_nagios::nagios::objects::add_timeperiod_rules</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::commands" class="even">
<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="even">
<li id="object_puppet_classes::cd_nagios::nagios::objects::config" class="odd">
<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="odd">
<li id="object_puppet_classes::cd_nagios::nagios::objects::contactgroups" class="even">
<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="even">
<li id="object_puppet_classes::cd_nagios::nagios::objects::contacts" class="odd">
<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="odd">
<li id="object_puppet_classes::cd_nagios::nagios::objects::hostgroups" class="even">
<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">
<li id="object_puppet_classes::cd_nagios::nagios::objects::servicegroups" class="odd">
<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">
<li id="object_puppet_classes::cd_nagios::nagios::objects::template_rules" class="even">
<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>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::timeperiods" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atimeperiods.html" title="puppet_classes::cd_nagios::nagios::objects::timeperiods (puppet_class)">cd_nagios::nagios::objects::timeperiods</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::params" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span>

View File

@@ -139,7 +139,7 @@ class cd_nagios {
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:25 2017 by
Generated on Thu Jul 27 16:28:54 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -230,7 +230,7 @@ class cd_nagios::certbot::certs (
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:30 2017 by
Generated on Thu Jul 27 16:28:59 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 15:33:30 2017 by
Generated on Thu Jul 27 16:28:59 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 15:33:30 2017 by
Generated on Thu Jul 27 16:28:59 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 15:33:29 2017 by
Generated on Thu Jul 27 16:28:58 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 15:33:29 2017 by
Generated on Thu Jul 27 16:28:58 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 15:33:29 2017 by
Generated on Thu Jul 27 16:28:58 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 15:33:29 2017 by
Generated on Thu Jul 27 16:28:58 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 15:33:31 2017 by
Generated on Thu Jul 27 16:29:00 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

@@ -215,7 +215,7 @@ class cd_nagios::nagios::objects::add_contactgroups_rules (
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:31 2017 by
Generated on Thu Jul 27 16:29:01 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

@@ -214,7 +214,7 @@ class cd_nagios::nagios::objects::add_hostgroup_rules (
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:31 2017 by
Generated on Thu Jul 27 16:29:00 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

@@ -224,7 +224,7 @@ class cd_nagios::nagios::objects::add_servicegroup_rules (
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:31 2017 by
Generated on Thu Jul 27 16:29:01 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,248 @@
<!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_timeperiod_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_timeperiod_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_timeperiod_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_timeperiod_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_timeperiod_rules.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages /etc/nagios/conf.d/nagios_timeperiods_add.cfg. incl.
additional timeperiods via define.
cd_nagios::nagios::objects::add_timeperiods { 'example_timeperiod':
ng_timeperiod_name => 'example_timeperiod',
ng_timeperiod_alias => 'Example timeperiod',
ng_timep_monday => '00:00-00:00',
ng_timep_tuesday => '00:00-00:00',
ng_timep_wednesday => '00:00-00:00',
ng_timep_thursday => '00:00-00:00',
ng_timep_friday => '00:00-00:00',
ng_timep_saturday => '00:00-00:00',
ng_timep_sunday => '00:00-00:00',
}
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_timeperiod_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><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
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
71
72
73
74
75
76
77</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_timeperiod_rules.pp', line 35</span>
class cd_nagios::nagios::objects::add_timeperiod_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios/conf.d/nagios_timeperiods_add.cfg
concat { $ng_tgt_timeperiods_add:
ensure =&gt; present,
path =&gt; $ng_tgt_timeperiods_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;timeperiods_header&#39;:
target =&gt; $ng_tgt_timeperiods_add,
content =&gt; template($ng_tgt_timep_head_erb),
order =&gt; &#39;000&#39;,
}
# example rule
cd_nagios::nagios::objects::add_timeperiods { &#39;example_timeperiod&#39;:
ng_timeperiod_name =&gt; &#39;example_timeperiod&#39;,
ng_timeperiod_alias =&gt; &#39;Example timeperiod&#39;,
ng_timep_monday =&gt; &#39;00:00-00:00&#39;,
ng_timep_tuesday =&gt; &#39;00:00-00:00&#39;,
ng_timep_wednesday =&gt; &#39;00:00-00:00&#39;,
ng_timep_thursday =&gt; &#39;00:00-00:00&#39;,
ng_timep_friday =&gt; &#39;00:00-00:00&#39;,
ng_timep_saturday =&gt; &#39;00:00-00:00&#39;,
ng_timep_sunday =&gt; &#39;00:00-00:00&#39;,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 27 16:29:00 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

@@ -356,7 +356,8 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
247
248
249
250</pre>
250
251</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/commands.pp', line 24</span>
@@ -365,227 +366,228 @@ class cd_nagios::nagios::objects::commands (
) inherits cd_nagios::params {
require cd_nagios::main::install
if $::fqdn == $ng_nagios_server {
@@nagios_command { &#39;notify-host-by-email&#39;:
ensure =&gt; present,
command_name =&gt; &#39;notify-host-by-email&#39;,
command_line =&gt; &#39;/usr/bin/printf &quot;%b&quot; &quot;***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTADDRESS$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n&quot; | /bin/mail -s &quot;** $NOTIFICATIONTYPE$ Host Alert: $HOSTADDRESS$ is $HOSTSTATE$ **&quot; $CONTACTEMAIL$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;notify-host-by-email&#39;:
ensure =&gt; present,
command_name =&gt; &#39;notify-host-by-email&#39;,
command_line =&gt; &#39;/usr/bin/printf &quot;%b&quot; &quot;***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTADDRESS$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n&quot; | /bin/mail -s &quot;** $NOTIFICATIONTYPE$ Host Alert: $HOSTADDRESS$ is $HOSTSTATE$ **&quot; $CONTACTEMAIL$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;notify-service-by-email&#39;:
ensure =&gt; present,
command_name =&gt; &#39;notify-service-by-email&#39;,
command_line =&gt; &#39;/usr/bin/printf &quot;%b&quot; &quot;***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n&quot; | /bin/mail -s &quot;** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **&quot; $CONTACTEMAIL$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;notify-service-by-email&#39;:
ensure =&gt; present,
command_name =&gt; &#39;notify-service-by-email&#39;,
command_line =&gt; &#39;/usr/bin/printf &quot;%b&quot; &quot;***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n&quot; | /bin/mail -s &quot;** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **&quot; $CONTACTEMAIL$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check-host-alive&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check-host-alive&#39;,
command_line =&gt; &#39;$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check-host-alive&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check-host-alive&#39;,
command_line =&gt; &#39;$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_disk&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_disk&#39;,
command_line =&gt; &#39;$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_disk&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_disk&#39;,
command_line =&gt; &#39;$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_load&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_load&#39;,
command_line =&gt; &#39;$USER1$/check_load -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_load&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_load&#39;,
command_line =&gt; &#39;$USER1$/check_load -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_procs&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_procs&#39;,
command_line =&gt; &#39;$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_procs&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_procs&#39;,
command_line =&gt; &#39;$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_users&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_users&#39;,
command_line =&gt; &#39;$USER1$/check_users -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_users&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_users&#39;,
command_line =&gt; &#39;$USER1$/check_users -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_swap&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_swap&#39;,
command_line =&gt; &#39;$USER1$/check_swap -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_swap&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_swap&#39;,
command_line =&gt; &#39;$USER1$/check_swap -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_ftp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ftp&#39;,
command_line =&gt; &#39;$USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_ftp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ftp&#39;,
command_line =&gt; &#39;$USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_snmp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_snmp&#39;,
command_line =&gt; &#39;$USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_snmp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_snmp&#39;,
command_line =&gt; &#39;$USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_http&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_http&#39;,
command_line =&gt; &#39;$USER1$/check_http -I $HOSTADDRESS$ $ARG1$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_http&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_http&#39;,
command_line =&gt; &#39;$USER1$/check_http -I $HOSTADDRESS$ $ARG1$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_ssh&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ssh&#39;,
command_line =&gt; &#39;$USER1$/check_ssh $ARG1$ $HOSTADDRESS$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_ssh&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ssh&#39;,
command_line =&gt; &#39;$USER1$/check_ssh $ARG1$ $HOSTADDRESS$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_ping&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ping&#39;,
command_line =&gt; &#39;$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_ping&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ping&#39;,
command_line =&gt; &#39;$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_tcp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_tcp&#39;,
command_line =&gt; &#39;$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_tcp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_tcp&#39;,
command_line =&gt; &#39;$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_udp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_udp&#39;,
command_line =&gt; &#39;$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_udp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_udp&#39;,
command_line =&gt; &#39;$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_nrpe&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_nrpe&#39;,
command_line =&gt; &#39;$USER1$/check_nrpe -t 30 -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_nrpe&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_nrpe&#39;,
command_line =&gt; &#39;$USER1$/check_nrpe -t 30 -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_nagios&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_nagios&#39;,
command_line =&gt; &#39;$USER1$/check_nagios -F $ARG1$ -e $ARG2$ -C $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_nagios&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_nagios&#39;,
command_line =&gt; &#39;$USER1$/check_nagios -F $ARG1$ -e $ARG2$ -C $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_bandwidth&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_bandwidth&#39;,
command_line =&gt; &#39;$USER1$/check_bandwidth.sh -t 30 -H $HOSTADDRESS$ linux $ARG1$ $ARG2$ $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_bandwidth&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_bandwidth&#39;,
command_line =&gt; &#39;$USER1$/check_bandwidth.sh -t 30 -H $HOSTADDRESS$ linux $ARG1$ $ARG2$ $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_jenkins_api&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_jenkins_api&#39;,
command_line =&gt; &#39;$USER1$/check_http -H $HOSTADDRESS$ -u /api/xml?depth=0 -R quietingDown.false $ARG1$ $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_jenkins_api&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_jenkins_api&#39;,
command_line =&gt; &#39;$USER1$/check_http -H $HOSTADDRESS$ -u /api/xml?depth=0 -R quietingDown.false $ARG1$ $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;process-service-perfdata-file&#39;:
ensure =&gt; present,
command_name =&gt; &#39;process-service-perfdata-file&#39;,
command_line =&gt; &#39;/bin/mv /var/log/pnp4nagios/service-perfdata /var/spool/pnp4nagios/service-perfdata.$TIMET$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;process-service-perfdata-file&#39;:
ensure =&gt; present,
command_name =&gt; &#39;process-service-perfdata-file&#39;,
command_line =&gt; &#39;/bin/mv /var/log/pnp4nagios/service-perfdata /var/spool/pnp4nagios/service-perfdata.$TIMET$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;process-host-perfdata-file&#39;:
ensure =&gt; present,
command_name =&gt; &#39;process-host-perfdata-file&#39;,
command_line =&gt; &#39;/bin/mv /var/log/pnp4nagios/host-perfdata /var/spool/pnp4nagios/host-perfdata.$TIMET$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;process-host-perfdata-file&#39;:
ensure =&gt; present,
command_name =&gt; &#39;process-host-perfdata-file&#39;,
command_line =&gt; &#39;/bin/mv /var/log/pnp4nagios/host-perfdata /var/spool/pnp4nagios/host-perfdata.$TIMET$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_ntp_time&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ntp_time&#39;,
command_line =&gt; &#39;$USER1$/check_ntp_time -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
@@nagios_command { &#39;check_ntp_time&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ntp_time&#39;,
command_line =&gt; &#39;$USER1$/check_ntp_time -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
}
}</pre>
</td>
@@ -595,7 +597,7 @@ class cd_nagios::nagios::objects::commands (
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:30 2017 by
Generated on Thu Jul 27 16:29:00 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

@@ -147,7 +147,8 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
38
39
40
41</pre>
41
42</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/config.pp', line 23</span>
@@ -168,7 +169,8 @@ class cd_nagios::nagios::objects::config (
require cd_nagios::nagios::objects::add_hostgroup_rules
require cd_nagios::nagios::objects::servicegroups
require cd_nagios::nagios::objects::add_servicegroup_rules
require cd_nagios::nagios::objects::timeperiods
require cd_nagios::nagios::objects::add_timeperiod_rules
}
}</pre>
</td>
@@ -178,7 +180,7 @@ class cd_nagios::nagios::objects::config (
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:30 2017 by
Generated on Thu Jul 27 16:28:59 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 15:33:31 2017 by
Generated on Thu Jul 27 16:29:00 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 15:33:30 2017 by
Generated on Thu Jul 27 16:29:00 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 15:33:31 2017 by
Generated on Thu Jul 27 16:29:00 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::nagios::objects::servicegroups (
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:31 2017 by
Generated on Thu Jul 27 16:29:00 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

@@ -305,7 +305,7 @@ class cd_nagios::nagios::objects::template_rules (
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:31 2017 by
Generated on Thu Jul 27 16:29:00 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,295 @@
<!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::timeperiods
&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::timeperiods";
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::timeperiods</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::timeperiods</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/timeperiods.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages main timeperiods for NAGIOS through Puppet exports,
and populates /etc/nagios/conf.d/nagios_timeperiods_base.cfg.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::timeperiods.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/timeperiods.pp', line 24</span>
class cd_nagios::nagios::objects::timeperiods (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
@@nagios_timeperiod { &#39;24x7&#39;:
ensure =&gt; present,
timeperiod_name =&gt; &#39;24x7&#39;,
alias =&gt; &#39;24 Hours A Day, 7 Days A Week&#39;,
monday =&gt; &#39;00:00-24:00&#39;,
tuesday =&gt; &#39;00:00-24:00&#39;,
wednesday =&gt; &#39;00:00-24:00&#39;,
thursday =&gt; &#39;00:00-24:00&#39;,
friday =&gt; &#39;00:00-24:00&#39;,
saturday =&gt; &#39;00:00-24:00&#39;,
sunday =&gt; &#39;00:00-24:00&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { &#39;office_hours&#39;:
ensure =&gt; present,
timeperiod_name =&gt; &#39;office_hours&#39;,
alias =&gt; &#39;Office hours only, 5 Days A Week 09-05&#39;,
monday =&gt; &#39;09:00-17:00&#39;,
tuesday =&gt; &#39;09:00-17:00&#39;,
wednesday =&gt; &#39;09:00-17:00&#39;,
thursday =&gt; &#39;09:00-17:00&#39;,
friday =&gt; &#39;09:00-17:00&#39;,
saturday =&gt; &#39;00:00-00:00&#39;,
sunday =&gt; &#39;00:00-00:00&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { &#39;out_of_hours&#39;:
ensure =&gt; present,
timeperiod_name =&gt; &#39;out_of_hours&#39;,
alias =&gt; &#39;Outside Office hours only&#39;,
monday =&gt; &#39;17:00-09:00&#39;,
tuesday =&gt; &#39;17:00-09:00&#39;,
wednesday =&gt; &#39;17:00-09:00&#39;,
thursday =&gt; &#39;17:00-09:00&#39;,
friday =&gt; &#39;17:00-09:00&#39;,
saturday =&gt; &#39;00:00-24:00&#39;,
sunday =&gt; &#39;00:00-24:00&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { &#39;none&#39;:
ensure =&gt; present,
timeperiod_name =&gt; &#39;none&#39;,
alias =&gt; &#39;No Time Is A Good Time&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_timeperiods_base,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 27 16:29:00 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

@@ -97,6 +97,8 @@
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Ahostgroups.html" title="puppet_classes::cd_nagios::nagios::objects::hostgroups (puppet_class)">cd_nagios::nagios::objects::hostgroups</a></span><br/>
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atimeperiods.html" title="puppet_classes::cd_nagios::nagios::objects::timeperiods (puppet_class)">cd_nagios::nagios::objects::timeperiods</a></span><br/>
<span class='object_link'><a href="cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acontactgroups.html" title="puppet_classes::cd_nagios::nagios::objects::contactgroups (puppet_class)">cd_nagios::nagios::objects::contactgroups</a></span><br/>
<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/>
@@ -107,6 +109,8 @@
<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_timeperiod_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_timeperiod_rules (puppet_class)">cd_nagios::nagios::objects::add_timeperiod_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/>
@@ -5252,7 +5256,10 @@ up</p>
994
995
996
997</pre>
997
998
999
1000</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 646</span>
@@ -5578,7 +5585,10 @@ $ng_certbot_live = &quot;${ng_certbot_main_dir}/live&quot;
$ng_target_templates = &quot;${ng_conf_d_dir}/nagios_templates.cfg&quot;
$ng_templates_head_erb = &#39;cd_nagios/nagios/templates_cfg_head.erb&#39;
$ng_templates_rule_erb = &#39;cd_nagios/nagios/templates_cfg_rule.erb&#39;
$ng_target_timeperiods = &quot;${ng_conf_d_dir}/timeperiods.cfg&quot;
$ng_tgt_timeperiods_base = &quot;${ng_conf_d_dir}/nagios_timeperiods.cfg&quot;
$ng_tgt_timeperiods_add = &quot;${ng_conf_d_dir}/nagios_timeperiods_add.cfg&quot;
$ng_tgt_timep_head_erb = &#39;cd_nagios/nagios/timeperiods_cfg_head.erb&#39;
$ng_tgt_timep_rule_erb = &#39;cd_nagios/nagios/timeperiods_cfg_rule.erb&#39;
$ng_target_localhost = &quot;${ng_conf_d_dir}/nagios_localhost.cfg&quot;
$ng_target_host = &quot;${ng_conf_d_dir}/nagios_host.cfg&quot;
$ng_target_hostgroup_base = &quot;${ng_conf_d_dir}/nagios_hostgroups_base.cfg&quot;
@@ -5616,7 +5626,7 @@ $ng_target_command = &quot;${ng_conf_d_dir}/nagios_commands_base.cfg&quot
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:29 2017 by
Generated on Thu Jul 27 16:28:58 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 15:33:30 2017 by
Generated on Thu Jul 27 16:28:59 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 15:33:30 2017 by
Generated on Thu Jul 27 16:28:59 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 15:33:30 2017 by
Generated on Thu Jul 27 16:28:59 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

@@ -304,7 +304,7 @@ class cd_nagios::server::service (
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:30 2017 by
Generated on Thu Jul 27 16:28:59 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

@@ -68,14 +68,21 @@
</li>
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::templates" class="odd">
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::add_timeperiods" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_timeperiods.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_timeperiods (puppet_defined_type)">cd_nagios::nagios::objects::add_timeperiods</a></span>
</div>
</li>
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::templates" class="even">
<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="even">
<li id="object_puppet_defined_types::cd_nagios::server::access" class="odd">
<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

@@ -285,7 +285,7 @@ $ng_contacts_rule_erb = $::cd_nagios::params::ng_contacts_rule_erb
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:32 2017 by
Generated on Thu Jul 27 16:29:02 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 15:33:32 2017 by
Generated on Thu Jul 27 16:29:02 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 15:33:32 2017 by
Generated on Thu Jul 27 16:29:02 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

@@ -228,7 +228,7 @@ $ng_tgt_svcgrp_rule_erb = $::cd_nagios::params::ng_tgt_svcgrp_rule_erb
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:32 2017 by
Generated on Thu Jul 27 16:29:02 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,418 @@
<!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_timeperiods
&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_timeperiods";
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_timeperiods</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_timeperiods</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_timeperiods.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
define populates /etc/nagios/conf.d/nagios_timeperiods_add through
extermal Puppet rules.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_timeperiods.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_timeperiods { &#39;example_timeperiod&#39;:
ng_timeperiod_name =&gt; &#39;example_timeperiod&#39;,
ng_timeperiod_alias =&gt; &#39;Example timeperiod&#39;,
}</code></pre>
</div>
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ng_timep_name</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the timeperiod short name.</p>
</div>
</li>
<li>
<span class='name'>ng_timep_alias</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the timeperiod alias (long name)</p>
</div>
</li>
<li>
<span class='name'>ng_timep_monday</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Monday</p>
</div>
</li>
<li>
<span class='name'>ng_timep_tuesday</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Tuesday</p>
</div>
</li>
<li>
<span class='name'>ng_timep_wednesday</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Wednesday.</p>
</div>
</li>
<li>
<span class='name'>ng_timep_thursday</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Thursday</p>
</div>
</li>
<li>
<span class='name'>ng_timep_friday</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Friday</p>
</div>
</li>
<li>
<span class='name'>ng_timep_saturday</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Saturday</p>
</div>
</li>
<li>
<span class='name'>ng_timep_sunday</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Sunday.</p>
</div>
</li>
<li>
<span class='name'>ng_timep_special_01</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify a special date as key parameter
for
<code>ng_timep_special_02</code>. See Nagios documentation for format
details.</p>
</div>
</li>
<li>
<span class='name'>ng_timep_special_02</span>
<span class='type'>(<tt>string</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify desired hours as value parameter
for
<code>g_timep_special_01</code>.</p>
</div>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_timeperiods.pp', line 42</span>
define cd_nagios::nagios::objects::add_timeperiods (
$ng_timep_name = undef,
$ng_timep_alias = undef,
$ng_timep_monday = &#39;00:00-00:00&#39;,
$ng_timep_tuesday = &#39;00:00-00:00&#39;,
$ng_timep_wednesday = &#39;00:00-00:00&#39;,
$ng_timep_thursday = &#39;00:00-00:00&#39;,
$ng_timep_friday = &#39;00:00-00:00&#39;,
$ng_timep_saturday = &#39;00:00-00:00&#39;,
$ng_timep_sunday = &#39;00:00-00:00&#39;,
$ng_timep_special_01 = undef,
$ng_timep_special_02 = &#39;00:00-00:00&#39;,
) {
$ng_nagios_server = $::cd_nagios::params::ng_nagios_server
$ng_tgt_timep_add = $::cd_nagios::params::ng_tgt_timeperiod_add
$ng_tgt_timep_rule_erb = $::cd_nagios::params::ng_tgt_timep_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target =&gt; $ng_tgt_timep_add,
content =&gt; template($ng_tgt_timep_rule_erb),
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 27 16:29:02 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

@@ -917,7 +917,7 @@ $ng_templates_rule_erb = $::cd_nagios::params::ng_templates_rule_erb
</div>
<div id="footer">
Generated on Thu Jul 27 15:33:32 2017 by
Generated on Thu Jul 27 16:29:01 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 15:33:31 2017 by
Generated on Thu Jul 27 16:29:01 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 15:33:25 2017 by
Generated on Thu Jul 27 16:28:54 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -0,0 +1,77 @@
# cd_nagios::nagios::objects::add_timeperiod_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_timeperiods_add.cfg. incl.
# additional timeperiods via define.
# cd_nagios::nagios::objects::add_timeperiods { 'example_timeperiod':
# ng_timeperiod_name => 'example_timeperiod',
# ng_timeperiod_alias => 'Example timeperiod',
# ng_timep_monday => '00:00-00:00',
# ng_timep_tuesday => '00:00-00:00',
# ng_timep_wednesday => '00:00-00:00',
# ng_timep_thursday => '00:00-00:00',
# ng_timep_friday => '00:00-00:00',
# ng_timep_saturday => '00:00-00:00',
# ng_timep_sunday => '00:00-00:00',
# }
################################################################################
class cd_nagios::nagios::objects::add_timeperiod_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios/conf.d/nagios_timeperiods_add.cfg
concat { $ng_tgt_timeperiods_add:
ensure => present,
path => $ng_tgt_timeperiods_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 { 'timeperiods_header':
target => $ng_tgt_timeperiods_add,
content => template($ng_tgt_timep_head_erb),
order => '000',
}
# example rule
cd_nagios::nagios::objects::add_timeperiods { 'example_timeperiod':
ng_timeperiod_name => 'example_timeperiod',
ng_timeperiod_alias => 'Example timeperiod',
ng_timep_monday => '00:00-00:00',
ng_timep_tuesday => '00:00-00:00',
ng_timep_wednesday => '00:00-00:00',
ng_timep_thursday => '00:00-00:00',
ng_timep_friday => '00:00-00:00',
ng_timep_saturday => '00:00-00:00',
ng_timep_sunday => '00:00-00:00',
}
}
}

View File

@@ -0,0 +1,69 @@
## cd_nagios::nagios::objects::add_timeperiods.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_timeperiods_add through
# extermal Puppet rules.
# @example
# cd_nagios::nagios::objects::add_timeperiods { 'example_timeperiod':
# ng_timeperiod_name => 'example_timeperiod',
# ng_timeperiod_alias => 'Example timeperiod',
# }
# @param [string] ng_timep_name Specify the timeperiod short name.
# @param [string] ng_timep_alias Specify the timeperiod alias (long name)
# @param [string] ng_timep_monday Specify the desired hours for Monday
# @param [string] ng_timep_tuesday Specify the desired hours for Tuesday
# @param [string] ng_timep_wednesday Specify the desired hours for Wednesday.
# @param [string] ng_timep_thursday Specify the desired hours for Thursday
# @param [string] ng_timep_friday Specify the desired hours for Friday
# @param [string] ng_timep_saturday Specify the desired hours for Saturday
# @param [string] ng_timep_sunday Specify the desired hours for Sunday.
# @param [string] ng_timep_special_01 Specify a special date as key parameter
# for `ng_timep_special_02`. See Nagios documentation for format details.
# @param [string] ng_timep_special_02 Specify desired hours as value parameter
# for `g_timep_special_01`.
###############################################################################
define cd_nagios::nagios::objects::add_timeperiods (
$ng_timep_name = undef,
$ng_timep_alias = undef,
$ng_timep_monday = '00:00-00:00',
$ng_timep_tuesday = '00:00-00:00',
$ng_timep_wednesday = '00:00-00:00',
$ng_timep_thursday = '00:00-00:00',
$ng_timep_friday = '00:00-00:00',
$ng_timep_saturday = '00:00-00:00',
$ng_timep_sunday = '00:00-00:00',
$ng_timep_special_01 = undef,
$ng_timep_special_02 = '00:00-00:00',
) {
$ng_nagios_server = $::cd_nagios::params::ng_nagios_server
$ng_tgt_timep_add = $::cd_nagios::params::ng_tgt_timeperiod_add
$ng_tgt_timep_rule_erb = $::cd_nagios::params::ng_tgt_timep_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target => $ng_tgt_timep_add,
content => template($ng_tgt_timep_rule_erb),
}
}
}

View File

@@ -25,226 +25,227 @@ class cd_nagios::nagios::objects::commands (
) inherits cd_nagios::params {
require cd_nagios::main::install
if $::fqdn == $ng_nagios_server {
@@nagios_command { 'notify-host-by-email':
ensure => present,
command_name => 'notify-host-by-email',
command_line => '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTADDRESS$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTADDRESS$ is $HOSTSTATE$ **" $CONTACTEMAIL$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'notify-host-by-email':
ensure => present,
command_name => 'notify-host-by-email',
command_line => '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTADDRESS$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTADDRESS$ is $HOSTSTATE$ **" $CONTACTEMAIL$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'notify-service-by-email':
ensure => present,
command_name => 'notify-service-by-email',
command_line => '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'notify-service-by-email':
ensure => present,
command_name => 'notify-service-by-email',
command_line => '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check-host-alive':
ensure => present,
command_name => 'check-host-alive',
command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check-host-alive':
ensure => present,
command_name => 'check-host-alive',
command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_disk':
ensure => present,
command_name => 'check_disk',
command_line => '$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_disk':
ensure => present,
command_name => 'check_disk',
command_line => '$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_load':
ensure => present,
command_name => 'check_local_load',
command_line => '$USER1$/check_load -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_load':
ensure => present,
command_name => 'check_local_load',
command_line => '$USER1$/check_load -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_procs':
ensure => present,
command_name => 'check_local_procs',
command_line => '$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_procs':
ensure => present,
command_name => 'check_local_procs',
command_line => '$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_users':
ensure => present,
command_name => 'check_local_users',
command_line => '$USER1$/check_users -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_users':
ensure => present,
command_name => 'check_local_users',
command_line => '$USER1$/check_users -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_swap':
ensure => present,
command_name => 'check_local_swap',
command_line => '$USER1$/check_swap -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_swap':
ensure => present,
command_name => 'check_local_swap',
command_line => '$USER1$/check_swap -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_ftp':
ensure => present,
command_name => 'check_ftp',
command_line => '$USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_ftp':
ensure => present,
command_name => 'check_ftp',
command_line => '$USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_snmp':
ensure => present,
command_name => 'check_snmp',
command_line => '$USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_snmp':
ensure => present,
command_name => 'check_snmp',
command_line => '$USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_http':
ensure => present,
command_name => 'check_http',
command_line => '$USER1$/check_http -I $HOSTADDRESS$ $ARG1$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_http':
ensure => present,
command_name => 'check_http',
command_line => '$USER1$/check_http -I $HOSTADDRESS$ $ARG1$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_ssh':
ensure => present,
command_name => 'check_ssh',
command_line => '$USER1$/check_ssh $ARG1$ $HOSTADDRESS$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_ssh':
ensure => present,
command_name => 'check_ssh',
command_line => '$USER1$/check_ssh $ARG1$ $HOSTADDRESS$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_ping':
ensure => present,
command_name => 'check_ping',
command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_ping':
ensure => present,
command_name => 'check_ping',
command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_tcp':
ensure => present,
command_name => 'check_tcp',
command_line => '$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_tcp':
ensure => present,
command_name => 'check_tcp',
command_line => '$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_udp':
ensure => present,
command_name => 'check_udp',
command_line => '$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_udp':
ensure => present,
command_name => 'check_udp',
command_line => '$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_nrpe':
ensure => present,
command_name => 'check_nrpe',
command_line => '$USER1$/check_nrpe -t 30 -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_nrpe':
ensure => present,
command_name => 'check_nrpe',
command_line => '$USER1$/check_nrpe -t 30 -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_nagios':
ensure => present,
command_name => 'check_nagios',
command_line => '$USER1$/check_nagios -F $ARG1$ -e $ARG2$ -C $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_nagios':
ensure => present,
command_name => 'check_nagios',
command_line => '$USER1$/check_nagios -F $ARG1$ -e $ARG2$ -C $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_bandwidth':
ensure => present,
command_name => 'check_bandwidth',
command_line => '$USER1$/check_bandwidth.sh -t 30 -H $HOSTADDRESS$ linux $ARG1$ $ARG2$ $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_bandwidth':
ensure => present,
command_name => 'check_bandwidth',
command_line => '$USER1$/check_bandwidth.sh -t 30 -H $HOSTADDRESS$ linux $ARG1$ $ARG2$ $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_jenkins_api':
ensure => present,
command_name => 'check_jenkins_api',
command_line => '$USER1$/check_http -H $HOSTADDRESS$ -u /api/xml?depth=0 -R quietingDown.false $ARG1$ $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_jenkins_api':
ensure => present,
command_name => 'check_jenkins_api',
command_line => '$USER1$/check_http -H $HOSTADDRESS$ -u /api/xml?depth=0 -R quietingDown.false $ARG1$ $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'process-service-perfdata-file':
ensure => present,
command_name => 'process-service-perfdata-file',
command_line => '/bin/mv /var/log/pnp4nagios/service-perfdata /var/spool/pnp4nagios/service-perfdata.$TIMET$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'process-service-perfdata-file':
ensure => present,
command_name => 'process-service-perfdata-file',
command_line => '/bin/mv /var/log/pnp4nagios/service-perfdata /var/spool/pnp4nagios/service-perfdata.$TIMET$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'process-host-perfdata-file':
ensure => present,
command_name => 'process-host-perfdata-file',
command_line => '/bin/mv /var/log/pnp4nagios/host-perfdata /var/spool/pnp4nagios/host-perfdata.$TIMET$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'process-host-perfdata-file':
ensure => present,
command_name => 'process-host-perfdata-file',
command_line => '/bin/mv /var/log/pnp4nagios/host-perfdata /var/spool/pnp4nagios/host-perfdata.$TIMET$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_ntp_time':
ensure => present,
command_name => 'check_ntp_time',
command_line => '$USER1$/check_ntp_time -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
@@nagios_command { 'check_ntp_time':
ensure => present,
command_name => 'check_ntp_time',
command_line => '$USER1$/check_ntp_time -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
}
}

View File

@@ -36,6 +36,7 @@ class cd_nagios::nagios::objects::config (
require cd_nagios::nagios::objects::add_hostgroup_rules
require cd_nagios::nagios::objects::servicegroups
require cd_nagios::nagios::objects::add_servicegroup_rules
require cd_nagios::nagios::objects::timeperiods
require cd_nagios::nagios::objects::add_timeperiod_rules
}
}

View File

@@ -0,0 +1,95 @@
# cd_nagios::nagios::objects::timeperiods.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 main timeperiods for NAGIOS through Puppet exports,
# and populates /etc/nagios/conf.d/nagios_timeperiods_base.cfg.
################################################################################
class cd_nagios::nagios::objects::timeperiods (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
@@nagios_timeperiod { '24x7':
ensure => present,
timeperiod_name => '24x7',
alias => '24 Hours A Day, 7 Days A Week',
monday => '00:00-24:00',
tuesday => '00:00-24:00',
wednesday => '00:00-24:00',
thursday => '00:00-24:00',
friday => '00:00-24:00',
saturday => '00:00-24:00',
sunday => '00:00-24:00',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { 'office_hours':
ensure => present,
timeperiod_name => 'office_hours',
alias => 'Office hours only, 5 Days A Week 09-05',
monday => '09:00-17:00',
tuesday => '09:00-17:00',
wednesday => '09:00-17:00',
thursday => '09:00-17:00',
friday => '09:00-17:00',
saturday => '00:00-00:00',
sunday => '00:00-00:00',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { 'out_of_hours':
ensure => present,
timeperiod_name => 'out_of_hours',
alias => 'Outside Office hours only',
monday => '17:00-09:00',
tuesday => '17:00-09:00',
wednesday => '17:00-09:00',
thursday => '17:00-09:00',
friday => '17:00-09:00',
saturday => '00:00-24:00',
sunday => '00:00-24:00',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { 'none':
ensure => present,
timeperiod_name => 'none',
alias => 'No Time Is A Good Time',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_tgt_timeperiods_base,
}
}
}

View File

@@ -964,7 +964,10 @@ $ng_certbot_live = "${ng_certbot_main_dir}/live"
$ng_target_templates = "${ng_conf_d_dir}/nagios_templates.cfg"
$ng_templates_head_erb = 'cd_nagios/nagios/templates_cfg_head.erb'
$ng_templates_rule_erb = 'cd_nagios/nagios/templates_cfg_rule.erb'
$ng_target_timeperiods = "${ng_conf_d_dir}/timeperiods.cfg"
$ng_tgt_timeperiods_base = "${ng_conf_d_dir}/nagios_timeperiods.cfg"
$ng_tgt_timeperiods_add = "${ng_conf_d_dir}/nagios_timeperiods_add.cfg"
$ng_tgt_timep_head_erb = 'cd_nagios/nagios/timeperiods_cfg_head.erb'
$ng_tgt_timep_rule_erb = 'cd_nagios/nagios/timeperiods_cfg_rule.erb'
$ng_target_localhost = "${ng_conf_d_dir}/nagios_localhost.cfg"
$ng_target_host = "${ng_conf_d_dir}/nagios_host.cfg"
$ng_target_hostgroup_base = "${ng_conf_d_dir}/nagios_hostgroups_base.cfg"

View File

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

View File

@@ -0,0 +1,18 @@
define timeperiod {
timeperiod_name <%= @ng_timeperiod_name %>
alias <%= @ng_timeperiod_alias %>
monday <%= @ng_timep_monday %>
tuesday <%= @ng_timep_tuesday %>
wednesday <%= @ng_timep_wednesday %>
thursday <%= @ng_timep_thursday %>
friday <%= @ng_timep_friday %>
saturday <%= @ng_timep_saturday %>
sunday <%= @ng_timep_sunday %>
}
<% unless @ng_timep_special_01.empty? -%>
define timeperiod {
timeperiod_name <%= @ng_timeperiod_name %>
@ng_timep_special_01
}
<% end -%>