AMCS SecC - NRPE Checks Module
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with [nrpe]
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Overview
This module is a companion module for secc_nrpe
Module Description
This module is used to manage checks.
Commands will be inserted into general.cfg
.
This module can not run without secc_nrpe
.
Setup
What [nrpe] affects
-
Files
/home/nrpe/bin/checks_*
-
Templates
/etc/nrpe.d/general.cfg
Beginning with [nrpe]
- this module only handles NRPE checks, for NRPE configuration you need to incluce the base class
secc_nrpe
Usage
- This module has a hard dependency to
secc_nrpe
, you can not use this without it
There are two use cases for this module:
- copy this module into your repository
- this is necessary if your checks are not in a separate git repository
- you place your checks inside this puppet module
- do not use Puppetfile to manage this module
- use this module via Puppetfile inclusion
- NRPE checks need to be installed from a separate git repository
- this is controlled with the following variables:
-
nrpe_module_repository
points to the correct git repository URL -
manage_home_nrpe_bin_purge
andmanage_home_nrpe_bin_force
set tofalse
-
Example:
secc_nrpe_checks::nrpe_module_repository: https://$USERNAME:$PASSWORD@yourgitserver.example.com/scm/yourproject/your_nrpe_checks.git
secc_nrpe_checks::manage_home_nrpe_bin_purge: false
secc_nrpe_checks::manage_home_nrpe_bin_force: false
Configuring [nrpe] /etc/nrpe.d
Via the define secc_nrpe_checks::command_file
it is possible to include external NRPE commands in the directory /etc/nrpe.d
An example call might look like this:
secc_nrpe_checks::command_file { 'this_is_a_test':
commands => {
'NRPE_first_command' => {
command => '/bin/true',
}
}
}
The result is a file /etc/nrpe.d/this_is_a_test.cfg
with the content:
### MANAGED BY PUPPET ['secc_nrpe_checks'] ###
command[NRPE_first_command]=/bin/true
Reference
- Classes
secc_nrpe_checks
secc_nrpe_checks::config
- Defines
secc_nrpe_checks::command_file
Limitations
- This module was tested with CentOS6 and CentOS7
Development
- Please document changes withing the module using git commits
- Execution of tests:
bundler install
,bundler exec rake