歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux下SNMP的安裝配置

Linux下SNMP的安裝配置

日期:2017/2/28 14:35:01   编辑:Linux教程

剛剛上的新項目,在部署服務器時需要開啟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為查看端口信息

Copyright © Linux教程網 All Rights Reserved