diff --git a/README.md b/README.md index 92812bf..8e6164d 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,15 @@ - [Synopsis](#synopsis) - [WARNING](#warning) - [Features](#features) + - [Repo Documentation](#repo-documentation) + - [Dependencies](#dependencies) + - [Deployment](#deployment) + - [Configuration](#configuration) - [configuring UI user access](#configuring-ui-user-access) - [Additional UI users](#additional-ui-users) - [Adding contacts](#adding-contacts) - [Adding contact groups](#adding-contact-groups) - [Adding host groups](#adding-host-groups) - - [Repo Documentation](#repo-documentation) - - [Dependencies](#dependencies) - - [Deployment](#deployment) - [PuppetDB](#puppetdb) - [SELINUX](#selinux) - [Support](#support) @@ -43,6 +44,39 @@ At this stage, the module is being redeveloped and being built to the latest sta - 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) +## Repo Documentation + +See the full Puppet documentation including parameters in `docs/index.html` + +## Dependencies + +All dependencies must be included in the catalogue. + +- `puppetlabs-firewall` +- `puppetlabs-stdlib` +- `puppetlabs-concat` +- `puppetlabs-nagios_core` + +## Deployment + +- native Puppet deployment + +via site.pp or nodes.pp + +```ruby +node 'example.example.net' { + include confdroid_nagios +} +``` + +- through Foreman: + +In order to apply parameters through Foreman, **__confdroid_nagios::params__*- must be added to the host or host group in question. + +See [more details about class deployment on confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/). + +## Configuration + ### configuring UI user access 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: @@ -112,37 +146,6 @@ In order to add host groups, address the define `confdroid_nagios::nagios::objec Hosts will be populated through the target.pp dynamically. -## Repo Documentation - -See the full Puppet documentation including parameters in `docs/index.html` - -## Dependencies - -All dependencies must be included in the catalogue. - -- `puppetlabs-firewall` -- `puppetlabs-stdlib` -- `puppetlabs-concat` -- `puppetlabs-nagios_core` - -## Deployment - -- native Puppet deployment - -via site.pp or nodes.pp - -```ruby -node 'example.example.net' { - include confdroid_nagios -} -``` - -- through Foreman: - -In order to apply parameters through Foreman, **__confdroid_nagios::params__*- must be added to the host or host group in question. - -See [more details about class deployment on confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/). - ## PuppetDB 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. diff --git a/manifests/params.pp b/manifests/params.pp index ecb006f..c8f273b 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -19,9 +19,9 @@ # with SSL termination in front of the Nagios web interface, so this is # disabled by default. # @param [String] ng_main_user The username for the Nagios web interface. -# Default is 'nagios'. +# Default is $ng_users. # @param [String] ng_main_password The encrypted password for the Nagios web -# interface. Default is 'nagios'. Must be properly encrypted using the +# interface. Default is $ng_users. Must be properly encrypted using the # htpasswd utility. # @param [String] ng_context_help Whether to enable the context help in the # Nagios web interface. Default is '1'. @@ -57,7 +57,7 @@ # command with total processes. Default is '400'. # @param [String] ng_procs_tot_param The parameters for the check_procs command # with total processes. Default is 'RDST'. -# @param [String] ng_procs_tot_ensure The ensure value for the check_procs +# @param [String] ng_procs_tot_ens The ensure value for the check_procs # command with total processes. Default is 'present'. # @param [String] ng_procs_z_warn The warning threshold for the check_procs # command with zombie processes. Default is '10'. @@ -98,12 +98,12 @@ class confdroid_nagios::params ( # main String $ng_nagios_server = 'nagios.example.net', - Array $ng_reqpackages_server = ['nagios','nagios-devel'], + Array $ng_reqpackages_server = [$ng_users,'nagios-devel'], Array $ng_reqpackages_client = ['net-snmp-utils','nagios-plugins','nagios-plugins-all','nagios-plugins-nrpe','nagios-common'], String $ng_pkg_ensure = 'present', Boolean $ng_include_nrpe = true, - String $ng_main_user = 'nagios', - String $ng_main_password = 'nagios', + String $ng_main_user = $ng_users, + String $ng_main_password = $ng_users, # contact groups String $ng_contactgroup_name = 'admins', @@ -144,9 +144,9 @@ class confdroid_nagios::params ( String $ng_swap_crit = '10', String $ng_swap_ensure = 'present', # users - String 'nagios's_warn = '20', - String 'nagios's_crit = '50', - String 'nagios's_ensure = 'present', + String $ng_users_warn = '20', + String $ng_users_crit = '50', + String $ng_users_ensure = 'present', #total procs String $ng_procs_tot_warn = '330', String $ng_procs_tot_crit = '400', @@ -170,7 +170,7 @@ class confdroid_nagios::params ( $os_release = $facts['os']['release']['major'] # service - $ng_nagios_service = 'nagios' + $ng_nagios_service = $ng_users # directories $ng_main_dir = '/etc/nagios'