Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 7.0.0
- , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'romgo-centreon_register', '0.3.3'
Learn more about managing modules with a PuppetfileDocumentation
centreon_register
Table of Contents
- 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
Description
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.
Setup
What centreon_register affects
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.
Beginning with centreon_register
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',
}
Usage
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
Changelog
All notable changes to this project will be documented in this file.
Release 0.3.3
Features
- Add two variable curl_opts_windows and curl_opts_linux in order to allow other options to curl command
Bugfixes
Known Issues
Release 0.3.2
Features
Bugfixes
- Fix curl command to manage token with character like / and \
Known Issues
Release 0.3.1
Features
- Allow host update
Bugfixes
Known Issues
Release 0.3.0
Features
- Add windows support
- Upgrade to PDK 1.10
- Change default path for powershell and bash script
- Ensure puppet create the folder for deploying the script
Bugfixes
Known Issues
Release 0.2.0
Features
- Upgrade to PDK 1.9.1
- Remove Old unwanted Code
Bugfixes
Known Issues
Release 0.1.0
Features
- Initial release
Bugfixes
Known Issues
Dependencies
- puppetlabs/chocolatey (3.3.0)