Best practices: “How to develop or extend the Centreon Plugins”

This post is also available in: French

In 2012, we presented the best practices for developing a monitoring plugin for your Centreon platform. Meanwhile, our team has developed a new ecosystem calledCentreon Plugins” to management monitoring plugins.

Although the previous article is no longer relevant, the basic concepts of development are still those in force:

  • return code of host’s plugin (UP, DOWN, UNREACHABLE, UNKNOWN) ;
  • return code of service’s plugin (OK, WARNING, CRITICAL, UNKNOWN) ;
  • output’s management (output également appelé short output, et long output) ;
  • perfdata’s management ;
 Today, we created an ecosystem based on:
  • main script (« centreon_plugin.pl ») ;
  • libraries for hardware, os, network equipment, storage, databases or applications ;
  • each libraries has a list of indicators to monitor.

Thus, this system allows to easily extend existing checks by modifying an existing indicator (“mode”) or creating a new one. Similarly, it is quite possible to create a new library to extend the possibility of catalog offered by this ecosystem.

Nowadays (2015/06/09), 143 libraries are available:

  • 46 libraries to monitor applications (Apache, Asterisk, Citrix, MS Active Directory, MS Exchange, MS IIS, Nginx, Tomcat, VMware, …) ;
  • 5 libraries to monitor databases (IBM Informix, MS SQL Server, MySQL, Oracle, PostgreSQL) ;
  • 21 libraries to monitor hardware (PDU, APC, UPS, Cisco, Dell, HP, IBM, Sun, Sensormetrix, …) ;
  • 40 libraries to monitor network (Alcatel, Aruba, Bluecoat, Brocade, Checkpoint, Cisco, Dell, F5, Fortinet, HP, Juniper, Radware, Riverbed…) ;
  • 10 libraries to monitor os (Aix, FreeBSD, Linux, Solaris, Windows, …) ;
  • 20 libraries to monitor storage  (Dell, EMC, HP, IBM, Netapp, Panzura, Qnap, Synology, Violin, …) ;
  • 1 SNMP standard library.

notice : the following command allows to list all available libraries: “perl centreon_plugins.pl –list-plugin | grep PLUGIN | sort”

Libraries are updated frequently both by CENTREON team or by community. Recently, we have written documentation about how to use Centreon plugins and how to develop / extend libraries; both French and English. So therefore you have no excuse to start your development!!!

This post is not intended to replace the very complete documentation but lead you on the methodology to start your development.

The Centreon Plugins repo is located on github. You have to create an account and to fork main project to start your development and follow documentation.

When your developments is performed you have to submit a pull request on github to the original repo. Our team will analyse your code and accept or not your changes. If changes are not validated a discussion will start to define the best way to perform change.

Let start your developments!

Leave a Reply