Page 5 of 5
Re: check_blackberry5 and error (Return code of 127)
Posted: Mon Mar 10, 2014 12:55 pm
by heritages
let me know if this is what you were looking for...
Re: check_blackberry5 and error (Return code of 127)
Posted: Mon Mar 10, 2014 2:21 pm
by tmcdonald
Look in your commands.cfg file. You have your blackberry commands all defined like this:
Code: Select all
$ /usr/local/nagios/libexec/check_blackberry5 -H $HOSTADDRESS$ -C $ARG1$ -Q licenses $ARG2$
when all the "standard" commands have something like this:
Code: Select all
$USER1$/check_dir -d $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
That dollar sign is what's messing things up. You will either need to remove that so as to provide just the full path:
Code: Select all
/usr/local/nagios/libexec/check_blackberry5 -H $HOSTADDRESS$ -C $ARG1$ -Q licenses $ARG2$
or use the $USER1$ macro:
Code: Select all
$USER1$/check_blackberry5 -H $HOSTADDRESS$ -C $ARG1$ -Q licenses $ARG2$
I noticed in your first post you had posted "$ /usr/local/nagios/libexec/check_blackberry5 -H $HOSTADDRESS$ -C $ARG1$ -Q licenses $ARG2$" as the command you ran from the CLI. This is what you ran on the command line, so I am assuming you copy+pasted that from the command line and grabbed the dollar sign (standard Unix command-line prompt) and it ended up in your command definition. In the future, please indicate such things when posting questions so we can catch them right away.
Re: check_blackberry5 and error (Return code of 127)
Posted: Tue Mar 11, 2014 1:18 pm
by heritages
please indicate such things??? Really???
If you look at the very first post you will notice that the $ is there on all of the commands. As I'm new to Nagios its impossible for me to know what was supposed to be there and what wasn't. Hence my post requesting assistance.
Thank you for the solution. The $ was the problem and the final stepping stone to getting this working. Thanks everyone for you imput. Much appreciated.
Take care,
Re: check_blackberry5 and error (Return code of 127)
Posted: Tue Mar 11, 2014 1:28 pm
by tmcdonald
heritages wrote:please indicate such things??? Really???
Yes, really. Copying+pasting is not always the best way to move text from one location to another, precisely because you can end up with dangling newlines, non-printing characters, extra leading or trailing spaces, or in this case stray symbols. The dollar sign is a standard Unix command prompt symbol, followed closely in popularity with the pound sign. Neither one should be included as part of the command, just as you would not include the "root@localhost: " portion either.