Page 1 of 1

Problems installing CHECK_ORACLE_HEALTH

Posted: Wed Feb 10, 2021 11:17 am
by turbine2
Good afternoon,
I've had a quick search but I can't find a good match.
I have downloaded and installed Nagios Core and tried to compile the CHECK_ORACLE_HEALTH addin from https://labs.consol.de/nagios/check_oracle_health/
The machine I have nagios on is Oracle Linux 8 (RedHat 8) machine. The database server I am connecting to is an Oracle 19 server and I have installed the Oracle client from the dnf repository (comes up as 21 client).
I /think/ I have correctly installed the perl-modules DBI and DBD::Oracle but it's entirely possible I have got that wrong (there were many warnings but no errors).
From the command line as the nagios user I can use sqlplus to connect to my database successfully.

Code: Select all

sqlplus <user>/<password>@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=my-oracle-server)(Port=1521))(CONNECT_DATA=(SID=orcl)))
SQL*Plus: Release 21.0.0.0.0 - Production on Wed Feb 10 16:10:40 2021
Version 21.1.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Last Successful login time: Wed Feb 10 2021 15:56:53 +00:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.5.0.0.0
However if I try this with check_oracle_health I get an error

Code: Select all

./check_oracle_health --connect <user>/<password>@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=my-oracle-server)(Port=1521))(CONNECT_DATA=(SID=orcl))) --mode connection-time
CRITICAL - cannot connect to <user>/***@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=my-oracle-server)(Port=1521))(CONNECT_DATA=(SID=orcl))). ORA-06413: Connection not open. (DBD ERROR: OCIServerAttach)
Looking around the internet for that ORA error isn't very helpful (most relate to Oracle on Windows and this is on Linux).

Would anyone have any pointers as to where I should be looking. I have to admit that I'm not confident that the perl stuff is correct, but before I was getting a different error when I didn't have the perl stuff done.

Thanks in advance for any guidance and pointers.

David

Re: Problems installing CHECK_ORACLE_HEALTH

Posted: Mon Feb 15, 2021 5:08 am
by turbine2
Would anyone have a pointer on how I can check if the perl stuff is okay at least?

Re: Problems installing CHECK_ORACLE_HEALTH

Posted: Wed Feb 17, 2021 3:37 am
by turbine2
I managed to fix it myself in the end. I had to replace the connection string and use a TNSNAMES.ORA file instead. Not the way I would have preferred to go but it's working and that's what is important.