刚刚上的新项目,在部署服务器时需要开启snmp服务供监控机采集数据进行监控。要求如下:
1、指定采集机和另一台机器来采集数据
2、指定团体名,且为只读
配置如下:(红色为修改的地方)
1、
# sec.name source community
com2sec notConfigUser default public
将“comunity”字段改为要设置的密码,也就是团体名(不能使用符号,会出错)
将“default”改为授权访问的ip
2、
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
access notConfigGroup “” any noauth exact all none none
3、
## incl/excl subtree mask
view all included .1 80 去掉注释
4、
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view all included .1 添加
5、
## -or just the mib2 tree-
view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc 去掉注释
测试:
snmpwalk -v 2c -c public serverIP if
public为团体名,serverIP为被监控主机ip,if为查看端口信息
相关阅读:
Zabbix 之SNMP配置 http://www.linuxidc.com/Linux/2013-09/90263.htm
SNMP实现网络动态分析 http://www.linuxidc.com/Linux/2013-04/83514.htm
SNMP实现网络状态监控 http://www.linuxidc.com/Linux/2013-04/83187.htm
CentOS 6.3下搭建SNMP测试环境 http://www.linuxidc.com/Linux/2013-02/79233.htm
Linux (Ubuntu/CentOS) SNMP配置 http://www.linuxidc.com/Linux/2012-12/76837.htm
开启并配置Citrix Xenserver的SNMP服务 http://www.linuxidc.com/Linux/2013-01/78487.htm