net-snmp for windows

 

net-snmp for windows

本来windows自己带的那个也很好用的,但是安装教程在“添加或删除程序”里添加的时候,拷贝文件总是出错,无法完成安装。在*nix很流行的net-snmp其实有Windows版本的,是系统自带的snmp一个不错的替代方案。其安装配置过程如下:

1. 安装
从这里 下载 ,我们将要把net-snmp安装到I:/usr,安装过程只要修改一下安装路径就行,其他地方一路回车。
2. 配置
在I:/usr/etc/snmp目录下新建一个文件snmpd.conf,其内容如下
com2sec notConfigUser default public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
access notConfigGroup “” any noauth exact all none none
view all included .1 80
view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
view all included .1
注意:这个目录下有一个snmp.conf,不要搞混了
3.配置windows服务
启动一个命令窗口,将工作目录改到I:/usr下,执行一下
I:/usr> bin/snmpd -v
NET-SNMP version:  5.5
Web:               http://www.net-snmp.org/
Email:             net-snmp-coders@lists.sourceforge.net
主文件正常,下一步将它安装为windows服务,执行
I:/usr> registeragent.bat
Registering snmpd as a service using the following additional options:
.
-Lf “I:/usr/log/snmpd.log”
.
.
For information on running snmpd.exe and snmptrapd.exe as a Windows
service, see ‘How to Register the Net-SNMP Agent and Trap Daemon as
Windows services’ in README.win32.
.
请按任意键继续. . .
I:/usr>
服务注册成功,下面启动net-snmp
I:/usr> net start “net-snmp agent”
Net-SNMP Agent 服务已经启动成功。
I:/usr>
我们可以在windows的任务管理器中看到snmpd.exe这个进程。
4.测试
检查一下我们的成果,在命令行窗口执行
snmpwalk -v 1 -c public -m ALL 127.0.0.1
其中public相当连接密钥了,要和snmd.conf中的
com2sec notConfigUser default  public
一致。如果一切顺利,你将会看到很多数据在滚。下一步就可以cacti这样的监控程序去抓数据画图了。
5.参考资料
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值