Skip to main content

I have multiple Centreon instances and wanted to provide a standard configuration to my instances.

Currently i am making use of the CLAPI v1 and was considering using the API REST as it seem to be the target now, but as what i want to deploy is provided as a rolling release, i’m wondering if there is a better way to provide commands and templates in a standard way in “readonly” mode and to update them as i roll updates.

I wish to deploy that as i deploy configuration files through rpm packages, my hope is that there is some kind of config.d folder that i could make use of to deploy my files so they are added to the available commands and services.

 

Anyone making this kind of updates ?

A little heads up maybe ? 

When you have standard commands, service tempaltes and hosts templates to deploy to a centreon, the only way of doing so i found is the export / import function.

Feel free to share how you proceed so we can discuss what’s the best way to do so.


Hello

I have use the CLAPI cmd line (/usr/share/centreon/bin/centreon) to migrate a Centreon Central server from 21 to 24.

I have extracted from a backup file and reinject in the new server in the following order :
1) CMD
2) Host Templates - HTPL
3) Service Template - STPL
4) Host Group - HG
5) Service Group; - SG
6) Service Group members; - SG
 

After I have re-imported host & Service for all my Pollers :
6-HostOnly
6.1-HostParam
6.2-HostGroup
7-ServiceOnly
7.1-ServiceParam
7.2-ServiceMacro




Pierre


Hello

I have use the CLAPI cmd line (/usr/share/centreon/bin/centreon) to migrate a Centreon Central server from 21 to 24.

I have extracted from a backup file and reinject in the new server in the following order :
1) CMD
2) Host Templates - HTPL
3) Service Template - STPL
4) Host Group - HG
5) Service Group; - SG
6) Service Group members; - SG
 

After I have re-imported host & Service for all my Pollers :
6-HostOnly
6.1-HostParam
6.2-HostGroup
7-ServiceOnly
7.1-ServiceParam
7.2-ServiceMacro




Pierre

This is usually what i was basing myself as well.

Considering that the export/import feature was the closest to what i wanted to achieve, i versionned the TXT files from the centreon and was able to reinject this configuration, but it feels very verbose and easy to break anything if you need to edit something.

In addition it’s very hard to see dependencies between components with only Text files.

I start to wonder if that’s not an issue that anyone can have.


Hello

You have to export only the “Not locked” elements (ex for the command).

I have prefixed all my custom command like this → check_name_of_the_custom_cmd.

I an element is already existing you have a message.
If an element is missing (dependencies for example you have the message too.

I use Powershell to create separate files for each step (CMD, Host Templates, Service Template, Host Group,etc…..) and I import in the new Centreon in the order above.

Pierre

 


Hello

You have to export only the “Not locked” elements (ex for the command).

I have prefixed all my custom command like this → check_name_of_the_custom_cmd.

I an element is already existing you have a message.
If an element is missing (dependencies for example you have the message too.

I use Powershell to create separate files for each step (CMD, Host Templates, Service Template, Host Group,etc…..) and I import in the new Centreon in the order above.

Pierre

 

Makes sense, but you still make use of the import/export feature to be able to distribute your configurations ?

If so i suppose your powershell is building your txt file and then making an archive you can import ?

I am asking as the other solution is to directly inject the files inside of the CLAPI command line, so i wondered what you did use.


Reply