被监控端安装snmp
yum install snmp
被监控端安装配置snmp
vim /etc/snmp/snmpd.conf
com2sec notConfigUser default public
改为 ( cacti主机IP地址 )
com2sec notConfigUser 192.168.0.195 public
access notConfigGroup "" any noauth exact systemview none none
改为
access notConfigGroup "" any noauth exact all none none
#view all included .1 80
将#注释删掉
view all included .1 80
然后开启 snmp
service snmpd start
设置snmpd开机启动
chkconfig snmpd on
cacti服务端测试被监控端
snmpwalk -c public -v 2c 192.168.0.97
snmpwalk -v 1 -c public 192.168.0.97 IP-MIB::ipAdEntIfIndex
其中 192.168.0.97 为被监控端IP地址
[root@cactiez scripts]# snmpwalk -v 1 -c public 192.168.0.97 IP-MIB::ipAdEntIfIndex
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntIfIndex.192.168.0.97 = INTEGER: 2
能获取到 0.97的数据 表示被控端已接受snmp方式监控
配置cacti
以上测试成功后,直接从cacti添加设备后添加图像即可。