Problem executing query using check_xi_oraclequery
Posted: Fri Apr 05, 2013 12:22 pm
Hi,
I have a small problem while executing a oracle query. I am not getting any output on nagios.
Here are the details.
COMMAND: /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health -connect IP:PORT/DBNAME --username ABCD --password "ABDC" --mode sql --name="select nvl(max(last_ran), 0) from (select (sysdate - max(last_update_timestamp)) * 1440 last_ran from flowrun_metrics where brand_name != 'ABA_CDE_FGH' and last_update_timestamp > sysdate - 1 group by brand_name)" --critical 30
OUTPUT: UNKNOWN - got no valid response for "select - ORA-01740: missing double quote in identifier (DBD ERROR: OCIStmtPrepare) which is showing as (null)
where as my expected output should look like (NVL(MAX(LAST_RAN),0))=1.65|NVLMAXLASTRAN0=1.65;;;0
What am I missing here...!
I have a small problem while executing a oracle query. I am not getting any output on nagios.
Here are the details.
COMMAND: /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health -connect IP:PORT/DBNAME --username ABCD --password "ABDC" --mode sql --name="select nvl(max(last_ran), 0) from (select (sysdate - max(last_update_timestamp)) * 1440 last_ran from flowrun_metrics where brand_name != 'ABA_CDE_FGH' and last_update_timestamp > sysdate - 1 group by brand_name)" --critical 30
OUTPUT: UNKNOWN - got no valid response for "select - ORA-01740: missing double quote in identifier (DBD ERROR: OCIStmtPrepare) which is showing as (null)
where as my expected output should look like (NVL(MAX(LAST_RAN),0))=1.65|NVLMAXLASTRAN0=1.65;;;0
What am I missing here...!