I am trying to use only CLI to install centreon, I don't want to use the web interface. ( I am trying to create an Ansible role who install centreon) Is there a methode to do the web interface part via CLI ?
Is there a possibility for configurating via CLI and not by web interfaces for installing Centreon?
1.4k views Asked by Hasoke At
1
Centreon CLAPI aims to offer (almost) all the features that are available on the user web interface in terms of configuration, through a command-line interface.
The main features are:
All actions in Centreon CLAPI will require authentication, so your commands will always start like this:
Obviously, the -u option is for the username and the -p option is for the password. The password can be in clear or the one encrypted in the database.
Here is an example for a HOST object (Object name: HOST)
In order to list available hosts, use the SHOW action:
In order to add a host, use the ADD action:
Required parameters:
Order Description
1 Host name
2 Host alias
3 Host IP address
4 Host templates; for multiple definitions, use delimiter |
5 Instance name (poller)
6 Hostgroup; for multiple definitions, use delimiter |
In order to delete one host, use the DEL action.
You can retrieve all the CLI instructions online in the official doc. https://documentation.centreon.com/docs/centreon/en/19.04/api/clapi/index.html
I also found a useful Ansible Centreon playbook on Github: https://github.com/centreon/centreon-iac-ansible