Files
confdroid_nagios/doc/index.html

361 lines
12 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: README
&mdash; Documentation by YARD 0.9.16
</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 = "";
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</a> &raquo;
<span class="title">File: README</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"><div id='filecontents'>
<h1 id="label-Readme">Readme</h1>
<p><a href="https://pipelines.confdroid.com/job/cd_nagios/"><img
src="https://pipelines.confdroid.com/buildStatus/icon?job=cd_nagios"></a></p>
<p>[[<em>TOC</em>]]</p>
<h2 id="label-Synopsis">Synopsis</h2>
<p>Nagios is a powerful open source software solution for monitoring your IT
environments.</p>
<p><code>cd_nagios</code> is a Puppet module allowing to fully automate the
setup &amp; configuration of the Nagios server, as well as actively adding
client hosts and services to the monitoring environment through defines and
<code>PuppetDB</code>.</p>
<h2 id="label-WARNING">WARNING</h2>
<p><strong><em>Attention: Never use this puppet module on systems which have
been previously configured manually. It is impossible to predict how and
what would have been configured, hence previous configurations outside the
scope of this module may be overwritten! Automated configurations require a
test environment to verify that the module suits the purpose intended by
the user, as well as tune the parameters, before deploying into live
production</em></strong></p>
<h2 id="label-Features">Features</h2>
<p>Installation:</p>
<ul><li>
<p>Nagios Server instance:</p>
</li><li>
<p>install httpd via cd_apache</p>
</li><li>
<p>install Nagios server binaries on Nagios server</p>
</li><li>
<p>Nagios clients:</p>
</li><li>
<p>install client binaries like nagios plugins etc.</p>
</li><li>
<p>include NRPE via <code>cd_nrpe</code> (optional)</p>
</li></ul>
<p>Configuration</p>
<ul><li>
<p>configure all aspects of Nagios on server</p>
</li><li>
<p>manage nagios service user</p>
</li><li>
<p>manage directories (filesystem permissions, selinux )</p>
</li><li>
<p>manage <code>cgi.cfg</code> through parameters</p>
</li><li>
<p>manage <code>nagios.cfg</code> through parameters</p>
</li><li>
<p>manage Nagios users through external Puppet rules via define</p>
</li><li>
<p>manage Nagios commands through Puppet exports</p>
</li><li>
<p>manage Nagios template definitions through external Puppet rules via define</p>
</li><li>
<p>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.</p>
</li><li>
<p>manage Nagios main contact groups through Puppet exports. Additional
contact groups can be created through external Puppet rules via define, to
avoid having to alter the module code.</p>
</li><li>
<p>manage Nagios main host groups through Puppet exports. Additional host
groups can be created through external Puppet rules via define, to avoid
having to alter the module code.</p>
</li><li>
<p>manage Nagios main service groups through Puppet exports. Additional
service groups can be created through external Puppet rules via define, to
avoid having to alter the module code.</p>
</li><li>
<p>manage Nagios main time periods through Puppet exports. Additional time
periods can be created through external Puppet rules via define, to avoid
having to alter the module code.</p>
</li><li>
<p>configure firewall (optional)</p>
</li><li>
<p>configure selinux policies (optional)</p>
</li><li>
<p>configure forwarding http to https (optional)</p>
</li><li>
<p>manage TLS certificates through certbot (optional)</p>
</li><li>
<p>manage <code>$user$</code> arguments in resource file via define</p>
</li></ul>
<p>Service</p>
<ul><li>
<p>manage Nagios service on server</p>
</li></ul>
<p>Monitoring</p>
<ul><li>
<p>monitor Nagios host</p>
</li><li>
<p>monitor Nagios service</p>
</li><li>
<p>monitor clients:</p>
</li><li>
<p>ping</p>
</li><li>
<p>root partition</p>
</li><li>
<p>swap usage</p>
</li><li>
<p>logged-in local users</p>
</li><li>
<p>amount of total processes</p>
</li><li>
<p>amount of zombie processes</p>
</li><li>
<p>current Load</p>
</li></ul>
<h2 id="label-Repo+Documentation">Repo Documentation</h2>
<p>See the full Puppet documentation including parameters in
<code>docs/index.html</code></p>
<h2 id="label-Dependencies">Dependencies</h2>
<p>All dependencies must be included in the catalogue.</p>
<ul><li>
<p><a
href="https://sourcecode.confdroid.com/12WW1160/cd_resources">cd_resources</a>
for Yum repos.</p>
</li><li>
<p><a href="https://sourcecode.confdroid.com/12WW1160/cd_apache">cd_apache</a>
for installing httpd</p>
</li><li>
<p><a
href="https://sourcecode.confdroid.com/12WW1160/cd_firewall">cd_firewall</a>
or <a href="https://github.com/puppetlabs/puppetlabs-firewall">puppetlabs
firewall</a> (optional)</p>
</li><li>
<p><a
href="https://sourcecode.confdroid.com/12WW1160/cd_selinux">cd_selinux</a>
for selinux policy adjustments</p>
</li><li>
<p><a
href="https://sourcecode.confdroid.com/12WW1160/cd_certbot">cd_certbot</a>
to auto-manage TLS certificates (optional)</p>
</li><li>
<p><a href="https://sourcecode.confdroid.com/12WW1160/cd_nrpe">cd_nrpe</a> to
manage NRPE (optional)</p>
</li><li>
<p><a href="https://sourcecode.confdroid.com/12WW1160/cd_stdlib">cd_stdlib</a>
or <a href="https://github.com/puppetlabs/puppetlabs-stdlib">puppetlabs
stdlib</a> to facilitate concat</p>
</li><li>
<p><a href="https://sourcecode.confdroid.com/12WW1160/cd_stdlib">cd_concat</a>
or <a href="https://github.com/puppetlabs/puppetlabs-concat">puppetlabs
concat</a> to concatenate configuration files from different sources.</p>
</li></ul>
<h2 id="label-Deployment">Deployment</h2>
<ul><li>
<p>native Puppet deployment</p>
</li></ul>
<p>via site.pp or nodes.pp</p>
<pre class="code ruby"><code class="ruby">node &#39;example.example.net&#39; {
include cd_nagios
}
</code></pre>
<ul><li>
<p>through Foreman:</p>
</li></ul>
<p>In order to apply parameters through Foreman,
<strong>cd_nagios::params</strong> must be added to the host or host group
in question.</p>
<p>See <a
href="https://confdroid.com/2017/05/deploying-our-puppet-modules/">more
details about class deployment on Confdroid.com</a>.</p>
<h2 id="label-PuppetDB">PuppetDB</h2>
<p>A working instance of PuppetDB connected to the Puppet master is required
for this to work. Installation and configuration of PuppetDB is out of
scope for this module, however <a
href="https://sourcecode.confdroid.com/12WW1160/cd_puppetdb">cd_puppetdb</a>
is available to automate this task for you as well within a few minutes.</p>
<h2 id="label-SELINUX">SELINUX</h2>
<p>All files and directories are configured with correct selinux context. If
selinux is disabled, these contexts are ignored.</p>
<h2 id="label-Certbot">Certbot</h2>
<p>This module can optionally setup <a
href="https://certbot.eff.org/">certbot</a> TLS certificate management for
the front-end GUI. In order to do so, set <code>$ng_enable_certbot</code>
as well as <code>$ng_use_https</code> to <code>true</code> (default).
Effectively, this will manage the certs before even installing Nagios, so
there will be no problems with the Nagios showing up with a self-signed
certificate. Once enabled, the module will go and try to obtain a
certificate automatically. For this to work, you need to have proper DNS
resolution set up for your domain / nagios server. Certs are also
automatically renewed.</p>
<p>If you prefer to use https but use self-signed certs or your own CA, simply
set to false. This will point the SSL vhost config file to the default
location for TLS certificates.</p>
<h2 id="label-httpd+vHost+files">httpd vHost files</h2>
<p>by default, Nagios creates its own <code>nagios.conf</code> file, which is
not a vhost file and relies on the main <code>ssl.conf</code>. However, as
Nagios might be running on a regular web server with various other web
instances (not recommended through for performance reasons), we do not want
to manage <code>ssl.conf</code> directly, hence the module creates a vhost
for the SSL host.</p>
<h2 id="label-Client+Connections">Client Connections</h2>
<p>In order to monitor clients, NAGIOS must be able to connect to them. There
are multiple ways of doing so, the most common ones being NRPE and SSH. So
far this module works through the usage of NRPE, which by default is
enabled. Class cd_nagios::client::nrpe configures <code>nrpe.cfg</code> and
opens the required firewall port on clients (optional,default).</p>
<h2 id="label-Known+Problems">Known Problems</h2>
<ul><li>
<p>Collected resources import ordering problem: The module might try to import
collected facts before nagios is even installed.</p>
</li></ul>
<h2 id="label-Support">Support</h2>
<ul><li>
<p>OS: CentOS 7</p>
</li><li>
<p>Puppet 5</p>
</li></ul>
<h2 id="label-Tests">Tests</h2>
<ul><li>
<p>Puppet Lint</p>
</li><li>
<p>excluded tests:</p>
<ul><li>
<p><code>--no-class_inherits_from_params_class-check</code>:relevant only to
non-supported outdated puppet versions</p>
</li><li>
<p><code>--no-variable_scope-check</code>: not applicable as we are inheriting
parameters from params class. the lint check does not distinguish between
facts and inherited parameters.</p>
</li><li>
<p><code>--no-80chars-check</code>: it is not always possible to stay within
80 characters, although typically only occurring on the parameter vault
<code>params.pp</code>.</p>
</li><li>
<p><code>--no-arrow_alignment-check</code>: this check leads to actually not
having am easily readable arrow alignment, as this checks <code>per
block</code>, not per class.</p>
</li></ul>
</li><li>
<p>Puppet Parser</p>
</li><li>
<p>ERB Template Parser</p>
</li><li>
<p>Test for unwanted UTF8 files in the Puppet code (see tests/UTF_Files)</p>
</li><li>
<p>Markdown-lint</p>
</li><li>
<p>Spellcheck</p>
</li><li>
<p>Sonar Quality Gate</p>
</li></ul>
<h2 id="label-Contact+Us">Contact Us</h2>
<p><a href="https://confdroid.com/contact/">contact Us</a></p>
<h2 id="label-Disclaimer">Disclaimer</h2>
<p>ConfDroid as entity is entirely independent from Puppet. We provide custom
configuration modules, written for specific purposes and specific
environments. The modules are tested and supported only as documented, and
require testing in designated environments (i.e. lab or development
environments) for parameter tuning etc. before deploying into production
environments.</p>
</div></div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>