`cd_nagios` 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 `PuppetDB`.
***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***
* manage Nagios template definitions through external Puppet rules via define
* manage Nagios main contacts through Puppet exports. Additional contacts can be created through external Puppet rules via define, to avoid having to alter the module code.
* manage Nagios main 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.
* 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.
* 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.
* 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.
* [cd_resources](https://sourcecode.confdroid.com/12WW1160/cd_resources) for Yum repos.
* [cd_apache](https://sourcecode.confdroid.com/12WW1160/cd_apache) for installing httpd
* [cd_firewall](https://sourcecode.confdroid.com/12WW1160/cd_firewall) or [puppetlabs firewall](https://github.com/puppetlabs/puppetlabs-firewall) (optional)
* [cd_selinux](https://sourcecode.confdroid.com/12WW1160/cd_selinux) for selinux policy adjustments
* [cd_certbot](https://sourcecode.confdroid.com/12WW1160/cd_certbot) to auto-manage TLS certificates (optional)
* [cd_nrpe](https://sourcecode.confdroid.com/12WW1160/cd_nrpe) to manage NRPE (optional)
* [cd_stdlib](https://sourcecode.confdroid.com/12WW1160/cd_stdlib) or [puppetlabs stdlib](https://github.com/puppetlabs/puppetlabs-stdlib) to facilitate concat
* [cd_concat](https://sourcecode.confdroid.com/12WW1160/cd_stdlib) or [puppetlabs concat](https://github.com/puppetlabs/puppetlabs-concat) to concatenate configuration files from different sources.
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 [cd_puppetdb](https://sourcecode.confdroid.com/12WW1160/cd_puppetdb) is available to automate this task for you as well within a few minutes.
This module can optionally setup [certbot](https://certbot.eff.org/) TLS certificate management for the front-end GUI. In order to do so, set `$ng_enable_certbot` as well as `$ng_use_https` to `true` (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.
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.
by default, Nagios creates its own `nagios.conf` file, which is not a vhost file and relies on the main `ssl.conf`. 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 `ssl.conf` directly, hence the module creates a vhost for the SSL host.
So far this module works through the usage of NRPE, which by default is enabled. Class cd_nagios::client::nrpe configures `nrpe.cfg` and opens the required firewall port on clients (optional,default).
*`--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.
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.