一、下载需要的安装包

下载有两种方法:

1、下载到本地,通过挂载安装:

主下载页面:http://docs.cacti.net/

php-weathermap-0.97a.zip

settings-v0.71-1.tgz

thold-0.4.1.tar.gz

monitor-v1.3-1.tgz

2、直接在centos里面通过wget命令下载安装:

wget http://docs.cacti.net/plugin:settings/settings-v0.71-1.tar.gz

wget http://www.network-weathermap.com/files/php-weathermap-0.97a.zip

wget  http://docs.cacti.net/plugin:monitor/monitor-v1.3-1.tgz

两种方法都可以正常运行,根据个人爱好,下面以wget下载为例来安装。

二、安装插件

1、进入cacti目录下,下载所需安装包

[root@localhost cacti]# cd /usr/share/cacti/

[root@localhost cacti]#  wget  http://docs.cacti.net/plugin:monitor/monitor-v1.3-1.tgz

[root@localhost cacti]#  wget http://docs.cacti.net/plugin:settings/settings-v0.71-1.tar.gz

[root@localhost cacti]#  wget http://www.network-weathermap.com/files/php-weathermap-0.97a.zip

2、解压安装包,将解压文件移动到cacti/plugins/目录下

[root@localhost cacti]# tar zxvf settings-v0.71-1.tar.gz

[root@localhost cacti]# mv settin~1.tgz /usr/share/cacti/

[root@localhost cacti]#  tar zxvf thold-0.4.1.tar.gz
[root@localhost cacti]# mv thold /usr/share/cacti/plugins/

[root@localhost cacti]# unzip php-weathermap-0.97a.zip

[root@localhost cacti]# mv weathermap /usr/share/cacti/plugins/

[root@localhost cacti]# cd plugins/
[root@localhost plugins]# ls
index.php  monitor  settings  simple.conf  thold  weathermap

3、进入然后进入cacti的Plugin Management上的页面对插件配置,如下图所示:

centos下cacti之monitor、thold、setting、weathermap安装_monitor

4、点击插件前蓝色下箭头安装插件,点击绿色箭头使能(enbale),变成一个矩形框了,你会发现图中的"Status”那栏变为“active”,此时插件就安装完毕了。

centos下cacti之monitor、thold、setting、weathermap安装_monitor_02

下来就是监控主机了console---device---add--添加信息--create创建来监控主机:如下图:

centos下cacti之monitor、thold、setting、weathermap安装_settings_03

友情提示:cacti新版本无需进行如下配置文件设置,老版本可能需要(旧版本还需要导入各自的sql文件)激活monitor插件,

修改配置文件cacti目录下的include/config.php)。

vi usr/share/cacti/include/config.php

     $plugins = array();,在此行下面加入:
     $plugins[] = ‘monitor';
     $plugins[] = ‘settings';
     $plugins[] = ‘thold';

老版本在安装settings与thold插件时,先安装settings插件,后安装thold插件。因为settings插件提供email的相关设置,后期通过对setting的设置来发送邮件。

5、weathermap的配置

插件安装完毕后,进入weathermap视图,点击edit,如出现错误,需要修改weathermap/editor.php文件,将$ENABLED=false;改为$ENABLED=ture;

centos下cacti之monitor、thold、setting、weathermap安装_monitor_04

然后修改weathermap/configs/ weathermap/output/宿主权限:

[root@localhost weathermap]# chown -R apache:apache configs/

[root@localhost weathermap]# chown -R cacti:apache output/

修改完毕后就可以创建配置文件,添加图形。

若出现不能编辑图形等问题,请关闭SElinux.

[root@localhost configs]# setenforce 0