刚刚上的新项目,在部署服务器时需要开启snmp服务供监控机采集数据进行监控。要求如下:
1、指定采集机和另一台机器来采集数据
2、指定团体名,且为只读
配置如下:(红色为修改的地方)
1、# sec.name source communitycom2sec 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 notifaccess notConfigGroup “” any noauth exact all none none
3、## incl/excl subtree maskview 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.1view systemview included .1.3.6.1.2.1.25.1.1view 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 ifpublic为团体名,serverIP为被监控主机ip,,if为查看端口信息
相关阅读:
Zabbix 之SNMP配置
SNMP实现网络动态分析
SNMP实现网络状态监控
CentOS 6.3下搭建SNMP测试环境
Linux (Ubuntu/CentOS) SNMP配置
开启并配置Citrix Xenserver的SNMP服务
生活不是等待风暴过去,而是学会在雨中翩翩起舞。