I just installed the the required plugins needed for the Oracle check. I am following the Nagios instructions. After I was able to figure out the session errors, I am now running into issues with the command string executing. Here is the string I am running:
Code: Select all
-connect "host:1521/db1" --username dbusr --password "passwd" --mode sql --name="select count(1) from v\$session" --warning 50 --critical 200
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client $USER1$/check_oracle_health $ARG1$
ARG1 -> -connect "host:1521/db1" --username dbusr --password "passwd" --mode sql --name="select count(1) from v\$session" --warning 50 --critical 200
The error I get is as follows:
COMMAND: /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle_health -connect "host:1521/db1" --username dbusr --password "passwd" --mode sql --name="select count\(1\) from v\\\$session" --warning 50 --critical 200
OUTPUT: UNKNOWN - got no valid response for select count\(1\) from v\$session - ORA-00911: invalid character (DBD ERROR: error possibly near <*> indicator at char 12 in 'select count<*>\(1\) from v\$session')
Code: Select all
./check_oracle_health -connect "host:1521/db1" --username dbusr --password "passwd" --mode sql --name="select count(1) from v\$session" --warning 50 --critical 200
OK - select count(1) from v$session: 36 | 'select'=36;50;200
I am running this on RHEL 6.5 64 and the version of XI is 2014 r1.3
Thanks,
David