Creating a new plugin
Now it is time for you to create your very first plugin. You will go through the different steps, from the concept of the plugin to its installation within Cacti.
The plugin will be quite simple, but will show you most of the common features and hooks of the plugin architecture.
File structure
All plugins should at least consist of index.php
, INFO
, and setup.php
files. These files are the minimum requirement for any plugin to work properly, but of course you should also consider adding a README file as further documentation to your plugin. You can find some sample plugins, such as the maint plugin, on the following GitHub page:
Concept and design
Let's assume that you want to display additional data such as a table at the end of each host graph. The data that is being displayed has the following requirements:
- Display the hostname and IP address
- Show serial and warranty Information
- Display a contact address (email)
- Free text/HTML can be added...