arguments in commands

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nagios_aws
Posts: 76
Joined: Wed May 18, 2016 3:34 am

arguments in commands

Post 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
Last edited by dwhitfield on Thu Jan 12, 2017 2:11 pm, edited 1 time in total.
Reason: marking with green check mark
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: arguments in commands

Post 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...
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: arguments in commands

Post by dwhitfield »

Thanks @gormank !

@nagios_aws, did that suggestion work for you?
nagios_aws
Posts: 76
Joined: Wed May 18, 2016 3:34 am

Re: arguments in commands

Post by nagios_aws »

hello everyone,

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

thank you
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: arguments in commands

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