Question

Installation of the Centreon plugins from the Github repository

  • 24 November 2022
  • 2 replies
  • 782 views

Hi,

When looking in the centreon/centreon-plugins Github repository I can’t see the same files which I have in the /usr/lib/centreon/plugins/ directory after an installation from the RPM packages.

My knowledge of Perl is very limited, but I suppose there is some kind of install process in order to be able to use the plugins. I looked at the README but didn’t find any. I don’t think that just cloning the repository would permit me to use the plugins, but maybe I’m wrong? If so, how to use them?

I’d like to be able to do that in order to test the very last version of the plugins without having to wait for release and packaging.

I suppose I’d have to do so if I’d like to participate in the development of the plugins. The README, in the  Basic Usage section, shows an example with running the “centreon_plugins.pl” script. Would it work just after I cloned the repository? I didn’t try because the README also tells : “I have finished the install section and I want to monitor a Linux in SNMP”, so what is this “Install section”?
Moreover, running the plugins like this (if possible), would not be suitable to test the plugins directly in Centreon I guess.

It may be obvious for a experienced Perl developer but it isn’t to me.


2 replies

Userlevel 5
Badge +14

hello

a quick thing to know : centreon_plugins.pl and all the plugins from the rpm are the same “command line” (the one from the rpm is a single perl package, but all the parameters you pass to a package works with the centreon_plugins.pl)

 

what I usually do is do a clone or pull to get the latest copy, I then go get the command I already have from the web UI, then just replace the first part with “./centreon_plugins.pl” and leave the rest as is

that is just for testing existing plugin

 

if you want to use the git clone “live” in your centreon, be aware it may have consequence as bug can happen,  here is what I do 

(install git if not already done)

go to the plugin directory /usr/lib/centreon/plugins/

once there, make a git clone https://github.com/centreon/centreon-plugins.git

this create a sub folder “centreon-plugins”

 

now in your command manager (configuration / Command / check menu) you can make your own command (copy the locked ones for example) but instead of using 

$CENTREONPLUGINS$/centreon_mssql.pl --plugin=database::mssql::plugin ….

you can use

$CENTREONPLUGINS$/centreon-plugins/centreon_plugins.pl --plugin=database::mssql::plugin …

(I only do that with plugins I need to code or tweak myself, you should not do that if you have support and paying plugin packs)

 

Thank you @christophe.niel-ACT , I’ll try it.

>if you want to use the git clone “live” in your centreon, be aware it may have consequence as bug can happen

Of course. It’s for test. But for a real installation from the source I could use the last release tag I guess.

I’d still like to know how I can generate the Perl scripts present in /usr/lib/centreon/plugins/ (the “single Perl packages” as you called it).

 

Reply