Ceci est une ancienne révision du document !
Table des matières
Plugin developer guide
Zabbix Report
This guide is aimed at moodle plugins developpers that want implement Zabbix Report compatibility so the plugin can be discovered by the Zabbix Report and have indicators emission handled by the sending tasks.
Note that only the Pro version of the Zabbix Report plugin with a valid license key will support this integration. Free releases of the report plugin will not provide this extension capability.
Plugin registration method
The plugin can be registrated within the Zabbix Report among two scenarios:
- The third-party plugin is installed AFTER the Zabbix Report has been installed.
- The third parry-plugin is installed BEFORE the Zabbix Report plugin.
Note : note that if you install a complete moodle preequiped with third-party plugins, then both cases might happen depending on the pluginlist order.
Registration function in lib.php
You will add to your main lib.php file the following function:
/**
* This function is a "late" callback, when zabbix report
* is installed AFTER this plugin has been installed. It is called
* by the Zabbix Report installer to register all compatible plugins.
*/
function <plugin_frankenname>_zabbix_register() {
global $CFG;
if (is_dir($CFG->dirroot.'/report/zabbix')) {
include_once($CFG->dirroot.'/report/zabbix/xlib.php');
report_zabbix_register_plugin('<plugintype>', '<pluginname>');
}
}
Back to Zabbix Report index - Back to plugin index - Back to catalog
