Oracle Installation Issues

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
pendekar6
Posts: 7
Joined: Tue Mar 01, 2022 11:41 am

Oracle Installation Issues

Post by pendekar6 »

Hi,

I've been trying to monitoring our Oracle DB (version 19.6.0) but we encounter an error (Please refer to error1.1).

I then proceed with reinstalling perl as suggested in this guide (https://assets.nagios.com/downloads/nag ... ios-XI.pdf) but return an error. See screen capture (error 2 & 3).

Please note that I'm using Oracle Instant Client version 21.5.

Any help would be great!
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Oracle Installation Issues

Post by pbroste »

Hello @pendekar6

Thanks for reaching out, passing the lib paths as part of the actual command execution, with that looks like CPAN may require an update(s) and configured.

Plugin is referenced and has some configuration steps:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

By default the LD_LIBRARY_PATH=/usr/lib/oracle/xx.x/client64/lib.

Posted:
The check_oracle_health plugin command:

Code: Select all

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/xx.x/client/lib ORACLE_HOME=/usr/lib/oracle/xx.x/client /usr/local/nagios/libexec/check_oracle_health --connect '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1657))(CONNECT_DATA=(SID=lab01)))' --user monitor --password egal --mode tnsping
Please let us know how things are looking,
Perry
pendekar6
Posts: 7
Joined: Tue Mar 01, 2022 11:41 am

Re: Oracle Installation Issues

Post by pendekar6 »

Hello @pbroste.

I have already followed the guide and make the changes to my LD_Library and Oracle_Home path. (Please refer to attachment 1).

Below are the output of the first command (attachment3). As for the second command, can you help as I dont understand the syntax (Assuming my ip address is 192.168.1.1), can you help to translate that to a command?
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Oracle Installation Issues

Post by pbroste »

Hello @pendekar6

Thanks for following up with the screenshots, let's check the following:

Code: Select all

less /usr/local/nagiosxi/etc/configwizards/oracle/oracle
export LD_LIBRARY_PATH=/usr/lib/oracle/21/client/lib
export ORACLE_HOME=/usr/lib/oracle/21/client
~

Code: Select all

ls -la /usr/lib/oracle/
Results:
/usr/lib/oracle/:
total 4
drwxr-xr-x 3 root root 16 Mar 10 15:07 .
dr-xr-xr-x. 39 root root 4096 Mar 10 15:07 ..
drwxr-xr-x 3 root root 22 Mar 10 15:07 21

/usr/lib/oracle/21:
total 0
drwxr-xr-x 3 root root 22 Mar 10 15:07 .
drwxr-xr-x 3 root root 16 Mar 10 15:07 ..
drwxr-xr-x 4 root root 28 Mar 10 15:07 client64

/usr/lib/oracle/21/client64:
total 4
drwxr-xr-x 4 root root 28 Mar 10 15:07 .
drwxr-xr-x 3 root root 22 Mar 10 15:07 ..
drwxr-xr-x 2 root root 33 Mar 10 15:07 bin
drwxr-xr-x 3 root root 4096 Mar 10 15:08 lib

/usr/lib/oracle/21/client64/bin:
total 104
drwxr-xr-x 2 root root 33 Mar 10 15:07 .
drwxr-xr-x 4 root root 28 Mar 10 15:07 ..
-rwxr-xr-x 1 root root 41720 Jan 21 10:04 adrci
-rwxr-xr-x 1 root root 59192 Jan 21 10:04 genezi

/usr/lib/oracle/21/client64/lib:
total 242996
drwxr-xr-x 3 root root 4096 Mar 10 15:08 .
drwxr-xr-x 4 root root 28 Mar 10 15:07 ..
lrwxrwxrwx 1 root root 21 Jan 21 10:04 libclntshcore.so -> libclntshcore.so.21.1
-rwxr-xr-x 1 root root 8055192 Jan 21 10:04 libclntshcore.so.21.1
lrwxrwxrwx 1 root root 17 Jan 21 10:04 libclntsh.so -> libclntsh.so.21.1
lrwxrwxrwx 1 root root 17 Jan 21 10:04 libclntsh.so.10.1 -> libclntsh.so.21.1
lrwxrwxrwx 1 root root 17 Jan 21 10:04 libclntsh.so.11.1 -> libclntsh.so.21.1
lrwxrwxrwx 1 root root 17 Jan 21 10:04 libclntsh.so.12.1 -> libclntsh.so.21.1
lrwxrwxrwx 1 root root 17 Jan 21 10:04 libclntsh.so.18.1 -> libclntsh.so.21.1
lrwxrwxrwx 1 root root 17 Jan 21 10:04 libclntsh.so.19.1 -> libclntsh.so.21.1
lrwxrwxrwx 1 root root 17 Jan 21 10:04 libclntsh.so.20.1 -> libclntsh.so.21.1
-rwxr-xr-x 1 root root 83578480 Jan 21 10:04 libclntsh.so.21.1
-rwxr-xr-x 1 root root 5699488 Jan 21 10:04 libnnz21.so
lrwxrwxrwx 1 root root 21 Jan 21 10:04 libocci_gcc53.so -> libocci_gcc53.so.21.1
-rwxr-xr-x 1 root root 954992 Jan 21 10:04 libocci_gcc53.so.21.1
lrwxrwxrwx 1 root root 15 Jan 21 10:04 libocci.so -> libocci.so.21.1
lrwxrwxrwx 1 root root 15 Jan 21 10:04 libocci.so.10.1 -> libocci.so.21.1
lrwxrwxrwx 1 root root 15 Jan 21 10:04 libocci.so.11.1 -> libocci.so.21.1
lrwxrwxrwx 1 root root 15 Jan 21 10:04 libocci.so.12.1 -> libocci.so.21.1
lrwxrwxrwx 1 root root 15 Jan 21 10:04 libocci.so.18.1 -> libocci.so.21.1
lrwxrwxrwx 1 root root 15 Jan 21 10:04 libocci.so.19.1 -> libocci.so.21.1
lrwxrwxrwx 1 root root 15 Jan 21 10:04 libocci.so.20.1 -> libocci.so.21.1
-rwxr-xr-x 1 root root 2371952 Jan 21 10:04 libocci.so.21.1
-rwxr-xr-x 1 root root 142717360 Jan 21 10:04 libociei.so
-rwxr-xr-x 1 root root 153312 Jan 21 10:04 libocijdbc21.so
-rwxr-xr-x 1 root root 115808 Jan 21 10:04 liboramysql.so
drwxr-xr-x 3 root root 19 Mar 10 15:08 network
-rw-r--r-- 1 root root 5077628 Jan 21 10:04 ojdbc8.jar
-rw-r--r-- 1 root root 74603 Jan 21 10:04 xstreams.jar

/usr/lib/oracle/21/client64/lib/network:
total 4
drwxr-xr-x 3 root root 19 Mar 10 15:08 .
drwxr-xr-x 3 root root 4096 Mar 10 15:08 ..
drwxr-xr-x 2 root root 20 Mar 10 15:08 admin

/usr/lib/oracle/21/client64/lib/network/admin:
total 4
drwxr-xr-x 2 root root 20 Mar 10 15:08 .
drwxr-xr-x 3 root root 19 Mar 10 15:08 ..
-rw-r--r-- 1 root root 502 Jan 21 10:04 README

Code: Select all

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/21/client/lib ORACLE_HOME=/usr/lib/oracle/21/client /usr/local/nagios/libexec/check_oracle --version
Results:
check_oracle v2.3.3 (nagios-plugins 2.3.3)

The Nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Usage:
check_oracle --tns <Oracle Sid or Hostname/IP address>
check_oracle --db <ORACLE_SID>
check_oracle --login <ORACLE_SID>
check_oracle --connect <ORACLE_SID>
check_oracle --cache <ORACLE_SID> <USER> <PASS> <CRITICAL> <WARNING>
check_oracle --tablespace <ORACLE_SID> <USER> <PASS> <TABLESPACE> <CRITICAL> <WARNING>
check_oracle --oranames <Hostname>
check_oracle --help
check_oracle --version

Check Oracle status

--tns SID/IP Address
Check remote TNS server
--db SID
Check local database (search /bin/ps for PMON process) and check
filesystem for sgadefORACLE_SID.dbf
--login SID
Attempt a dummy login and alert if not ORA-01017: invalid username/password
--connect SID
Attempt a login and alert if an ORA- error is returned
--cache
Check local database for library and buffer cache hit ratios
---> Requires Oracle user/password and SID specified.
---> Requires select on v_ and v_
--tablespace
Check local database for tablespace capacity in ORACLE_SID
---> Requires Oracle user/password specified.
---> Requires select on dba_data_files and dba_free_space
--oranames Hostname
Check remote Oracle Names server
--help
Print this help screen
--version
Print version and license information

If the plugin doesn't work, check that the ORACLE_HOME environment
variable is set, that ORACLE_HOME/bin is in your PATH, and the
tnsnames.ora file is locatable and is properly configured.

When checking local database status your ORACLE_SID is case sensitive.

If you want to use a default Oracle home, add in your oratab file:
*:/opt/app/oracle/product/7.3.4:N

Send email to help@nagios-plugins.org if you have questions regarding use
of this software. To submit patches or suggest improvements, send email to
devel@nagios-plugins.org. Please include version information with all
correspondence (when possible, use output from the --version option of the
plugin itself).
Thanks,
Perry
pendekar6
Posts: 7
Joined: Tue Mar 01, 2022 11:41 am

Re: Oracle Installation Issues

Post by pendekar6 »

Hi Perry,

Thanks for replying. Please find the attach for the results. Also I have also attached the error from nagiosxi web interface and my system information. Hope that helps.
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Oracle Installation Issues

Post by pbroste »

Hello @pendekar6

When you run this command what are you receiving for results?

Code: Select all

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/21/client/lib ORACLE_HOME=/usr/lib/oracle/21/client /usr/local/nagios/libexec/check_oracle --version
We're moving to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.
Thanks,
Perry
pendekar6
Posts: 7
Joined: Tue Mar 01, 2022 11:41 am

Re: Oracle Installation Issues

Post by pendekar6 »

pbroste wrote:Hello @pendekar6

When you run this command what are you receiving for results?

Code: Select all

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/21/client/lib ORACLE_HOME=/usr/lib/oracle/21/client /usr/local/nagios/libexec/check_oracle --version
We're moving to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.
Thanks,
Perry
Hi Perry, attached is the command output you requested.
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Oracle Installation Issues

Post by pbroste »

Hello @pendekar6

What's the output of the database status in my db servers using the command below by setting the environment ORACLE_HOME:


Code: Select all

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib ORACLE_HOME=/usr/lib/oracle/21/client64 /usr/local/nagios/libexec/check_oracle --tns <Oracle Sid or Hostname/IP address>
or

Code: Select all

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib ORACLE_HOME=/usr/lib/oracle/21/client64 /usr/local/nagios/libexec/check_oracle --db <ORACLE_SID>
Please let us know the results,
Perry

p.s.
We're moving to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.
pendekar6
Posts: 7
Joined: Tue Mar 01, 2022 11:41 am

Re: Oracle Installation Issues

Post by pendekar6 »

pbroste wrote:Hello @pendekar6

What's the output of the database status in my db servers using the command below by setting the environment ORACLE_HOME:


Code: Select all

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib ORACLE_HOME=/usr/lib/oracle/21/client64 /usr/local/nagios/libexec/check_oracle --tns <Oracle Sid or Hostname/IP address>
or

Code: Select all

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib ORACLE_HOME=/usr/lib/oracle/21/client64 /usr/local/nagios/libexec/check_oracle --db <ORACLE_SID>
Please let us know the results,
Perry

p.s.
We're moving to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.
Hi Perry,

Please refer to below for the command output.
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Oracle Installation Issues

Post by pbroste »

Hello @pendekar6

The error message cannot find tnsping

"The tnsping command displays the location of the $ORACLE_HOME and the configuration files sqlnet. ora and tnsnames. ora. If there is more than one Oracle client installation in your environment, ensure that the changes in the tnsnames."

Meaning that we need to export the path if not by:

Code: Select all

echo $ORACLE_HOME
Verify that the path is correct, if not please correct

Code: Select all

export PATH=$PATH:$ORACLE_HOME/bin
This will add it to the system path

Once the path has been added you will be able to run:

Code: Select all

which tnsping
And

Code: Select all

tnsping
Thanks,
Perry
Locked