This post is also available in: French
Merethis presents from Gentilly (France) a new plugin system; this system must replace the former Centreon plugins.
Some works are better than a long speech, we are going to try and install this plugin system.
Download and unzip the following archive on a Linux / BSD (or other) server of your choice: centreon-plugins-beta-1.0.tar
To enjoy the full functionalities of the system, you can install the following Perl dependencies:
- “Memcached::libmemcached” (http://search.cpan.org/~timb/Memcached-libmemcached-1.001701/libmemcached.pm): can store data on “memcached” sever;
- “JSON” (http://search.cpan.org/~makamaka/JSON-2.90/lib/JSON.pm): can give an plugin JSON output ;
- “XML::LibXML” (http://search.cpan.org/~shlomif/XML-LibXML-2.0107/LibXML.pod): can a plugin XML output;
- “SNMP” (http://www.net-snmp.org/).
Dependence “SNMP” is an important development of Centreon plugins. Plugins will no longer use the venerable library “Net :: SNMP” for several reasons:
- no changes since 2010 (The SNMP v3 authentication by certificate is for example not possible);
- different behavior of the library between SNMP v1 and SNMP v2.
The monitoring plugins carries out from the same programm: “centreon_plugins.pl”.
The principle is simple. The user must specify the “plugin” (option ‘–plugin’) and the monitoring required for this plugin (option ‘–mode’):
$ perl centreon_plugins.pl --plugin=os::linux::plugin --mode=load --host 127.0.0.1
OK: Load average: 0.00, 0.02, 0.00| 'load1'=0.00;;;0;; 'load5'=0.02;;;0;; 'load15'=0.00;;;0;;
You can know the available modes with the option ‘–list-mode':
$ perl centreon_plugins.pl --plugin=os::linux::plugin --list-mode
The option ‘–help’ can view the arguments of a mode:
$ perl centreon_plugins.pl --plugin=os::linux::plugin --mode=load --help
Functionnalities in bulk
This plugin system allows (non-exhaustive list) :
- about the usage :
- Different output formats: options’ – output-xml ‘or’ – output-json;
- Running with a different user: option ‘- runas;
- Displaying Execution Perl errors.
- about the development :
- To associate a mode to several plugins: for example, a mode that checks SNMP network interfaces can be associated to a “Linux” or “Cisco” plugin;
- Simplify the development of plugins including SNMP;
- Version and support management (using the documentation “Pod”);
- Retention file management (stored on a local disk or a “memcached” server)..
Besides this new system, you already find the following plugins:
- “Linux” check (SNMP) (–plugin=os::linux::plugin) ;
- “Windows” check (SNMP) (–plugin=os::windows:plugin) ;
- “Bluecoat” check (SNMP) (–plugin=network:bluecoat::plugin) ;
- “MySQL” check (SQL) (–plugin=database::mysql::plugin).
You have no excuse to try it.
All feedbacks (critical or encouragement) are highly appreciated.
Leave all your comments on https://forge.centreon.com/
Soon, a new post will explain how to develop their own plugins.
The bravest ones can already read the source code and see the code in the “example” directory.
Incoming search terms:
- centreon plugins