Forge Home

centreon_register

Register a host to Centreon

5,174 downloads

1,543 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

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
  • , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'romgo-centreon_register', '0.3.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add romgo-centreon_register
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install romgo-centreon_register --version 0.3.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

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