监控软件cacti添加主机
1.在被监控主机安装snmp服务# yum install net-snmp* -y
# vim /etc/snmp/snmpd.conf
access notConfigGroup "" any noauth exact all none none #取消注释(systemview修改为all)
view all included.1 80 #取消注释
view mib2 included.iso.org.dod.internet.mgmt.mib-2 fc#取消注释
com2sec notConfigUsercacti服务端IPpublic #添加一行
# vim /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m udp -p udp --dport 161 -s cacti服务器地址 -j ACCEPT
# /etc/init.d/snmpd restart
Stopping snmpd:
Starting snmpd:
# /etc/init.d/iptables restart
iptables: Setting chains to policy ACCEPT: filter
iptables: Flushing firewall rules:
iptables: Unloading modules:
iptables: Applying firewall rules:
#
2.在cacti服务器主机添加客户机
# vim /etc/snmp/snmpd.conf
accessnotConfigGroup "" any noauthexactall none none
view all included.1 80
view mib2 included.iso.org.dod.internet.mgmt.mib-2 fc
com2sec notConfigUser allpublic
proc mountd
proc ntalkd 4
proc sendmail 10 1
disk / 10000
load 12 14 14
# /etc/init.d/snmpd restart
Stopping snmpd:
Starting snmpd:
#
# snmpwalk -c public -v 2c 客户机IP地址 if #输出网卡信息
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: eth1
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
3.在cacti界面添加客户主机(被控端)
http://s4.运维网.com/wyfs02/M02/82/54/wKioL1dRMBqjIK8IAACDnn7mCZs988.png-wh_500x0-wm_3-wmp_4-s_2752087091.png
http://s4.运维网.com/wyfs02/M01/82/54/wKioL1dRMBqwVU5rAABUszyhaq8248.png-wh_500x0-wm_3-wmp_4-s_2521452440.png
http://s4.运维网.com/wyfs02/M00/82/55/wKiom1dRLxrCXS0MAAC-Rik8u84330.png-wh_500x0-wm_3-wmp_4-s_3060926853.png
http://s3.运维网.com/wyfs02/M02/82/55/wKiom1dRLxqCDjp1AADk5jMLWbo253.png-wh_500x0-wm_3-wmp_4-s_4033273247.png
http://s3.运维网.com/wyfs02/M00/82/54/wKioL1dRMBzD6-puAABKm_qw4mQ526.png-wh_500x0-wm_3-wmp_4-s_999540630.png
http://s1.运维网.com/wyfs02/M02/82/54/wKioL1dRMBzCUvJMAAB_3Yrjrlo822.png-wh_500x0-wm_3-wmp_4-s_1728392608.png
http://s2.运维网.com/wyfs02/M01/82/55/wKiom1dRLxuhUICpAABtJrVgRvM340.png-wh_500x0-wm_3-wmp_4-s_1229542954.png
4.在cacti服务端强制生成图形
# /usr/bin/php /var/www/html/cacti/poller.php --force
# chownapache:apache /var/www/html/cacti/rra/*
等会就出图了
http://s4.运维网.com/wyfs02/M00/82/55/wKiom1dRL_azlF2-AACgSFdBpMg831.png-wh_500x0-wm_3-wmp_4-s_597875070.png
页:
[1]