Page 1 of 1

NRPE argument error

Posted: Fri Jul 17, 2015 1:17 pm
by sebastiaopburnay
Hi,

I'm having a strange error on my NRPE Server,

Even with the correct options in nrpe.cfg to allow arguments:
i) dont_blame_nrpe=1
ii) allow_bash_command_substitution=1

I'm having a 'Request contained command arguments!' error upon running my command with four args:

Code: Select all

Jul 17 19:01:11 NAGIOSSERVER nrpe[32570]: Connection from <allowed-host> port 51395
Jul 17 19:01:11 NAGIOSSERVER nrpe[32570]: Host address is in allowed_hosts
Jul 17 19:01:11 NAGIOSSERVER nrpe[32570]: Handling the connection...
Jul 17 19:01:11 NAGIOSSERVER nrpe[32570]: Error: Request contained command arguments!
Jul 17 19:01:11 NAGIOSSERVER nrpe[32570]: Client request was invalid, bailing out...
Jul 17 19:01:11 NAGIOSSERVER nrpe[32570]: Connection from é#003 closed.
My command is defined as:

Code: Select all

command[mytms_contact]=/usr/local/nagios/libexec/mytms_contact_mail '$ARG1$' '$ARG2$' '$ARG3$' '$ARG4$' 'static_value'
And I'm invoking it as:

Code: Select all

check_nrpe -H NAGIOSSERVER  -c mytms_contact -a 1 2 3 4

Re: NRPE argument error

Posted: Fri Jul 17, 2015 1:23 pm
by jdalrymple
1) When you compiled the nrpe daemon did you supply the flag to allow command arguments?

Code: Select all

./configure --enable-command-args
2) Did you restart the NRPE daemon after adjusting nrpe.cfg? - (assuming you're not using xinetd, if you are it doesn't matter)