SNMP 缺少 1.3.6.1.2.1.25.2.3.1(卷安装)

SNMP 缺少 1.3.6.1.2.1.25.2.3.1(卷安装)

从今天早上起,我的 snmpd 没有返回 1.3.6.1.2.1.25.2.3.1 树的结果。这只发生在 Ubuntu 18.04 上,在 16.04 上它仍然有效。

# snmpwalk -v1 -c public ubuntu16.04.host 1.3.6.1.2.1.25.2.3.1.5
iso.3.6.1.2.1.25.2.3.1.5.1 = INTEGER: 24689720
iso.3.6.1.2.1.25.2.3.1.5.3 = INTEGER: 33076276
iso.3.6.1.2.1.25.2.3.1.5.6 = INTEGER: 24689720
iso.3.6.1.2.1.25.2.3.1.5.7 = INTEGER: 11230152
iso.3.6.1.2.1.25.2.3.1.5.8 = INTEGER: 683116
iso.3.6.1.2.1.25.2.3.1.5.10 = INTEGER: 8386556
iso.3.6.1.2.1.25.2.3.1.5.31 = INTEGER: 130014766
iso.3.6.1.2.1.25.2.3.1.5.35 = INTEGER: 1
iso.3.6.1.2.1.25.2.3.1.5.41 = INTEGER: 617243
iso.3.6.1.2.1.25.2.3.1.5.42 = INTEGER: 1280
iso.3.6.1.2.1.25.2.3.1.5.43 = INTEGER: 3086215
iso.3.6.1.2.1.25.2.3.1.5.44 = INTEGER: 25600
iso.3.6.1.2.1.25.2.3.1.5.47 = INTEGER: 264190509

NET-SNMP version:  5.7.2

# snmpwalk -v1 -c public ubuntu.18.04.host 1.3.6.1.2.1.25.2.3.1.5
# empty

NET-SNMP version:  5.7.3

SNMPd 配置完全相同,过去几年中已在许多主机上使用。问题从今天(2019-09-06 08:00 CET)开始出现。我找不到任何相关报告。

答案1

版本不是问题

root@dest:~# dpkg -l |grep snmpd
ii  snmpd                                5.7.3+dfsg-5                        amd64        SNMP (Simple Network Management Protocol) agents

root@source:~# snmpwalk -v1 -c pass dest 1.3.6.1.2.1.25.2.3.1.5
iso.3.6.1.2.1.25.2.3.1.5.1 = INTEGER: 12285404
iso.3.6.1.2.1.25.2.3.1.5.3 = INTEGER: 18143704
iso.3.6.1.2.1.25.2.3.1.5.6 = INTEGER: 12285404
iso.3.6.1.2.1.25.2.3.1.5.7 = INTEGER: 165456
iso.3.6.1.2.1.25.2.3.1.5.8 = INTEGER: 94420
iso.3.6.1.2.1.25.2.3.1.5.10 = INTEGER: 5858300
iso.3.6.1.2.1.25.2.3.1.5.31 = INTEGER: 7176169
iso.3.6.1.2.1.25.2.3.1.5.37 = INTEGER: 307136
iso.3.6.1.2.1.25.2.3.1.5.39 = INTEGER: 1535675
iso.3.6.1.2.1.25.2.3.1.5.40 = INTEGER: 1280
iso.3.6.1.2.1.25.2.3.1.5.41 = INTEGER: 1535675
iso.3.6.1.2.1.25.2.3.1.5.60 = INTEGER: 307135
iso.3.6.1.2.1.25.2.3.1.5.61 = INTEGER: 25671918

检查 snmp 进程、启动参数、用户等。

Debian-+   695  0.0  0.1  34844 14472 ?        Ss   sep05   0:47 /usr/sbin/snmpd -Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I
-smux mteTrigger mteTriggerConf -f -p /run/snmpd.pid

这是我的配置

root@dest:/etc/snmp# cat snmpd.conf |grep -iv "^\#"  |grep -v '^$' 
agentAddress  udp:dest:161
                                                 #  system + hrSystem groups only
view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1
view   AllView     included   .1
                                                 #  Full access from the local host
                                                 #  Default access to basic system info
                                                 #  rocommunity6 is for IPv6
rocommunity pass  127.0.0.1 
rocommunity pass  0.0.0.0/0 
                                                 #  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 <[email protected]>
                                                 # 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

输入你的配置。

相关内容