Page 2 of 2

Re: Return code of 4 is out of bounds

Posted: Fri Aug 25, 2023 8:53 am
by tgriep
What I see is an conflict is the arguments in the command definition and the arguments in the service check's arguments.

Your command line is

Code: Select all

command_line    $USER1$/check_port.pl -p $ARG1$ -h $HOSTADDRESS$
And the service check command is this

Code: Select all

check_command check_port.pl! -p 80 -h www.google.com '-w 1 -c 2 -v'
It is specifying the -p and the -h option twice in the command which is causing the error.

Change the command line to this for the command

Code: Select all

command_line    $USER1$/check_port.pl $ARG1$
Change the check command for the service like this.

Code: Select all

check_command check_port.pl! -p 80 -h www.google.com -w 1 -c 2 -v
Then try it out and see if it works.

Re: Return code of 4 is out of bounds

Posted: Mon Aug 28, 2023 2:36 am
by pintu
It's working now, thanks a lot for the suggestion. Details - but they could be annoying

Re: Return code of 4 is out of bounds

Posted: Mon Aug 28, 2023 4:26 am
by kg2857
Please explain so we can all learn...