解決 Nagios chkeck_snmp 會出現 No OIDs specified 的警告訊息

使用 Nagios 來偵測無線 AP 時會出現 No OIDs specified 的警告訊息

[@more@]解決方式:
1. 修改 commands.cfg
# vim /etc/nagios/object/commands.cfg

# vim /usr/local/nagios/etc/objects/commands.cfg

# ‘check_snmp’ command definition
define command{
        command_name    check_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
        }
修改成
# ‘check_snmp’ command definition
define command{
        command_name    check_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o $ARG2$
        }

2. 重新啟動 Nagios Server
# systemctl restart nagios.service

check_snmp 指令用法
# /usr/local/nagios/libexec/check_snmp
check_snmp: Could not parse arguments
Usage:
check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout] [-e retries]
[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]
[-m miblist] [-P snmp version] [-N context] [-L seclevel] [-U secname]
[-a authproto] [-A authpasswd] [-x privproto] [-X privpasswd]