Skip to content

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 5 framework.

The frontend is based on an Angular and CoreUI stack.

We recommend JetBrains PHPStorm as your IDE and Mozilla Firefox as your Browser.

The sample code is available on GitHub:

Prerequisites

This document focuses exclusively on the development of modules for openITCOCKPIT. Prior experience with CakePHP and Angular is strongly recommended before attempting to create custom modules.

Working directory

The working directory for openITCOCKPIT is located at /opt/openitc/frontend. Ensure you navigate to this directory before starting your work. Using Git to track your changes is also recommended.

Activating debug mode

Important

Be aware that enabling debug mode can lead to data leaks and the loss of sensitive information.

By default, openITCOCKPIT runs in production mode. To display detailed error messages, you must enable debug mode.

To do this, open the file /etc/nginx/openitc/master.conf and set the parameter OITC_DEBUG from 0 to 1.

fastcgi_param OITC_DEBUG 1;
In order for your changes to be enabled, you must execute the following command:

openitcockpit-update --no-system-files

Important

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:

openitcockpit-update