Page 1 of 1

arguments in commands

Posted: Wed Jan 11, 2017 5:42 am
by nagios_aws
Hello everyone,

i'm currently trying to update my commands to match my script modification.

I added a "--port" option for my script, but I can't get it to work in command :

Code: Select all

$USER1$/check_nrpe -H $HOSTADDRESS$ -c windows_flexlm -a --port $ARG1$
and this in return :

Code: Select all

The command (windows_flexlm) returned an invalid return code: 255
I think there is a mixup with "-a --port" but I can't find the documentation for this particular case.

earlier, I add this one :

Code: Select all

$USER1$/check_nrpe -H $HOSTADDRESS$ -c windows_flexlm -a  $ARG1$
and it worked perfectly ...

any ideas ?

thank you

Re: arguments in commands

Posted: Wed Jan 11, 2017 10:56 am
by gormank
Try quoting?

$USER1$/check_nrpe -H $HOSTADDRESS$ -c windows_flexlm -a "--port $ARG1$"
$USER1$/check_nrpe -H $HOSTADDRESS$ -c windows_flexlm -a '--port $ARG1$'

I think check_nrpe wants a single value...

Re: arguments in commands

Posted: Wed Jan 11, 2017 11:14 am
by dwhitfield
Thanks @gormank !

@nagios_aws, did that suggestion work for you?

Re: arguments in commands

Posted: Thu Jan 12, 2017 3:08 am
by nagios_aws
hello everyone,

I tried this before gettings your responses and it works :)

thank you

Re: arguments in commands

Posted: Thu Jan 12, 2017 2:11 pm
by dwhitfield
Glad to hear it is resolved. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!