Creating a new openITCOCKPIT module¶
For this article you will need an openITCOCKPIT development environment. Read guide on how to create an openITCOCKPIT development environment.
This article contains the best practices for adding new features to openITCOCKPIT by creating a custom module. Developing your own module ensures that your system remains updatable and maintainable by our experts.
Getting started with development¶
The backend of openITCOCKPIT is written in PHP and uses the CakePHP 4 framework.
The sample code is available on GitHub: https://github.com/it-novum/openITCOCKPIT-ExampleModule
This document exclusively describes the development of modules for openITCOCKPIT. You must have experience with CakePHP and AngularJS before attempting to create any bespoke modules.
The working directory for openITCOCKPIT is
Make sure you are in this folder before you begin.
It is also recommended you use git for tracking your changes.
Activating debug mode¶
Be aware that enabling debug mode can lead to data leaks and the loss of sensitive information.
To do this, open the file
/etc/nginx/openitc/master.conf and set the parameter
fastcgi_param OITC_DEBUG 1;
In order for your changes to be enabled, you must execute the following command:
Again, be aware that enabling debug mode can lead to data leaks and the loss of sensitive information.
Deactivating debug mode¶
To deactivate debug mode in openITCOCKPIT, you must execute the following command: