pgup12 发表于 2019-1-26 12:33:13

cacti插件安装(二)

  一、安装插件 NTOP插件

# useradd -M -s /sbin/nologin -r ntop

# cd ntop/

# ./autogen.sh --with-rrd-home=/usr/local/rrdtool/ --disable-snmp


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

# yum install libpcap*

在次配置出现提示:
# ./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

# ./autogen.sh --with-rrd-home=/usr/local/rrdtool-1.3.6/ --disable-snmp

#make

#make install

# chown -R ntop:ntop /usr/local/share/ntop/

# chown -R ntop:root /usr/local/var/ntop/



# ntop –A   //为admin设置密码;


# ntop -i eth0 -d -L -u ntop   //启动ntop

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

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

输入 http://IP:3000/ 就可以出现页面了


下面要把ntop与CACTI整合;


# 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;

# vi global.ph         //编辑global.php 启用插件;

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

# chown cacti output/

# ll -d output/

drwxr-xr-x 2 cacti root 4096 Mar 102010 output/

# cp editor-config.php-dist editor-config.php

# ps aux |grep httpd      //可以看到httpd 的用户是daemon;

# chown daemon configs/

# ll -d configs/

drwxr-xr-x 2 daemon root 4096 Mar 102010 configs/



# 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;



# vi editor.php         //否则weathmap点击edit会报错,根据提示也会让你去修改这个文件的值的;

$ENABLED=true;



登录cacti,在界面上会出现Weathermaps图标;

点击 Console---Management--Weathermaps --- Weathermap Editor在一个空白页面上编辑图像




·Add Node :添加节点

·Add Link :添加节点间的链路;

·Position Legend ;添加图例

·Position Timestamp : 添加制表时间
http://blog.运维网.com/attachment/201103/163608904.jpg
  

做好图之后在:

Console---Management--Weathermaps ---add //添 加刚才创建图时创建的名字;就能出现图了
http://blog.运维网.com/attachment/201103/163631270.jpg
  




本人制作了两个主机之间的网卡的流量图,也不知道做的对不对。有谁对weathermap了解的请指点指点 多谢






我在鄱阳湖边 发表于 2019-2-21 18:54:26

学习了
页: [1]
查看完整版本: cacti插件安装(二)