Files
Cactidocumentation/Plugin-Guidelines.md
T
2026-12-03 00:15:32 -08:00

1.6 KiB

Plugin Guidelines

Overview

Build against the Cacti branch you support. Use its core pages for request handling, navigation, and forms. Compare a maintained plugin that uses the same hooks, such as Monitor.

Plugin Creation

Start with the minimal reference plugin. To try a plugin with a visible page, download the example below and extract its example/ directory under plugins/ in a disposable installation. Open Console > Configuration > Plugins, install Example Plugin, and enable it. A user with the View Example realm can open the Example tab.

Example tab and page

The page displays The example page is enabled. If the tab is missing, check the plugin's status, hook registration, and the user's realm. See Creating a plugin.

Plugin Namespaces

Prefix global functions, settings, and plugin-owned tables with the directory name. Use a plugin-specific namespace for classes. Keep the lifecycle function names Cacti looks up, such as plugin_example_version(), in the global namespace.

Download the example plugin.

Publishing Your Plugin

Publish an archive that unpacks to the expected directory. Document the tested Cacti and PHP versions, dependencies, permissions, data collection behavior, and what happens to stored data during upgrade or removal. Test the archive itself on a fresh installation and test upgrading from the previous release.


Copyright (c) 2004-2026 The Cacti Group