TODO-0001 - markdown lint
This commit is contained in:
107
README.md
107
README.md
@@ -1,35 +1,27 @@
|
|||||||
|
# Readme
|
||||||
|
|
||||||
[](https://pipelines.confdroid.com/job/cd_nrpe/)
|
[](https://pipelines.confdroid.com/job/cd_nrpe/)
|
||||||
|
|
||||||
### Synopsis
|
[[_TOC_]]
|
||||||
|
|
||||||
|
## Synopsis
|
||||||
|
|
||||||
NRPE allows monitoring tools like NAGIOS or ICINGA to connect to clients for monitoring purposes.
|
NRPE allows monitoring tools like NAGIOS or ICINGA to connect to clients for monitoring purposes.
|
||||||
|
|
||||||
`cd_nrpe` is a fully parameterized Puppet module to automate NRPE installation and configuration.
|
`cd_nrpe` is a fully parameterized Puppet module to automate NRPE installation and configuration.
|
||||||
|
|
||||||
### WARNING
|
## WARNING
|
||||||
`**__!!! 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 previuos 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!!! __**`
|
|
||||||
|
|
||||||
### Table of Contents
|
***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***
|
||||||
* [Features](#features)
|
|
||||||
* [Repo Structure](https://sourcecode.confdroid.com/12WW1160/cd_nrpe/blob/master/REPOSTRUCTURE.md)
|
## Features
|
||||||
* [Repo Documention](#repo-documentation)
|
|
||||||
* [Dependencies](#dependencies)
|
|
||||||
* [Deployment](#deployment)
|
|
||||||
* [native Puppet deployment](#native-puppet-deployment)
|
|
||||||
* [through Foreman](#through-foreman)
|
|
||||||
* [Parameters](#parameters)
|
|
||||||
* [Managing Check Commands](#managing-check-commands)
|
|
||||||
* [SELINUX](#selinux)
|
|
||||||
* [Known Problems](#known-problems)
|
|
||||||
* [Support](#support)
|
|
||||||
* [Tests](#tests)
|
|
||||||
* [Contact Us](https://confdroid.com/contact/)
|
|
||||||
* [Disclaimer](#disclaimer)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
INSTALLATION
|
INSTALLATION
|
||||||
|
|
||||||
* install nrpe binaries
|
* install nrpe binaries
|
||||||
|
|
||||||
CONFIGURATION
|
CONFIGURATION
|
||||||
|
|
||||||
* manage NRPE service user properties
|
* manage NRPE service user properties
|
||||||
* manage directory structure (file system permissions, selinux context) through parameters
|
* manage directory structure (file system permissions, selinux context) through parameters
|
||||||
* manage configuration files through parameters:
|
* manage configuration files through parameters:
|
||||||
@@ -41,15 +33,15 @@ CONFIGURATION
|
|||||||
* manage selinux rule exceptions (optional)
|
* manage selinux rule exceptions (optional)
|
||||||
|
|
||||||
SERVICE
|
SERVICE
|
||||||
|
|
||||||
* manage NRPE service
|
* manage NRPE service
|
||||||
|
|
||||||
### Repo Structure
|
## Repo Documentation
|
||||||
Repostructure has moved to REPOSTRUCTURE.md in repo.
|
|
||||||
|
|
||||||
### Repo Documentation
|
See the full Puppet documentation including parameters in `docs/index.html`
|
||||||
The full puppet html documentation is available in docs/index.html
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
All dependencies must be included in the catalogue.
|
All dependencies must be included in the catalogue.
|
||||||
|
|
||||||
* [cd_resources](https://sourcecode.confdroid.com/12WW1160/cd_resources) to manage YUM repositories.
|
* [cd_resources](https://sourcecode.confdroid.com/12WW1160/cd_resources) to manage YUM repositories.
|
||||||
@@ -57,41 +49,28 @@ All dependencies must be included in the catalogue.
|
|||||||
* [cd_stdlib](https://sourcecode.confdroid.com/12WW1160/cd_stdlib) or [puppetlabs stdlib](https://github.com/puppetlabs/puppetlabs-stdlib) to facilitate concat
|
* [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) for concatenating files
|
* [cd_concat](https://sourcecode.confdroid.com/12WW1160/cd_stdlib) or [puppetlabs concat](https://github.com/puppetlabs/puppetlabs-concat) for concatenating files
|
||||||
|
|
||||||
### Deployment
|
## Deployment
|
||||||
|
|
||||||
`cd_nrpe` does typically not need to be specifically declared. It will be auto-required by `cd_nagios` with default settings. Only if you want to override settings declare it specifically.
|
`cd_nrpe` does typically not need to be specifically declared. It will be auto-required by `cd_nagios` with default settings. Only if you want to override settings declare it specifically.
|
||||||
|
|
||||||
##### native Puppet deployment
|
* native Puppet deployment
|
||||||
|
|
||||||
via site.pp or nodes.pp
|
via site.pp or nodes.pp
|
||||||
|
|
||||||
```
|
```ruby
|
||||||
node 'example.example.net' {
|
node 'example.example.net' {
|
||||||
include nrpe
|
include nrpe
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
#### through Foreman:
|
|
||||||
|
* through Foreman:
|
||||||
|
|
||||||
In order to apply parameters through Foreman, **__cd_nrpe::params__** must be added to the host or hostgroup in question, unless the defaults are fully acceptable across the estate.
|
In order to apply parameters through Foreman, **__cd_nrpe::params__** must be added to the host or hostgroup in question, unless the defaults are fully acceptable across the estate.
|
||||||
|
|
||||||
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
|
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
|
||||||
|
|
||||||
|
## Managing Check Commands
|
||||||
|
|
||||||
### Parameters
|
|
||||||
The following parameters are editable via params.pp or through ENC (**__recommended__**). Values changed will take immediate effect at next puppet run. Services will be restarted where neccessary. If you want to override parameters, the [module must be specifically declared to hosts when using ENC](#through-foreman).
|
|
||||||
|
|
||||||
The [full list of Parameters](https://confdroid.com/2017/07/cd_nrpe-parameters/) is available [here](https://confdroid.com/2017/07/cd_nrpe-parameters/) and in the docs folder in the software repo.
|
|
||||||
|
|
||||||
### Mandatory Parameters
|
|
||||||
There are currently no mandatory parameters, i.e. the module will function right out of box as is.
|
|
||||||
|
|
||||||
### Optional Parameters
|
|
||||||
|
|
||||||
* `$ne_manage_cmds` : Whether to manage check command definitions dynamically through a define, i.e. from other Puppet modules or profiles. Defaults to `true`.
|
|
||||||
* `$ne_incl_fw` : Whether to manage relevant firewall rules through this modules. Defaults to `true`.
|
|
||||||
* `$ne_include_selinux` : Whether to manage selinux exception rules. Defaults to `true`.
|
|
||||||
* `$ne_enable_ssl` : Whether to allow SSL settings. See [known problems](#konwn-problems) for more details.
|
|
||||||
* `$ne_allow_sudo : Whether to allow the nagios / nrpe user to use sudo by default. Controls both the setting `command_prefix` and application of a sudo rule. Defaults to `false` as it usually is not required for most of the checks.
|
|
||||||
|
|
||||||
### Managing Check Commands
|
|
||||||
In order to connect a Nagios monitoring server to clients through NRPE, you must define commands and the desired argument strings on the clients. The default NRPE installation comes with a few examples of such commands, which are also included in this module. However, every environment is very different in their requirements and Nagios via Puppet is all about the ability to dynamicically set command arguments based on default variables / overrides. For that reason no hard-coded commands are included, but instead all commands are set via argument strings, where possible.
|
In order to connect a Nagios monitoring server to clients through NRPE, you must define commands and the desired argument strings on the clients. The default NRPE installation comes with a few examples of such commands, which are also included in this module. However, every environment is very different in their requirements and Nagios via Puppet is all about the ability to dynamicically set command arguments based on default variables / overrides. For that reason no hard-coded commands are included, but instead all commands are set via argument strings, where possible.
|
||||||
|
|
||||||
The commands are created within /etc/nrpe.d/command.cfg , every set of instructions creates a new line.
|
The commands are created within /etc/nrpe.d/command.cfg , every set of instructions creates a new line.
|
||||||
@@ -103,37 +82,47 @@ cd_nrpe::commands::definitions { 'check_users':
|
|||||||
ne_cmd_argstring => '-w $ARG1$ -c $ARG2$',
|
ne_cmd_argstring => '-w $ARG1$ -c $ARG2$',
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
It is very recommendable to define such commands directly within Puppet modules or profiles, so any node running the particular service controlled by the module will automatically get the required check commands defined as well, while nodes not running the service also do not contain the command check. The same then is true for Nagios checks, so you would have both the NRPE command definition and the Nagios check contained in Puppet modules or profiles to have it in once location.
|
It is very recommendable to define such commands directly within Puppet modules or profiles, so any node running the particular service controlled by the module will automatically get the required check commands defined as well, while nodes not running the service also do not contain the command check. The same then is true for Nagios checks, so you would have both the NRPE command definition and the Nagios check contained in Puppet modules or profiles to have it in one location.
|
||||||
|
|
||||||
|
|
||||||
### SELINUX
|
## SELINUX
|
||||||
|
|
||||||
All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.
|
All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.
|
||||||
|
|
||||||
### Known Problems
|
## Known Problems
|
||||||
|
|
||||||
* SSL/TLS support: Version 3 of NRPE supposedly has support for SSL/ TLs. However, at the time of writing this module, this seems to be buggy, as I was unable to start the NRPE service as soon as the `ssl_cert_file` line was uncommented in teh configuration file, despite having valid certs in the right position on the node. This happened when installing manually, not through this Puppet module. For that reason I included the `$ne_enable_ssl` boolean parameter, which is set to `false` by default, hence disabling SSL/TLS options until this has been fixed upstream, or a valid workaround has been found. Setting this option to `true` will include all SSL / TLS settings.
|
* SSL/TLS support: Version 3 of NRPE supposedly has support for SSL/ TLs. However, at the time of writing this module, this seems to be buggy, as I was unable to start the NRPE service as soon as the `ssl_cert_file` line was uncommented in teh configuration file, despite having valid certs in the right position on the node. This happened when installing manually, not through this Puppet module. For that reason I included the `$ne_enable_ssl` boolean parameter, which is set to `false` by default, hence disabling SSL/TLS options until this has been fixed upstream, or a valid workaround has been found. Setting this option to `true` will include all SSL / TLS settings.
|
||||||
|
|
||||||
### Troubleshooting
|
## Troubleshooting
|
||||||
* `CHECH_NRPE: Unable to read output`: Nagios sudo access also needs Selinux to allow this. Default settings in this module take care for both through `$ne_allow_sudo` and `$ne_include_selinux`.
|
|
||||||
|
* `CHECK_NRPE: Unable to read output`: Nagios sudo access also needs Selinux to allow this. Default settings in this module take care for both through `$ne_allow_sudo` and `$ne_include_selinux`.
|
||||||
* `CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected): This is down to the new illegal meta characters feature via `nasty_metachars`, i.e. if you included an additional character which actuall be part of a check, or if a custom check contains a default illegal character.
|
* `CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected): This is down to the new illegal meta characters feature via `nasty_metachars`, i.e. if you included an additional character which actuall be part of a check, or if a custom check contains a default illegal character.
|
||||||
|
|
||||||
### Support
|
## Support
|
||||||
* OS: CentOS 6, 7
|
|
||||||
* Puppet 3.x
|
|
||||||
|
|
||||||
|
* OS: CentOS 7
|
||||||
|
* Puppet 5
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
### Tests
|
|
||||||
* Puppet Lint
|
* Puppet Lint
|
||||||
* excluded tests:
|
* excluded tests:
|
||||||
* `--no-class_inherits_from_params_class-check`:relavant only to non-supported outdated puppet versions
|
* `--no-class_inherits_from_params_class-check`:relevant only to non-supported outdated puppet versions
|
||||||
* `--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.
|
* `--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.
|
||||||
* `--no-80chars-check`: it is not always possible to stay within 80 characters, although typically only occurring on the parameter vault `params.pp`.
|
* `--no-80chars-check`: it is not always possible to stay within 80 characters, although typically only occurring on the parameter vault `params.pp`.
|
||||||
* `--no-arrow_alignment-check`: this check leads to actually not having am easily readable arrow alignment, as this checks `per block`, not per class.
|
* `--no-arrow_alignment-check`: this check leads to actually not having am easily readable arrow alignment, as this checks `per block`, not per class.
|
||||||
* Puppet Parser
|
* Puppet Parser
|
||||||
* ERB Template Parser
|
* ERB Template Parser
|
||||||
* Test for unwanted UTF8 files in the Puppet code as this causes problems with PuppetDB (see tests/UTF_Files)
|
* Test for unwanted UTF8 files in the Puppet code (see tests/UTF_Files)
|
||||||
### Contact Us
|
* Markdown-lint
|
||||||
|
* Spellcheck
|
||||||
|
* Sonar Quality Gate
|
||||||
|
|
||||||
|
## Contact Us
|
||||||
|
|
||||||
[contact Us](https://confdroid.com/contact/)
|
[contact Us](https://confdroid.com/contact/)
|
||||||
|
|
||||||
### Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments.
|
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.
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user