Solved

How to properly deploy a custom plugin pack

  • 16 August 2023
  • 2 replies
  • 179 views

Badge +1

Hi fellow community members,

I recently installed a Centreon 23.04 server on a Debian 11 host in order to monitor a specific appliance.

I wrote some plugins (in Python) to monitor the appliance metrics, created related commands, service templates and host templates.

Then I created a bunch of yaml configuration files (for templates, commands...) with the aim to make a plugin pack of it.

So I have specifics python plugins, related yaml files for templates and commands, all packaged in a zip file.

Is it the good way to make a plugin pack ? I can’t manage to find a concrete and clear documentation about the subject in the Centreon documentation.

If not, am I far from my goal ?

Other concern how to deploy this pack on others Centreon instances ? On the extension manager page, I don’t see any upload interface or something like that. Am I missing something ?

 

Thanks in advance.

Sebastien

icon

Best answer by christophe.niel-ACT 16 August 2023, 19:37

View original

2 replies

Userlevel 5
Badge +14

Hello

you will not be able to create “plugin pack” with this method, a plugin pack is something centreon developper make and publish, based on the centreon-plugins community plugin

all is developped in perl on this community plugin, and you don’t have access to the “plugin pack” generation

 

that being said, you almost have everything to do your own plugin pack in a sense, what you want to look into is “CLAPI” which will allow you to create everything you need

  • command
  • service template
  • host template
  • all the macro

it is shell command you run on your central server, it takes a bit of fiddling to get what you need, but that’s the only way.

here is the doc : Command Line API (v1) - CLAPI | Centreon Documentation 

you would need to put thing in right order, so first the commands, then the service template, then the host template, then discovery if you made some

(you need to create the object first, then add the properties of the object one by one, this can be scripted from your yaml)

 

the correct way would be of course to code your plugin using the centreon developping guidelines Getting started - Plugin development | Centreon Documentation , put a merge request and provide the information neeeded for centreon to make a plugin pack

 

good luck

Badge +1

Hi Christophe,

Thank you for your kind answer even if it’s not good news for me 😅

I had already began working on a solution using CLAPi as a plan B solution. It seems the plan B has just became plan A.

Such a pity, I wanted to do something more straightforward that you could just upload on the web UI. So as far as I understand there is no way to do something like that in an autonomous mode without requesting Centreon team ?

 

Reply