- Description
- Setup - The basics of getting started with centreon_register
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
This module permit to register a host to centreon (https://www.centreon.com) server by using REST API. The main idea is when a I deploy a new host with puppet, I want to automatically add this host to monitoring with a host template of your choice.
For Linux OS this module deploy a bash script into /usr/local/centreon_register by default, and install curl if not present. This script use curl in order to modify centreon server configuration.
The host need access to the Centreon server via http or https.
On windows OS, the idea is the same, the module will deploy a powershell script into c:/centreon_register/ and install curl with chocolatey.
If you change script_path_linux or script_path_windows puppet will create the last folder. So make sure path exist.
Simply declare the class like this and specify mandatory option to reach centreon server :
class centreon_register {
centreon_webapi_host => 'http://centreon.domain.fr',
centreon_login => 'admin',
centreon_admin_password => 'password',
}
With Hiera :
centreon_register::centreon_webapi_host: 'http://centreon.domain.local'
centreon_register::centreon_admin_password: 'password'
centreon_register::script_path_linux: '/var/tmp'
centreon_register::host_template: 'debian'
Or :
class centreon_register {
centreon_webapi_host => 'http://centreon.domain.fr',
centreon_login => 'admin',
centreon_admin_password => 'password',
script_path_linux => '/var/tmp',
host_template => 'debian',
}
For Windows :
class centreon_register {
centreon_webapi_host => 'http://centreon.domain.fr',
centreon_login => 'admin',
centreon_admin_password => 'password',
script_path_windows => 'c:/centreon_register',
host_template => 'windows',
}
For using curl with insecure mode :
class centreon_register {
curl_opts_linux => '-k',
curl_opts_windows => '-k',
}
## Limitations
Currently the script centreon_register.sh car only create a host with some parameters : hostname, alias, IP, host template, Poller, One custom macro.
Has been tested with :
* Debian 9,
* Redhat 7
* Windows 2012
Should be working on any OS with curl.
## Development
PR are welcome !
TO DO :
* Add more option to centreon_register.sh
## Release Notes/Contributors/Etc.
Module inspired by https://github.com/centreon/centreon-iac-puppet-configurator