Page 1 of 1

check_xi_oraclequery doesn't work!!!

Posted: Fri Mar 22, 2024 8:51 am
by BICE
Hi all,

We are trying this check from Nagios XI 5.11.3:

check_xi_oraclequery!--connect=<CONN> --user=<USER> --password=<PASS> --mode=sql --name="select count(*) from TABLE where gls_tipo_pago='V' and cod=60 and exp_date=to_char(sysdate, 'dd-mm-yyyy') and oper_date=to_char(sysdate, 'dd-mm-yyyy')" --critical @1

And we're not getting any result or error message.

This SQL query works just fine in SQLDeveloper or SQLPlus...

We appreciate any help

Re: check_xi_oraclequery doesn't work!!!

Posted: Fri Mar 22, 2024 9:27 am
by gwesterman
Hi @BICE,

Have you tried running the plugin from the command line? What happens when you try that?

Re: check_xi_oraclequery doesn't work!!!

Posted: Fri Mar 22, 2024 1:55 pm
by BICE
Yes, We got this UNKNOWN message:

UNKNOWN - got no valid response for select count(*) from TABLE where gls_tipo_pago='V' and cod=60 and exp_date=to_char(sysdate, 'dd-mm-yyyy') and oper_date=to_char(sysdate, 'dd-mm-yyyy') - ORA-00942: table or view does not exist (DBD ERROR: error possibly near <*> indicator at char 21 in ' SELECT version FROM <*>v$instance ')


We tried the check without this part of query--> 'and exp_date=to_char(sysdate, 'dd-mm-yyyy') and oper_date=to_char(sysdate, 'dd-mm-yyyy')' and the plugin returns a value successfully...

But we need is to be able to execute the full query.

Re: check_xi_oraclequery doesn't work!!!

Posted: Mon Mar 25, 2024 9:46 am
by cnorell
Did this query work in the past, or did you recently add this check to Nagios XI?

Re: check_xi_oraclequery doesn't work!!!

Posted: Mon Mar 25, 2024 11:13 am
by BICE
@cnorell

this is a brand new check that we need...