Cacti版本:0.8.7g
一、下载reportit插件
二、安装插件
cacti程序安装在/var/www/html目录
解压程序:
# cd /var/www/html/plugins
# tar xvf reportit_v073.tar.gz
# chown -R apache.apache reportit
# chmod -R 755 reportit
修改配置文件:
# cd /var/www/html/include
# vim plugins.php
<?php
/*
* Copyright (c) 1999-2005 The SquirrelMail Project Team (http://squirrelmail.org)
* Licensed under the GNU GPL. For full terms see the file COPYING.
*/
global $plugin_hooks, $plugins_system, $plugins;
$plugin_hooks = array();
$plugins_system = array(‘settings’, ‘boost’, ‘dsstats’);
function use_plugin ($name) {
global $config;
if (file_exists($config['base_path'] . “/plugins/$name/setup.php”)) {
include_once($config['base_path'] . “/plugins/$name/setup.php”);
$function = “plugin_init_$name”;
if (function_exists($function)) {
$function();
}
}
}
/**
* This function executes a hook.
* @param string $name Name of hook to fire
* @return mixed $data
*/
if (!is_array($plugins)) {
$plugins = array();
$plugins[] = “reportit”;
}
$oldplugins = read_config_option(‘oldplugins’);
$oldplugins = explode(‘,’, $oldplugins);
$plugins = array_merge($plugins, $oldplugins);
/* On startup, register all plugins configured for use. */
if (isset($plugins) && is_array($plugins)) {
foreach ($plugins as $name) {
use_plugin($name);
}
}
重启httpd:
# /etc/init.d/httpd restart
安装、启动插件:
在”配置”–>”插件管理”–>找到”reportit”,点击”安装”按钮进行安装,
点击”启用”按钮,将插件启用,
三、导入报表模板
下载流量、磁盘空间的模板,其他模板可以自己进行跟进需要进行新增:
在”Templates”–>”Report Templates”处,点击”Import”按钮,选择需要导入的模板,点击”Upload”导入模板,如下图:
四、添加、查看报表
点击 “控制台 -> Reports—>Report Configurations –>Add”
转载请注明:爱开源 » Cacti安装reportit报表插件






