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.
[nagios@kallisto libexec]$ /usr/local/nagios/libexec/check_oracle_instant --help
: Not a directory/libexec/check_oracle_instant: line 1: /usr/bin/perl/
: command not foundibexec/check_oracle_instant: line 2:
/usr/local/nagios/libexec/check_oracle_instant: line 3: =: command not found
: command not foundibexec/check_oracle_instant: line 3:
/usr/local/nagios/libexec/check_oracle_instant: line 4: =: command not found
: command not foundibexec/check_oracle_instant: line 4:
/usr/local/nagios/libexec/check_oracle_instant: line 5: =: command not found
: command not foundibexec/check_oracle_instant: line 5:
/usr/local/nagios/libexec/check_oracle_instant: line 6: =: command not found
: command not foundibexec/check_oracle_instant: line 6:
/usr/local/nagios/libexec/check_oracle_instant: line 7: =: command not found
: command not foundibexec/check_oracle_instant: line 7:
: command not foundibexec/check_oracle_instant: line 8:
/usr/local/nagios/libexec/check_oracle_instant: line 9: syntax error near unexpected token `('
'usr/local/nagios/libexec/check_oracle_instant: line 9: `sub trim($);
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
bash: /usr/local/nagios/libexec/check_oracle_instant: /usr/bin/perl/^M: bad interpreter: Not a directory
and on the nagios interface the error is
Return code of 126 is out of bounds - plugin may be missing)
GRRRRRRRRR
I am assuming you copy+pasted this plugin or otherwise transferred it from a Windows machine? The ^M character is a end-of-line character that causes some problems in Linux. Try the following, bearing in mind that for "^M" you need to hit CTRL+v then CTRL+m, and it should appear as a single character (you can't move the cursor between the ^ and the M):
which perl
yum install dos2unix -y
dos2unix /usr/local/nagios/libexec/check_oracle_instant
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.