`confdroid_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***
- if FQDN equals the specified `ng_nagios_server`, nagios server with all required specs is installed, else only nagios client packages and the target specs
- configures the main nagios configuration file and sets values as (pre)configured per values in params, which can be overwritten.
- if `ng_include_nrpe`is set to `true`, the confdroid_nrpe module is automatically applied on clients ([confdroid_nrpe](https://sourcecode.confdroid.com/confdroid/confdroid_nrpe) must be in the catalogue then)
Main access to the user interface requires defining an administrative user and password via `ng_main_user` and `ng_main_password`. The password should be encrypted like this:
The main user is automatically created. If you want to add more users, this should be done via the define confdroid_nagios::server::access. In your control repo, site.pp etc. address the access define like this:
In order to add contacts for the notifications, address the define `confdroid_nagios::nagios::objects::add_contact` in your config repo, site.pp etc. like this:
This requires the contact groups to be in place as well.
### Adding contact groups
In order to add contact groups for the notifications, address the define `confdroid_nagios::nagios::objects::add_contactgroups` in your config repo, site.pp etc. like this:
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://gitlab.confdroid.com/puppet/cd_puppetdb) is available to automate this task for you as well within a few minutes.
-`--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.