ITPub博客

首页 > Linux操作系统 > Linux操作系统 > cacti+nagios 之cacti插件安装monitor和ntop(五)

cacti+nagios 之cacti插件安装monitor和ntop(五)

原创 Linux操作系统 作者:紫翼龙王夜 时间:2015-02-12 17:51:23 0 删除 编辑

设备在线状态监控插件,在cacti页面host中设置了的主机会在monitor页面显示在线状态,可以和thold插件配置报警.[root@nagios nagios]# wget http://docs.cacti.net/_media/plugin:monitor-v1.3-1.tgz
[root@nagios nagios]# tar zxvf monitor-v1.3-1.tgz  -C /var/www/html/cacti/plugins/

设置Cacti
登录cacti--》console-->>Plugin Managemet 找到monitonr点击install,过会点击enable后就出现了;

Cacti整合Ntop
Ntop是一种监控网络流量工具
1、安装依赖软件
[root@nagios ~]# cd /home/nagios
[root@nagios nagios]# yum install libtool libpcap libpcap-devel gdbm gdbm-devel zlib zlib-devel
[root@nagios nagios]# wget http://mirror01.idc.hinet.net/EPEL/5Server/x86_64/GeoIP-1.4.8-1.el5.x86_64.rpm
[root@nagios nagios]# wget http://mirror01.idc.hinet.net/EPEL/5Server/x86_64/GeoIP-devel-1.4.8-1.el5.x86_64.rpm
[root@nagios nagios]# yum -y –nogpgcheck localinstall GeoIP-*.el5.x86_64.rpm
[root@nagios nagios]# yum -y –nogpgcheck localinstall ettercap-*.rpm
2、安装Ntop
[root@nagios nagios]# useradd -M -s /sbin/nologin -r ntop
[root@nagios nagios]# wget http://down1.chinaunix.net/distfiles/ntop-4.1.0.tar.gz
[root@nagios nagios]# tar zxvf ntop-4.1.0.tar.gz
[root@nagios nagios]# cd ntop-4.1.0
[root@nagios ntop-4.1.0]# ./autogen.sh
[root@nagios ntop-4.1.0]# make
[root@nagios ntop-4.1.0]# make install
[root@nagios ntop-4.1.0]# chown -R ntop:ntop /usr/local/share/ntop
[root@nagios ntop-4.1.0]# chown -R ntop:root /usr/local/var/ntop
3、配置Ntop
(1)为ntop的admin用户设置密码
[root@nagios ntop-4.1.0]# ntop -A
admin 123456
(2)启动ntop
[root@nagios ntop-4.1.0]# ntop -i eth0 -d -L -u ntop
 eth0是你的监控机用于捕获网络流量的网卡
(3)自动启动
[root@nagios ntop-4.1.0]# echo ’ntop -i eth0 -d -L -u ntop &> /dev/null’ >> /etc/rc.d/rc.local
(4)防火墙添加信任端口3000
[root@nagios ntop-4.1.0]# iptables -I INPUT -p tcp –dport 3000 -j ACCEPT
[root@nagios ntop-4.1.0]# service iptables save
(5)访问页面
 http://localhost:3000
4、Cacti整合Ntop
[root@nagios ntop-4.1.0]# cd /home/nagios
[root@nagios nagios]# wget http://docs.cacti.net/_media/plugin:ntop-v0.2-1.tgz
[root@nagios nagios]# mv plugin:ntop-v0.2-1.tgz ntop-v0.2-1.tgz
[root@nagios nagios]# tar zxvf ntop-v0.2-1.tgz -C /var/www/html/cacti/plugins/
[root@nagios nagios]# vi  /var/www/html/cacti/include/config.php
$plugins[] = ‘ntop’;
在Plugin Management”中install和enable插件
在User Management中点击admin--》View Ntop save即可
在Settings、Misc中设置URL:http://localhost:3000

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30129545/viewspace-1434577/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-02-05

  • 博文量
    87
  • 访问量
    414059