阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

RHEL 6.3下Cacti flowview 安装和配置使用

134次阅读
没有评论

共计 2611 个字符,预计需要花费 7 分钟才能阅读完成。

测试环境:

1、RHEL 6.3 X64 最小化安装
2、已经安装 cacti 0.8.8
3、已经配置 epel 源
4、已经在 cisco 路由器上配置好 flow-export 了。

安装和配置过程:

1、安装 flow-tools

yum install flow-tools

2、install flowview

wget http://docs.cacti.net/_media/plugin:flowview-v1.1-1.tgz

tar zxvf plugin:flowview-v1.1-1.tgz

mv plugin:flowview-v1.1-1.tgz flowview-v1.1-1.tgz

cp flowview /var/www/html/cacti/plugin

cp /var/www/html/cacti/plugin/flowview/flow-capture /etc/init.d/flow-capture

vi /etc/init.d/flow-capture

找到下面的内容并更改为如下:

$cacti_base = ‘/var/www/html/cacti’;

2.5 修改配置:

vi  /var/www/html/cacti/include/config.php 如下:

$plugins = array();

$plugins[] =  ‘flowview’;

保存退出。

3、登录 cacti,找到 Configuration-》Plugin Management》安装 flowview。

然后在 Configuration-》setting-》Misc 中,找到 Flows Directory,并填入路径,比如 /var/netflow. 这个路径只要存在即可。主要是用来放置获取到的数据包的。

如果你的主机上没有这个文件夹。创建即可:

mkdir -p /var/netflow

然后点击“save”

4、启动数据包获取

/etc/init.d/flow-capture start

ps -ef| grep flow

root    11333    1  0 13:17 ?        00:00:00 /usr/bin/flow-capture -w /var/netflow/router/router 0/0/2055 -S5 -V5 -z 0 -n 1439 -e 2880 -N -1

5、在 cacti 中,点击上面的“flow”按钮,然后在 listeners 中新建一个 listener,保存。比如 router。

6、按道理应该在 cacti 的 flow 插件中 de fliter 查看数据包捕获的情况。但实际情况下,根本看不到结果。目前没有找到原因。作为替代方案,我们可以使用如下方法查看捕获情况。

在 cacti 的 /var/netflow 目录中,你会发现已经出现一个 router 文件夹。其中还有以日期命名的文件夹。里面有很多文件。比如我的:

ll /var/netflow/router/2014-10-25/
ft-v05.2014-10-25.134601+0800
ft-v05.2014-10-25.142601+0800
ft-v05.2014-10-25.150601+0800

如何查看其中的内容呢?方法如下:

flow-cat /var/netflow/router/2014-10-25/ft-v05.2014-10-25.132801+0800 | flow-stat -f8
#  — —- —- Report Information — — —
#
# Fields:    Total
# Symbols:  Disabled
# Sorting:  None
# Name:      Destination IP
#
# Args:      flow-stat -f8
#
#
# IPaddr        flows                octets                packets
#
172.16.11.213    2                    432                  3
192.168.40.1    1                    100000                1000
172.16.11.211    10                    12451                356445

最后:cisco 哪些设备可以启用 flow-export 呢?

1、路由器上都是可以的

2、从 4500 路由器开始向上都是可以的。3750 就别想了。

在路由器上如何配置呢?

interface F0/3
ip address 172.16.11.212 255.255.255.0
ip route-cache flow
ip flow ingress
ip flow egress

ip flow-export version 5
ip flow-export destination 172.16.22.100 2055
ip flow-cache timeout active 5
ip flow-cache timeout inactive 15

————————————– 分割线 ————————————–

RHEL6.4 中使用 Cacti+Spine 监控主机实现发送邮件报警 http://www.linuxidc.com/Linux/2013-11/92795.htm

RHEL6.4 中使用 Cacti+Spine 监控远程主机 http://www.linuxidc.com/Linux/2013-11/92796.htm

CentOS 5.5 完整安装 Cacti+Spine http://www.linuxidc.com/Linux/2011-12/49701.htm

CentOS 6 下 Cacti 搭建文档 http://www.linuxidc.com/Linux/2013-06/86595.htm

RHEL5.9 下 Cacti 监控部署详解 http://www.linuxidc.com/Linux/2013-06/85427.htm

CentOS 6.3 下 Cacti 安装详解 http://www.linuxidc.com/Linux/2013-05/84279.htm

CentOS Linux 下快速安装配置 Cacti 中文版 http://www.linuxidc.com/Linux/2013-03/81627.htm

————————————– 分割线 ————————————–

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-20发表,共计2611字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中