1. 程式人生 > 實用技巧 >cacti外掛安裝(二)

cacti外掛安裝(二)

一、安裝外掛 NTOP外掛

[[email protected]~]# useradd -M -s /sbin/nologin -r ntop

[[email protected] ntop]# cd ntop/

[[email protected] ntop]# ./autogen.sh --with-rrd-home=/usr/local/rrdtool/ --disable-snmp


configure: error: The LBL Packet Capture Library, libpcap, was not found!


[[email protected] ntop]# yum install libpcap*


在次配置出現提示:
[[email protected] ntop]# ./autogen.sh --with-rrd-home=/usr/local/rrdtool/ --disable-snmp


configure: error: Unable to find RRD at /usr/local/rrdtool: please use --with-rrd-home=DIR

[[email protected] ntop]# ./autogen.sh --with-rrd-home=/usr/local/rrdtool-1.3.6/ --disable-snmp

[[email protected]

~]#make

[[email protected] ~]#make install

[[email protected] share]# chown -R ntop:ntop /usr/local/share/ntop/

[[email protected] share]# chown -R ntop:root /usr/local/var/ntop/



[[email protected] ntop]# ntop –A //為admin設定密碼;


[[email protected] ntop]# ntop -i eth0 -d -L -u ntop //啟動ntop

Tue Mar 22 14:34:27 2011 NOTE: Interface merge enabled by default

Tue Mar 22 14:34:27 2011 Initializing gdbm databases

輸入 http://IP:3000/ 就可以出現頁面了


下面要把ntop與CACTI整合;



[[email protected] plugins] # tar -zxvf /usr/local/src/soft_pack/0.8.7e/ntop-0.1.tar.gz

#vi /etc/rc.local

/usr/local/bin/ntop -i eth0 -d -L -u ntop & > /dev/null //開機自啟動;

按照其他外掛的安裝方法來安裝;




二、安裝weathmap 外掛

http://www.network-weathermap.com/releases/0.97a 下載地址

安裝方法可參考:


http://www.network-weathermap.com/manual/0.92/pages/install-cacti-editor.html

安裝過程

# unzip php-weathermap-0.97a.zip //解壓weathmap到cacti/plugins;

[[email protected] include]# vi global.ph //編輯global.php 啟用外掛;

# cd weathermap/ //進入到cacti/plugins/weathmap

[[email protected] weathermap]# chown cacti output/

[[email protected] weathermap]# ll -d output/

drwxr-xr-x 2 cacti root 4096 Mar 10 2010 output/

[[email protected] weathermap]# cp editor-config.php-dist editor-config.php

[[email protected] cacti]# ps aux |grep httpd //可以看到httpd 的使用者是daemon;

[[email protected] weathermap]# chown daemon configs/

[[email protected] weathermap]# ll -d configs/

drwxr-xr-x 2 daemon root 4096 Mar 10 2010 configs/



[[email protected] weathermap]# vi editor-config.php //編輯配置檔案,修改cacti的實際路徑



14 $cacti_base = '/usr/local/LAMP/apache2/htdocs/cacti';

20 $cacti_url = "http://192.168.250.39/cacti/";

30 $mapdir=$cacti_base.'/plugins/weathermap/configs';

36 $ignore_cacti = FALSE;



[[email protected] weathermap]# vi editor.php //否則weathmap點選edit會報錯,根據提示也會讓你去修改這個檔案的值的;

$ENABLED=true;



登入cacti,在介面上會出現Weathermaps圖示;

點選 Console---Management--Weathermaps --- Weathermap Editor在一個空白頁面上編輯影象




· Add Node :新增節點

· Add Link :新增節點間的鏈路;

· Position Legend ;新增圖例

· Position Timestamp : 新增製表時間



做好圖之後在:

Console---Management--Weathermaps ---add //添 加剛才建立圖時建立的名字;
就能出現圖了






本人制作了兩個主機之間的網絡卡的流量圖,也不知道做的對不對。
有誰對weathermap瞭解的請指點指點 多謝


轉載於:https://blog.51cto.com/summervast/524190