centreon_register

pdk
Register a host to Centreon

Hugo

romgo

4,473 downloads

1,255 latest version

5.0 quality score

Version information

  • 0.3.3 (latest)
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.2.0
  • 0.1.0
released Oct 16th 2019
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
  • Windows
    ,
    CentOS
    ,
    OracleLinux
    ,
    RedHat
    ,
    Scientific
    ,
    Debian
    ,
    Ubuntu

Start using this module

Documentation

romgo/centreon_register — version 0.3.3 Oct 16th 2019

centreon_register

Build Status Puppet Forge Downloads

Table of Contents

  1. Description
  2. Setup - The basics of getting started with centreon_register
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. 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