Cacti+Nagios(六):Cacti整合Ntop
Ntop是一种监控网络流量工具
1、安装依赖软件
[root@nagios~]#cd/home/nagios[root@nagiosnagios]#yuminstalllibtoollibpcaplibpcap-develgdbmgdbm-develzlibzlib-devel[root@nagiosnagios]#wgethttp://mirror01.idc.hinet.net/EPEL/5Server/x86_64/GeoIP-1.4.8-1.el5.x86_64.rpm[root@nagiosnagios]#wgethttp://mirror01.idc.hinet.net/EPEL/5Server/x86_64/GeoIP-devel-1.4.8-1.el5.x86_64.rpm[root@nagiosnagios]#yum-y--nogpgchecklocalinstallGeoIP-*.el5.x86_64.rpm[root@nagiosnagios]#yum-y--nogpgchecklocalinstallettercap-*.rpm
2、安装Ntop
[root@nagiosnagios]#useradd-M-s/sbin/nologin-rntop[root@nagiosnagios]#wgethttp://down1.chinaunix.net/distfiles/ntop-4.1.0.tar.gz[root@nagiosnagios]#tarzxvfntop-4.1.0.tar.gz[root@nagiosnagios]#cdntop-4.1.0[root@nagiosntop-4.1.0]#./autogen.sh[root@nagiosntop-4.1.0]#make[root@nagiosntop-4.1.0]#makeinstall[root@nagiosntop-4.1.0]#chown-Rntop:ntop/usr/local/share/ntop[root@nagiosntop-4.1.0]#chown-Rntop:root/usr/local/var/ntop
3、配置Ntop
(1)为ntop的admin用户设置密码
[root@nagiosntop-4.1.0]#ntop-Aadmin123456
(2)启动ntop
[root@nagiosntop-4.1.0]#ntop-ieth0-d-L-untop
eth0是你的监控机用于捕获网络流量的网卡
(3)自动启动
[root@nagiosntop-4.1.0]#echo'ntop-ieth0-d-L-untop&>/dev/null'>>/etc/rc.d/rc.local
(4)防火墙添加信任端口3000
[root@nagiosntop-4.1.0]#iptables-IINPUT-ptcp--dport3000-jACCEPT[root@nagiosntop-4.1.0]#serviceiptablessave
(5)访问页面
http://localhost:3000
4、Cacti整合Ntop
[root@nagiosntop-4.1.0]#cd/home/nagios[root@nagiosnagios]#wgethttp://docs.cacti.net/_media/plugin:ntop-v0.2-1.tgz[root@nagiosnagios]#mvplugin:ntop-v0.2-1.tgzntop-v0.2-1.tgz[root@nagiosnagios]#tarzxvfntop-v0.2-1.tgz-C/var/www/html/cacti/plugins/[root@nagiosnagios]#vi/var/www/html/cacti/include/config.php$plugins[]='ntop';
在Plugin Management"中install和enable插件
在User Management中勾上View Ntop
在Settings、Misc中设置URL:http://localhost:3000
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。