Plugin Development

Overview

Cacti Plugins allow users of Cacti to extend it's functionality into areas that the core Cacti developers have not. They were written based off of the work of Jimmy Conner from the Squirrel Mail project years ago. They allow developers to augment the Cacti Website, and it's polling processes to extend Cacti's reach.

There are a number of popular plugins including:

In theory, these plugins can be integrated into Cacti very simply, and removed without breaking Cacti. However, it must be noted to always review the plugins documentation before you start to use it.

Legacy Plugins Notice

Plugins written for Cacti 0.8.x require modifications in order to be compatible with Cacti 1.x. There are several changes that all plugin developers need to be aware of. Any of the Cacti Group maintained plugin can be used as reference plugins for driving your plugin migration to the 1.x framework and are available on Github.

Plugin Migration

In order to migrate your legacy Cacti plugins, there are several steps that need to be taken. This guide will provide a brief synopsis of changes that are required to make your plugins compatible with Cacti 1.0.

Migration Steps

Each of the following steps should be followed to migrate your plugins. Some of these changes are optional, and some are mandatory. We will start with the list of steps that must be required. Then, in future sections, we will provide details on performing each step.

Required Steps

Optional Steps

INFO File structure

The INFO file follows the INI file specification. An example INFO file includes the following sections:

As mentioned, there are some very good examples of how to create or migrate plugins in the various Cacti plugins included on The Cacti Groups GitHub site. Also, for a very simple Cacti page, you can look at vdef.php as an example. You can use this as a template to manage a table using the Cacti framework. For a simple plugin example, please review the gexport plugin.

Charting Functionality

Several JavaScript based HTML5 Charting packages have been included in Cacti in an effort to assist plugin developers who wish to use graphing API's in their plugins other than RRDtool.

Logging

For developers using the Cacti framework, it is important to note that additional controls on logging have been added. Debug logging can now be controlled at not only a global level, but now per plugin, per device and even per file.


Copyright (c) 2004-2022 The Cacti Group