cacti是我经常用的网络监控工具,它集合了LAMP的优点,能更好的为你服务!让我们来看看它的具体配置!
1、windows的snmp服务配置(1)打开“控制面板”-“添加删除程序”-“添加删除组建”
在“管理和监视工具”中选中“简单网络管理协议(snmp)”
点击“下一步”,开始安装,在安装过程中需要i386文件(2)、打开“开始”-“程序”-“管理工具”-“服务”,
找到“snmp service”,右键打开“属性”,选择“安全”,
在“接受团体名称”处,点“添加”,在“团体名称”处写入你
的cacti使用的community,选中“接受来自这些主机的snmp数据包”,
默认值为“localhost”,点击“编辑”,将“localhost”改为cacti监控服务器的
实际 ip地址。
2、linux客户端配置(RHEL AS 4)
- #!/bin/bash# extract all packagestar zxvf beecrypt-4.1.2.tar.gz tar zxvf libelf-0.8.6.tar.gztar zxvf net-snmp-5.4.1.tar.gz
- # snmp install
cd beecrypt-4.1.2./configure && make && make installln -s /usr/local/lib/libbeecrypt.la /usr/lib/
cd ../libelf-0.8.6./configure && make && make install
cd ../net-snmp-5.4.1echo "\n\n\n\n\n\n"|./configure --enable-mfd-rewrites --prefix=/opt/snmp --with-default-snmp-version="2"make && make installmv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bakecho -e 'syslocation anhui\nsyscontact jeboosa\nrocommunity dwy#x$po^\n' > /etc/snmp/snmpd.confsed -i -e 's/-a\"/-a -c \/etc\/snmp\/snmpd.conf\"/' /etc/init.d/snmpdsed -i -e 's/usr/opt\/snmp/' /etc/init.d/snmpd /sbin/service snmpd stop/sbin/service snmpd start/sbin/chkconfig --level 35 snmpd oncd ..
2)第二种方法:
修改snmp的配置文件:#vi /etc/snmp/snmpd.conf修改下面几部分内容:1.)com2sec notConfigUser default public改为:com2sec notConfigUser localhost public2.)access notConfigGroup "" any noauth exact systemview none none改为:access notConfigGroup "" any noauth exact all none none3.)#view all included .1 80去掉注释保存退出启动snmp#/etc/init.d/snmpd start
#p#
3、linux客户端配置(RHEL AS 5)
直接编译安装net-snmp安装包。
- #mkdir /etc/snmp
- #vi /etc/snmp.conf
- syslocation hunaisyscontact testrocommunity cssl#123
- #/opt/snmp/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd -a -c /etc/snmp/snmpd.conf启动
- #netstat -naup
udp 0 0 0.0.0.0:161 0.0.0.0:* 12501/snmpd
4、一般说来,图片的流量统计描述都是 |host_description| - Traffic - |query_ifName| 按照这个形式来描述的,对于华为的设备,Gi显示成GigabitEthernet,可能导致后面的模块号,端口好无法显示。如 GigabitEthernet4/3/2显示成GigabitEthernet,解决办法: Console -> Settings -> Visual -> Maximum Field Length: 默认 15,我修改成30就OK了。 The maximum number of characters to display for a data query field.
5、对于Traffic 大于800Mbits/s的无法显示问题,在创建graph前修改 Data Templates -> Interface Traffic -> 1: traffic_in -> Maximum Value Use Per-Data Source Value 默认是100000000 后面再添 几个0就OK了,同样 2: traffic_out也要修改哦,最好在使用new graph创建新的graph之前修改后,否则之后修改会有一定的麻烦,甚至无法正常工作。本文来自:http://msplinks.com.cn/MDFodHRwOi8vZG9jLmxpbnV4cGsuY29tLzYzNy5odG1s
6、cacti常用工具命令:
- #rrdtool fetch ahtt_huainan_222_48_255_10_traffic_in_228.rrd AVERAGE
- #/opt/snmp/bin/snmpwalk -v 2c -c 'tsst' ip 121.9.27.245
通过文章的描述,我们进一步了解到了cacti的配置过程,希望对你们有帮助!
【编辑推荐】
- cacti 汇总流量图-将数据合并后作图
- cacti基础监控
- Cacti监控硬盘I/O的方法
- CACTI的客户端SNMP设置
- Cacti配置Threshold(Thold)并e-mail报警
- Cacti配置和安装具体介绍