This post is also available in: French
We are developing our major release of Centreon : the version 3.0. The UI which is a major part of this development includes a brand new feature : the display hooks.
What is it all about ?
We set up a hook mechanism in the web interface so that modules can be better integrated in our software. In a nutshell, modules will have an API that allows them to add visual elements almost anywhere in the interface. We will add more hooks as we go. This API will be documented soon and available on the documentation platform.
Then, you will find the complete list of hooks you could use to plug your own visual elements onto the user interface.
Let’s pretend you are developing a module for your company and this module needs a specific information on each host such as GPS coordinates, type of hosts (type 1, type 2, type 3, etc) or host brand (Inventel, Sagem, etc).
Currently, to configure all this information in Centreon, you have to develop a new form with all parameters (creation, update, deletion). You would have to make a specific listing page dedicated to the additional information. However, this information is displayed only in your specific view; that makes your module not so user-friendly as it is displayed in a very limited set of pages.
The hooks on Centreon 3 will allow to extend the form with a small piece of code.
You can easily add new extra fields to the existing host form via the Centreon API.
A hook would allow you to display a new column in the existing host lists that could be on the configuration pages or the monitoring pages or whatnot. Don’t get me wrong, you’ll still have to undertake the development but the amount of lines of code will be tremendously reduced as compared to what you would have done in the former version of Centreon. Moreover, by using the API, your development will be compatible with the future versions of Centreon most likely. It will even be possible to deactivate or reorder any given display hook through the administration interface. A very promising feature, that is…
In short, the display hooks will help you make a better integration of your modules. Note that in Centreon 3, everything is split into modules: Administration, Object Configuration, Engine Configuration, Broker Configuration, Monitoring consoles, Authentication etc…
The display hooks will be used even by our core modules in case you would want your own core modules without breaking everything apart !
Please comment on this feature and let us know what you think.