发信人"星夜如雨" <#,'1star1"#%@http://uniorg.net/>,
看板FreeBSD
标 题Re: MRTG 问题
发信站News.CPU.com.tw (Wed Jun 9 02:53:05 2004)
转信站ptt!ctu-reader!ctu-peer!news.nctu!news.netfront.net!newsgate.cuhk.edu.
# snmpd.conf
####
# First, map the community name "public" into a "security name"
# sec.name source community
com2sec local localhost public
com2sec mynetwork 192.168.1.0/24 public
####
# Second, map the security name into a group name:
# groupName securityModel securityName
group MyRWGroup v1 local
group MyROGroup v1 mynetwork
####
# Third, create a view for us to let the group have rights to:
# name incl/excl subtree mask(optional)
view all included .1 80
####
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write
notif
access MyRWGroup "" any noauth exact all all none
access MyROGroup "" any noauth exact all none none
############################################################################
###
# System contact information
#
# It is also possible to set the sysContact and sysLocation system
# variables through the snmpd.conf file:
sysLocation xxx
sysContact Root <
[email protected]>
--
我是放在 /usr/local/etc/snmp/snmpd.conf
测试指令
# snmpwalk -v 1 localhost public system
system.sysDescr.0 = "SunOS name sun4c"
system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.sunos4
system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55
system.sysContact.0 = "Me <
[email protected]>"
system.sysName.0 = "name"
system.sysLocation.0 = "Right here, right now."
system.sysServices.0 = 72
..
..
有看到一堆讯息那就ok了!
"☆ 月光仙子 ☆" <
[email protected]> 在邮件
news:
[email protected] 中撰写...
※ 引述《[email protected] (妙音)》之铭言:
: 【 在 [email protected] (淡淡的蓝色) 的大作中提到: 】
: : 检查看看snmpd.conf是否有设定对…会不会漏掉没设定到
: 安装好之後, 好像没有预设的 snmpd.conf
: 不管是 /usr/local/etc/snmp 或是 /usr/local/share/snmp
: 都没有看到
: 请问, 应该如何设定呢?
: (请不要只教我 man snmpd.conf, 我对 snmp 不熟, 已经看得一头雾水)
: 谢谢
自己建一个
snmpd.conf
在/usr/local/share/snmp
应该只要加上
rocommunity XXXXX
这行就可以跑mrtg
--
最近灌一台是这样做....
--
※ Origin: 中原电机心站 ◆ From:
student.ee.cycu.edu.tw
--
Origin: 中原电机心站 bbs.ee.cycu.edu.tw (140.135.12.1)