我有一个来自供应商的 MIB 文件,用于查询特定的(在本例中是业务关键的)软件。
当我根据snmptable
请求执行操作时,我得到了MAGIC-MIB::queryRtTable: No entries
响应,但是当我使用 wireshark 观察时,我可以看到 wireshark 正在发送响应。
以下是服务器在 wireshark 中发送的响应:
我对 MIB 的构造一无所知,因此我发布了希望与 MIB 相关的部分:
MAGIC-MIB DEFINITIONS ::= BEGIN
IMPORTS
enterprises
FROM RFC1155-SMI
OBJECT-TYPE
FROM RFC-1212
DisplayString
FROM RFC1213-MIB;
magic OBJECT IDENTIFIER ::= {enterprises 15687}
manage OBJECT IDENTIFIER ::= {magic 2}
query OBJECT IDENTIFIER ::= {magic 3}
queryRtTable OBJECT-TYPE
SYNTAX SEQUENCE OF QueryRtEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION
"The list of loaded enterprise servers"
::= { query 3 }
queryRtEntry OBJECT-TYPE
SYNTAX QueryRtEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION
"The enterprise server entry"
INDEX { entServerEntryIndex }
::= { queryRtTable 1 }
QueryRtEntry ::=
SEQUENCE {
entServerEntryIndex
INTEGER,
entServerHost
DisplayString,
entServerPort
INTEGER,
openedApplication
DisplayString ,
entPriority
INTEGER,
runningThreads
INTEGER,
peakThreads
INTEGER,
runningContexts
INTEGER,
peakContexts
INTEGER,
requestsServed
INTEGER,
executionErrors
INTEGER
}
entServerEntryIndex OBJECT-TYPE
SYNTAX INTEGER (1..100000)
ACCESS read-only
STATUS mandatory
DESCRIPTION
"A unique identifier for an enterprise server"
::= { queryRtEntry 1 }
entServerHost OBJECT-TYPE
SYNTAX DisplayString
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The enterprise's host name"
::= { queryRtEntry 2 }
entServerPort OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The enterprise server's port number"
::= { queryRtEntry 3 }
openedApplication OBJECT-TYPE
SYNTAX DisplayString
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The application that is running on the enterprise server."
::= { queryRtEntry 4 }
entPriority OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The priority of the enterprise server"
::= { queryRtEntry 5 }
runningThreads OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The enterprise server's running thread counter"
::= { queryRtEntry 6 }
peakThreads OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The enterprise server's peak thread counter"
::= { queryRtEntry 7 }
runningContexts OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The enterprise server's running context counter"
::= { queryRtEntry 8 }
peakContexts OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The enterprise server's peak context counter"
::= { queryRtEntry 9 }
requestsServed OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The number of requests served"
::= { queryRtEntry 10 }
executionErrors OBJECT-TYPE
SYNTAX INTEGER
ACCESS read-only
STATUS mandatory
DESCRIPTION
"The number of execution errors"
::= { queryRtEntry 11 }
有什么想法我应该去哪里查找为什么snmptable
即使数据已发送,却没有返回任何数据?我猜这是 MIB 中的一个错误,但我真的不知道从哪里开始。
答案1
事实证明这是软件 SNMP 代理的一个错误,无论您请求哪个 OID,它总是返回同一个。这意味着,如果这是您想要收集的 OID,那很好 - 如果您想要任何其他数据,那就太糟糕了。