HP Procurve 2910 上的 Nagios SNMP v3
Nagios SNMP v3 on HP Procurve 2910
我在获取 check_snmp 插件连接和 return 值时遇到问题。我是 运行ning CentOS7、Nagios 4.0.8、check_snmp 2.0.3。虽然可以从命令行获取 snmpget 和 snmpwalk,但 check_snmp 失败。这里有一些例子...
snmpget:
# snmpget -v 3 -u myuser -x aes -X mypasswd -a md5 -A mypasswd -c Public -l AuthPriv 111.222.333.111 sysUpTime.0
...returns...
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10475998) 1 day, 5:05:59.98
snmpwalk:
# snmpwalk -v 3 -u myuser -x aes -X mypasswd -a md5 -A mypasswd -c Public -l AuthPriv 111.222.333.111 sysUptime
...returns...
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10473493) 1 day, 5:06:10.93
check_snmp:
/usr/lib64/nagios/plugins/check_snmp -H 111.222.333.111 -o sysUpTime.0 -P 3 -l AuthPriv -U myuser -A mypasswd -a md5 -X mypasswd -x aes
...returns...
External command error: Error in packet
Reason: authorizationError (access denied to that object)
Failed object: DISMAN-EVENT-MIB::sysUpTimeInstance
当我 运行 check_snmp 打开 verbose 时,我得到...
/usr/bin/snmpget -Le -t 1 -r 5 -m ALL -v 3 [authpriv] 156.128.2.250:161 sysUpTime.0
check_snmp 显然没有使用传递给它的参数构建 snmpget 命令。我不知道为什么。
check_snmp 秒级别的语法略有不同。尝试:
-L authPriv
而不是:
-l AuthPriv
您可以通过使用 -h 调用插件的帮助来确认这一点:
./check_snmp -h
check_snmp v2.0.3 (nagios-plugins 2.0.3)
...
-L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]
...
我在获取 check_snmp 插件连接和 return 值时遇到问题。我是 运行ning CentOS7、Nagios 4.0.8、check_snmp 2.0.3。虽然可以从命令行获取 snmpget 和 snmpwalk,但 check_snmp 失败。这里有一些例子...
snmpget:
# snmpget -v 3 -u myuser -x aes -X mypasswd -a md5 -A mypasswd -c Public -l AuthPriv 111.222.333.111 sysUpTime.0
...returns...
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10475998) 1 day, 5:05:59.98
snmpwalk:
# snmpwalk -v 3 -u myuser -x aes -X mypasswd -a md5 -A mypasswd -c Public -l AuthPriv 111.222.333.111 sysUptime
...returns...
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10473493) 1 day, 5:06:10.93
check_snmp:
/usr/lib64/nagios/plugins/check_snmp -H 111.222.333.111 -o sysUpTime.0 -P 3 -l AuthPriv -U myuser -A mypasswd -a md5 -X mypasswd -x aes
...returns...
External command error: Error in packet
Reason: authorizationError (access denied to that object)
Failed object: DISMAN-EVENT-MIB::sysUpTimeInstance
当我 运行 check_snmp 打开 verbose 时,我得到...
/usr/bin/snmpget -Le -t 1 -r 5 -m ALL -v 3 [authpriv] 156.128.2.250:161 sysUpTime.0
check_snmp 显然没有使用传递给它的参数构建 snmpget 命令。我不知道为什么。
check_snmp 秒级别的语法略有不同。尝试:
-L authPriv
而不是:
-l AuthPriv
您可以通过使用 -h 调用插件的帮助来确认这一点:
./check_snmp -h
check_snmp v2.0.3 (nagios-plugins 2.0.3)
...
-L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]
...