<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 & 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>
<h2id="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>
<h2id="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>
<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>
<p><ahref="https://gitlab.confdroid.com/puppet/cd_firewall">cd_firewall</a> or <ahref="https://github.com/puppetlabs/puppetlabs-firewall">puppetlabs firewall</a> (optional)</p>
<p><ahref="https://gitlab.confdroid.com/puppet/cd_stdlib">cd_stdlib</a> or <ahref="https://github.com/puppetlabs/puppetlabs-stdlib">puppetlabs stdlib</a> to facilitate concat</p>
<p><ahref="https://gitlab.confdroid.com/puppet/cd_stdlib">cd_concat</a> or <ahref="https://github.com/puppetlabs/puppetlabs-concat">puppetlabs concat</a> to concatenate configuration files from different sources.</p>
<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 <ahref="https://gitlab.confdroid.com/puppet/cd_puppetdb">cd_puppetdb</a> is available to automate this task for you as well within a few minutes.</p>
<p>All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.</p>
<h2id="label-Certbot">Certbot</h2>
<p>This module can optionally setup <ahref="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>
<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>
<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>
<h2id="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>
<h2id="label-Support">Support</h2>
<ul><li>
<p>OS: CentOS 7</p>
</li><li>
<p>Puppet 5</p>
</li></ul>
<h2id="label-Tests">Tests</h2>
<ul><li>
<p>Puppet Lint</p>
</li><li>
<p>excluded tests:</p>
<ul><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>
<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>
<divid="footer">
Generated by <ahref="http://yardoc.org"title="Yay! A Ruby Documentation Tool"target="_parent">yard</a>.