NRPE argument error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
User avatar
sebastiaopburnay
Posts: 105
Joined: Sun Oct 31, 2010 1:40 pm
Location: Lisbon, Portugal

NRPE argument error

Post 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
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: NRPE argument error

Post 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)
Locked