免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2311 | 回复: 1

[网络配置] debian下配置snmp服务出问题了取不到数据 [复制链接]

论坛徽章:
0
发表于 2012-09-05 17:48 |显示全部楼层
目前是
snmpd服务在运行中
# ps -ef|grep snmpd
snmp      2777     1  0 17:34 ?        00:00:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid
root      3006 13466  0 17:37 pts/1    00:00:00 grep snmpd


iptables防护墙关闭中
# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination      

配置文件内容如下
# vim /etc/snmp/snmpd.conf
agentAddress  udp:127.0.0.1:161
access notConfigGroup "" any noauth exact all none none
com2sec notConfigUser 192.168.0.0/24 lc20122public
com2sec *.*.*.0 192.168.0.0/24 lc20122public
                                                 #  system + hrSystem groups only
view   systemonly  included   .1.3.6.1.2.1
view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1
view        all        included        .1        80
                                                 #  Full access from the local host
                                                 #  Default access to basic system info
rocommunity public  default    -V systemonly
                                                 #  Full access from an example network
                                                 #     Adjust this network address to match your local
                                                 #     settings, change the community string,
                                                 #     and check the 'agentAddress' setting above
                                                 #  Full read-only access for SNMPv3
rouser   authOnlyUser
                                                 #  Full write access for encrypted requests
                                                 #     Remember to activate the 'createUser' lines above
sysLocation    Sitting on the Dock of the Bay
sysContact     Me <me@example.org>
                                                 # Application + End-to-End layers
sysServices    72
                               # At least one  'mountd' process
proc  mountd
                               # No more than 4 'ntalkd' processes - 0 is OK
proc  ntalkd    4
                               # At least one 'sendmail' process, but no more than 10
proc  sendmail 10 1
                               # 10MBs required on root disk, 5% free on /var, 10% free on all other disks
disk       /     10000
disk       /var  5%
includeAllDisks  10%
                               # Unacceptable 1-, 5-, and 15-minute load averages
load   12 10 5
                                    #   send SNMPv1  traps
trapsink     localhost public
                                    #   send SNMPv2c traps
                                    #   send SNMPv2c INFORMs
                                   # Remember to activate the 'createUser' lines above
iquerySecName   internalUser      
rouser          internalUser
                                   # generate traps on UCD error conditions
defaultMonitors          yes
                                   # generate traps on linkUp/Down
linkUpDownNotifications  yes
extend    test1   /bin/echo  Hello, world!
extend-sh test2   echo Hello, world! ; echo Hi there ; exit 35
                                           #  Run as an AgentX master agent
master          agentx
                                           #  Listen for network connections (from localhost)
                                           #    rather than the default named socket /var/agentx/master
                                                                                  
                                                                                  









# snmpwalk -c lc20122public -v 2c 192.168.0.146
Timeout: No Response from 192.168.0.146

论坛徽章:
0
发表于 2012-09-05 18:07 |显示全部楼层
看看开了SNMP没有
  1. snmpwalk -v 2c -c public ServerIP if
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP