NagiosEnterprises / nrpe

NRPE Agent
GNU General Public License v2.0
257 stars 133 forks source link

`check_nrpe` gives wrong error message for undefined command if -a is specified. #250

Open h3xx opened 3 years ago

h3xx commented 3 years ago

Calling an undefined command should result in the same error message regardless of whether arguments are being sent.

$ check_nrpe -H 192.168.23.54 -c CheckCPU -p 5666
NRPE: Command 'CheckCPU' not defined
$ check_nrpe -H 192.168.23.54 -c CheckCPU -p 5666 -a warn=80 crit=90 time=1m time=5m time=15m
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).

NRPE version: 4.0.3 (installed from repo.nagios.com) Ubuntu 18.04.5 LTS (Bionic Beaver)