Announcement

Collapse
No announcement yet.

Automate host addition / suppression in Centreon with Ansible (through CLAPI)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Automate host addition / suppression in Centreon with Ansible (through CLAPI)

    Hi everyone,

    6 months ago, I have made a prototype of an Ansible module that uses CLAPI to help you automate the addition of hosts in your centreon server :
    • when the administrator create a virtual machine (with Ansible also ;-p), the host is registered inside Ansible hosts file
    • then he only has to launch the playbook for centreon on the whole hosts file, and only the newly added servers are imported in centreon

    So far it has allowed me to entirely automate my monitoring (with good templates) with Ansible. I now have a little less than 200 hosts, 10 templates or so (windows, esxi, vcenter, linux, ...), all automatically managed.

    You can get the code for the module on github (not yet ready for integration in Ansible code base) :
    Also, for french Readers, I've written a blog post about it, which explain why I had to create a module for this rather than juste using an Ansible call to CLAPI with the "shell" module.
    Hope this can be useful !
Working...
X