Page 1 of 1

Help to troubleshoot check_oracle_health

Posted: Fri Mar 31, 2017 12:09 pm
by bennyboy
Hi,

Can you help me with that plugin please : check_oracle_health. We try to understand how to use the --mode sql. I already install the plugin with all the prereq and the oracle client work fine.
https://labs.consol.de/nagios/check_ora ... index.html

I use

Code: Select all

/usr/local/nagios/libexec/check_oracle_health --connect test --mode tnsping
and have that response

Code: Select all

OK - connection established to test.
Sound good at this point. I also try

Code: Select all

/usr/local/nagios/libexec/check_oracle_health --connect test --username=test --password=test --mode tnsping
and got that response

Code: Select all

OK - 0.27 seconds to connect as test | connection_time=0.2671;1;5
I got couple warning/error when I try to use the mode sql-runtime.

Code: Select all

/usr/local/nagios/libexec/check_oracle_health --connect=test --username=test --password=test --mode=sql-runtime –name=select%20%2A%20from%20TESTNAGIOS%2ECHECK%5FR5841003%5FELAPSE%3B
The warning/error is :

Code: Select all

Use of uninitialized value $sql in sprintf at /usr/local/nagios/libexec/check_oracle_health line 6189.
Use of uninitialized value in subroutine entry at /usr/local/lib64/perl5/DBD/Oracle.pm line 348.
Use of uninitialized value $params{"selectname"} in sprintf at /usr/local/nagios/libexec/check_oracle_health line 5165.
OK - 0.00 seconds to execute  | sql_runtime=0.0010;1;5
The real problem occur when I try to use mode sql.

Code: Select all

/usr/local/nagios/libexec/check_oracle_health --connect=test --username=test --password=test --mode=sql –name=select%20%2A%20from%20TESTNAGIOS%2ECHECK%5FR5841003%5FELAPSE%3B
I got that

Code: Select all

Use of uninitialized value $sql in sprintf at /usr/local/nagios/libexec/check_oracle_health line 6189.
Use of uninitialized value in subroutine entry at /usr/local/lib64/perl5/DBD/Oracle.pm line 348.
Use of uninitialized value $params{"selectname"} in concatenation (.) or string at /usr/local/nagios/libexec/check_oracle_health line 5081.
UNKNOWN - got no valid response for  - ORA-24373: la longueur indiquee n'est pas valide pour l'instruction (DBD ERROR: OCIStmtPrepare)
If I use sqlplus to see the result of that query.

Code: Select all

select * from TESTNAGIOS.CHECK_R5841003_ELAPSE;
result is

Code: Select all

DUREE
------------------------------------------
629
Normally I speak french :) I have to practice my english.

Thank you in advance !!!

Re: Help to troubleshoot check_oracle_health

Posted: Fri Mar 31, 2017 12:26 pm
by mcapra
We didn't develop this plugin, so the assistance we can offer may be limited.

Does using 2 dashes on --name help? Like so:

Code: Select all

/usr/local/nagios/libexec/check_oracle_health --connect=test --username=test --password=test --mode=sql –-name=select%20%2A%20from%20TESTNAGIOS%2ECHECK%5FR5841003%5FELAPSE%3B

Re: Help to troubleshoot check_oracle_health

Posted: Tue Apr 04, 2017 2:16 pm
by bennyboy
Typo :) Thank a lot :)

Re: Help to troubleshoot check_oracle_health

Posted: Tue Apr 04, 2017 3:13 pm
by cdienger
Was there anything further we can help with or are we okay to close the thread?

Re: Help to troubleshoot check_oracle_health

Posted: Tue Apr 04, 2017 8:51 pm
by bennyboy
Yes you can close it.