Table of Contents
- Overview
- Compatible Centreon versions
- Requirements
- Installation
- Catalog Variables
- Examples
- Screencasts
- License
The wrapper
is built to intermediate the apply of objects configured in a single template and can be applied remotely through a set of predefined instructions and using the Centreon webapi tools for configuration in the environment.
The idea behind this wrapper
is to have a tool that can apply the Centreon configuration objects to remote monitoring points in the network structure, even if there are access restrictions or limitations to apply settings from a certain point.
Because we can upload the wrapper to any other host and start the trigger on this host, it can still do remote access to apply the settings. So too, how can the host itself be applied.
The configuration objects are translated into a single json file, which is sent along with the wrapper. This file is dynamic and is assembled from Puppet.
Following versions of Centreon are successfully tested with this role:
- 18.10.0
This role will work on the following operating systems:
- Red Hat / Centos
- Debian
- Ubuntu
- Windows (coming soon)
cd ~/work-dir
git clone https://github.com/centreon/centreon-iac-puppet-configurator.git
cd centreon-iac-puppet-configurator
Coming soon
centreon_webapi_host
: Host or ip to connect in WebAPIcentreon_webapi_port
: TCP port to connect in WebAPIcentreon_admin_password
: Password used by Administrator userconfiguration
: Is a dictionary variable with values to use for template of objects. You must use the same names defined in the Centreon WebAPI documentation
Sample values for the variable configuration
:
cg:
- {
'name': 'testers',
'alias': 'Testers contacts'
}
contacts:
- {
'name': 'Test contact One',
'alias': 'test01',
'email': 'test01@test.centreon.com',
'password': 'easypass',
'admin': '0',
'gui': '1',
'language': 'en_US',
'auth': 'local',
'state': 'enabled' # enabled, disabled, absent
}
host:
- {
'name': 'test01',
'alias': 'Server teste 01',
'address': '127.0.0.1',
'template': 'generic-active-host-custom',
'instance': 'central',
'hostgroup': '',
'state': 'enabled' # enabled, disabled, absent
}
You can create catalogs to add a set of objects directly to Centreon, or you can create the objects into separate catalogs for each host you add using Puppet.
For example, to create a host with a webserver service with Nginx, you can have a catalog as defined here: deploy-nginx.pp
...
We may have a situation where Puppet may not have access directly to Centreon, only through a host that is located between the Puppet network and the DMZ where the Centreon is located. For these scenarios, you will either have to use a specific host or use the services client that Centreon will monitor.
(Coming soon)