/tool/snmp-get
snmp-get
Retrieves one OID from an SNMP agent — for example to test that a router answers SNMP queries, as described in the SNMP guide. Use /tool/snmp-walk to retrieve a whole subtree at once.
tool/snmp-get
Type: Command
从 SNMP 代理检索一个 OID,例如测试路由器是否应答 SNMP 查询,如 SNMP 指南所述。使用 /tool/snmp-walk 一次检索整个子树。
| 参数 | 类型 | 描述 |
|---|---|---|
oid | object { oid: string } | 要读取的 OID,例如 1.3.6.1.2.1.1.5.0。 |
next | bool | 设置后,获取 MIB 树中给定 OID 之后的下一个 OID(使用 GETNEXT 而不是 GET)。 |
address | ipAddr | 要查询的 SNMP 代理地址。 |
port | num | 代理的 UDP 端口。默认值:161。 |
tries | num | 放弃前的尝试次数。 |
try-timeout | time | 每次尝试的超时时间。 |
version | enum (1 | 2c | 3) | SNMP 协议版本:1、2c 或 3。 |
community | string | 社区名称。对于 v1/v2c,该名称就是密码;对于 v3,它是承载匹配安全级别的社区。 |
security | enum (none | authorized | private) { none:0, authorized:1, private:2 } | 安全级别,与社区匹配:none、authorized 或 private。 |
authentication-password | string | SNMPv3 认证密码(至少 8 个字符)。 |
authentication-protocol | enum (MD5 | SHA1 | SHA256 | SHA384 | SHA512) | SNMPv3 认证协议:MD5、SHA1、SHA256、SHA384 或 SHA512。 |
encryption-password | string | SNMPv3 加密密码(至少 8 个字符)。 |
encryption-protocol | enum (DES | AES) | SNMPv3 加密协议:DES 或 AES。 |
| 只读参数 | 类型 | 描述 |
|---|---|---|
oid | string | 代理返回值的 OID。 |
type | enum (null | integer | counter | gauge | timeticks | unsigned-integer | octet-string | opaque | object-id | ip-address | counter-64bit | no-such-object | no-such-instance | end-of-mib-view) | 代理返回的值类型。 |
value | string | 代理返回的值。 |