标签:1.2 text vpd nta lock ext www user rap
1.Linux snmp#yum install -y
net-snmp*
2、备份snmp配置
#cp
/etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
3、添加文本
<div class="blockcode"><blockquote>#> /etc/snmp/snmpd.conf ; cat > /etc/snmp/snmpd.conf<<EOF
rocommunity SZ-SNMP-PRIVATE
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
access notConfigGroup "" any noauth exact all none none
view all included .1 80
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
dontLogTCPWrappersConnects yes
EOF
注:rocommunity:允许IP根据团体名以只读方式获取snmp数据,格式为: rocommunity 团体名 乐维采集服务器IP地址(不填默认为允许全部)
rocommunity SZ-SNMP-PRIVATE(团体名) 10.245.119.44
4、重启snmp
#service snmpd
restart
5、查看主机SNMP
snmpwalk -v 2c -c
SZ-SNMP-PRIVATE 192.168.1.145
(显示主机所有的snmp)
6、选取有用的信息:
常用主机参数:
系统参数(1.3.6.1.2.1.1)
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"># snmpwalk -v 2c
-c SZ-SNMP-PRIVATE 192.168.1.145 .1.3.6.1.2.1.1.1.0<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">SNMPv2-MIB::sysDescr.0
= STRING: Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19
22:10:57 UTC 2015 x86_64</span></p>
主机常用OID: http://www.ttlsa.com/monitor/snmp-oid/
标签:1.2 text vpd nta lock ext www user rap
原文地址:http://blog.51cto.com/14010230/2324117