AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-200995

Martin's questions

Martin Hope
Martin
Asked: 2024-03-01 18:48:42 +0800 CST

为什么 Net-SNMP 不会报告 snmpV2 MIB?

  • 5

我试图让 Net-SNMP 向我提供其配置的 snmpEngineID,即使它看起来就在那里,但我无法访问 snmpV2 MIB 中的任何内容。

我有一台 CentOS 7 服务器,已从 RHeL 存储库安装了 Net-SNMP,我需要对其进行设置,以便远程管理服务器可以使用 SNMPv3 对其进行监控,为此我需要 snmpEngineID。

安装顺利并且守护进程正常工作:

# snmpwalk -v 2c -c public localhost system.sysContact
SNMPv2-MIB::sysContact.0 = STRING: Martin <[email protected]>
#

但是,当我尝试检索 snmpEngineID 时,它失败了:

# snmpwalk -v 2c -c public localhost SNMP-FRAMEWORK-MIB::snmpEngineID
SNMP-FRAMEWORK-MIB::snmpEngineID = No more variables left in this MIB View (It is past the end of the MIB tree)
#

在对 snmpget 命令进行完整调试(-D all)时,我得到了以下信息:

...
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv:         Name
dumpx_recv:          06 0A 2B 06 01 06 03 0A 02 01 01 00
dumpv_recv:            ObjID: SNMP-FRAMEWORK-MIB::snmpEngineID.0
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv:         Value
trace: _sess_process_packet(): snmp_api.c, 5245:
sess_process_packet: received message id#0 reqid#1594114350 len 45
trace: snmp_synch_input(): snmp_client.c, 183:
snmp_synch: Response (ReqID: 1594114350 - Cmd 162)
SNMP-FRAMEWORK-MIB::snmpEngineID.0 = No Such Object available on this agent at this OID
#

尽管 snmpwalk() 应该可以工作,但我尝试了直接 snmpget() 到输出中提供的 objID:

# snmpget -v 2c -c public localhost ObjID: SNMP-FRAMEWORK-MIB::snmpEngineID.0
MIB search path: /usr/local/nom/share/snmp/mibs:/usr/local/nom/share/snmp/mibs
Cannot find module (ObjID): At line 0 in (none)
ObjID:: Unknown Object Identifier
#

如您所见,这也失败了。

I think that "06 0A 2B 06 01 06 03 0A 02 01 01 00" provided in the debug output is the actual engine ID but I do't want to take that as gospel and, more importantly, I want to know why the snmpwalk and snmpget commands I am trying are failing.

I did try the OID itself, in case there were issues with the MIB file but it also failed:

# snmpget -v 2c -c public localhost .1.3.6.1.6.3.10.2.1.1.0
SNMP-FRAMEWORK-MIB::snmpEngineID.0 = No Such Object available on this agent at this OID
#

I then tried working back through the OID, walking each number. They all failed until I got to to .1.3.6.1

# snmpwalk -v 2c -c public localhost .1.3.6.1.6 | head -1
SNMPv2-SMI::snmpV2 = No more variables left in this MIB View (It is past the end of the MIB tree)
# snmpwalk -v 2c -c public localhost .1.3.6.1 | head -1
SNMPv2-MIB::sysDescr.0 = STRING: Linux 143-42-69-251.ip.linodeusercontent.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
# 

.1.3.6.1.6 is the snmpV2-SMI MIB but I am at a loss to understand why this MIB is not being reported back on.

Has anyone come across this? I'm guessing it's something basic, but I certainly cannot see what or where that might be.

Your assistance is much appreciated.

snmp
  • 1 个回答
  • 36 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve