Page 1 of 1

(No output on stdout) stderr: when running oracle monitoring

Posted: Sun Sep 13, 2020 11:45 pm
by magpantayr
Hello,

Had previous post regarding this but was closed since I was not able to reply.
https://support.nagios.com/forum/viewto ... 16&t=52832

Anyway, Oracle was installed according to this post: https://assets.nagios.com/downloads/nag ... ios-XI.pdf


But no output is being produced on my command
This was previously working (since I was experimenting a lot, it suddenly did not work anymore)

Here is the command:

Code: Select all

[root@CBAS035A ~]# /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'CBDB017:1521' --username 'dbaread' --password 'cbdbaread' --mode tablespace-usage --warning 90 --critical 98
[root@CBAS035A ~]#
Thanks in advanced

Re: (No output on stdout) stderr: when running oracle monito

Posted: Mon Sep 14, 2020 5:52 pm
by benjaminsmith
Hi,

Sorry that the forum thread was locked up by the time you needed to reply. Can you post the output of the following command so we can verify the permissions?

Code: Select all

ls -lR /usr/lib/oracle

Re: (No output on stdout) stderr: when running oracle monito

Posted: Mon Sep 14, 2020 8:24 pm
by magpantayr
Hello,

Here is the result:

Code: Select all

[root@CBAS035A ~]# ls -lR /usr/lib/oracle
/usr/lib/oracle:
total 0
drwxr-xr-x 3 root root 22 Oct 11  2018 12.1

/usr/lib/oracle/12.1:
total 0
drwxr-xr-x 5 root root 43 Mar  4  2019 client64

/usr/lib/oracle/12.1/client64:
total 4
drwxr-xr-x 2 root root   48 Oct 11  2018 bin
drwxr-xr-x 2 root root 4096 Oct 11  2018 lib
drwxr-xr-x 3 root root   19 Mar  4  2019 network

/usr/lib/oracle/12.1/client64/bin:
total 56
-rwxr-xr-x 1 root root  8968 Jul  7  2014 adrci
-rwxr-xr-x 1 root root 34104 Jul  7  2014 genezi
-rwxr-xr-x 1 root root  5048 Jul  7  2014 sqlplus

/usr/lib/oracle/12.1/client64/lib:
total 193244
-rw-r--r-- 1 root root       342 Jul  7  2014 glogin.sql
lrwxrwxrwx 1 root root        21 Oct 11  2018 libclntshcore.so -> libclntshcore.so.12.1
-rw-r--r-- 1 root root   6990875 Jul  7  2014 libclntshcore.so.12.1
lrwxrwxrwx 1 root root        17 Oct 11  2018 libclntsh.so -> libclntsh.so.12.1
-rw-r--r-- 1 root root  58793741 Jul  7  2014 libclntsh.so.12.1
-rw-r--r-- 1 root root   1768370 Jul  7  2014 libipc1.so
-rw-r--r-- 1 root root    544150 Jul  7  2014 libmql1.so
-rw-r--r-- 1 root root   6213011 Jul  7  2014 libnnz12.so
lrwxrwxrwx 1 root root        15 Oct 11  2018 libocci.so -> libocci.so.12.1
-rw-r--r-- 1 root root   2576030 Jul  7  2014 libocci.so.12.1
-rw-r--r-- 1 root root 109549133 Jul  7  2014 libociei.so
-rw-r--r-- 1 root root    156353 Jul  7  2014 libocijdbc12.so
-rw-r--r-- 1 root root    337137 Jul  7  2014 libons.so
-rw-r--r-- 1 root root    118491 Jul  7  2014 liboramysql12.so
-rw-r--r-- 1 root root   1564082 Jul  7  2014 libsqlplusic.so
-rw-r--r-- 1 root root   1546540 Jul  7  2014 libsqlplus.so
-rw-r--r-- 1 root root   3670975 Jul  7  2014 ojdbc6.jar
-rw-r--r-- 1 root root   3677511 Jul  7  2014 ojdbc7.jar
-rw-r--r-- 1 root root    311555 Jul  7  2014 ottclasses.zip
-rw-r--r-- 1 root root     35925 Jul  7  2014 xstreams.jar

/usr/lib/oracle/12.1/client64/network:
total 0
drwxr-xr-x 2 root root 26 Mar  4  2019 admin

/usr/lib/oracle/12.1/client64/network/admin:
total 4
-rw-r--r-- 1 root root 196 Mar  4  2019 tnsnames.ora
[root@CBAS035A ~]#

Re: (No output on stdout) stderr: when running oracle monito

Posted: Tue Sep 15, 2020 4:05 pm
by benjaminsmith
Hi,

Thanks for posting the permissions on those files. The library files have a different permisions settings when compared to my test system here.

Code: Select all

 ( I'm using 18.5).
-rwxr-xr-x 1 root root       342 Feb 26  2019 glogin.sql
-rwxr-xr-x 1 root root   8357160 Feb 26  2019 libclntshcore.so.18.1
lrwxrwxrwx 1 root root        17 Feb 26  2019 libclntsh.so -> libclntsh.so.18.1
-rwxr-xr-x 1 root root  78200832 Feb 26  2019 libclntsh.so.18.1
-rwxr-xr-x 1 root root   3551217 Feb 26  2019 libipc1.so
-rwxr-xr-x 1 root root    467932 Feb 26  2019 libmql1.so
-rwxr-xr-x 1 root root   6636088 Feb 26  2019 libnnz18.so
lrwxrwxrwx 1 root root        15 Feb 26  2019 libocci.so -> libocci.so.18.1
-rwxr-xr-x 1 root root   2282891 Feb 26  2019 libocci.so.18.1
-rwxr-xr-x 1 root root 126959616 Feb 26  2019 libociei.so
-rwxr-xr-x 1 root root    160875 Feb 26  2019 libocijdbc18.so
-rwxr-xr-x 1 root root    394835 Feb 26  2019 libons.so
-rwxr-xr-x 1 root root    117635 Feb 26  2019 liboramysql18.so
-rwxr-xr-x 1 root root   1655813 Feb 26  2019 libsqlplusic.so
-rwxr-xr-x 1 root root   1616347 Feb 26  2019 libsqlplus.so
drwxr-xr-x 3 root root        19 Sep 15 15:52 network
-rw-r--r-- 1 root root   4109057 Feb 26  2019 ojdbc8.jar
-rw-r--r-- 1 root root    313025 Feb 26  2019 ottclasses.zip
-rw-r--r-- 1 root root     37519 Feb 26  2019 xstreams.jar
It's worthing changing the permission on those files to 755 and testing again before attempting to re-run install script. Are you using a VM or physical server ( can you take a snapshot before making any changes)?

Re: (No output on stdout) stderr: when running oracle monito

Posted: Tue Sep 15, 2020 4:07 pm
by ssax
In addition to what @benjaminsmith posted (please follow it), does this work?

Code: Select all

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'CBDB017:1521' --username 'dbaread' --password 'cbdbaread' --mode tablespace-usage --warning 90 --critical 98 --method sqlplus -v

Re: (No output on stdout) stderr: when running oracle monito

Posted: Tue Sep 15, 2020 9:06 pm
by magpantayr
Hello @benjaminesmith,

We're using physical server right now. I'll perform a backup before proceeding with the changes.

Hello @ssax,

Here is the result of the command: (still no output)

Code: Select all

[root@CBAS035A ~]# /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'CBDB017:1521' --username 'dbaread' --password 'cbdbaread' --mode tablespace-usage --warning 90 --critical 98 --method sqlplus -v
[root@CBAS035A ~]#
I'll try again after updating the rights on the files. I'll perform a backup first.

Thanks!

Re: (No output on stdout) stderr: when running oracle monito

Posted: Tue Sep 15, 2020 10:08 pm
by magpantayr
Hello,

Updating the rights on the files/folders but still no output:

Code: Select all

[root@CBAS035A ~]# chmod -R 775 /usr/lib/oracle
[root@CBAS035A ~]# ls -lR /usr/lib/oracle
/usr/lib/oracle:
total 0
drwxrwxr-x 3 root root 22 Oct 11  2018 12.1

/usr/lib/oracle/12.1:
total 0
drwxrwxr-x 5 root root 43 Mar  4  2019 client64

/usr/lib/oracle/12.1/client64:
total 4
drwxrwxr-x 2 root root   48 Oct 11  2018 bin
drwxrwxr-x 2 root root 4096 Oct 11  2018 lib
drwxrwxr-x 3 root root   19 Mar  4  2019 network

/usr/lib/oracle/12.1/client64/bin:
total 56
-rwxrwxr-x 1 root root  8968 Jul  7  2014 adrci
-rwxrwxr-x 1 root root 34104 Jul  7  2014 genezi
-rwxrwxr-x 1 root root  5048 Jul  7  2014 sqlplus

/usr/lib/oracle/12.1/client64/lib:
total 193244
-rwxrwxr-x 1 root root       342 Jul  7  2014 glogin.sql
lrwxrwxrwx 1 root root        21 Oct 11  2018 libclntshcore.so -> libclntshcore.so.12.1
-rwxrwxr-x 1 root root   6990875 Jul  7  2014 libclntshcore.so.12.1
lrwxrwxrwx 1 root root        17 Oct 11  2018 libclntsh.so -> libclntsh.so.12.1
-rwxrwxr-x 1 root root  58793741 Jul  7  2014 libclntsh.so.12.1
-rwxrwxr-x 1 root root   1768370 Jul  7  2014 libipc1.so
-rwxrwxr-x 1 root root    544150 Jul  7  2014 libmql1.so
-rwxrwxr-x 1 root root   6213011 Jul  7  2014 libnnz12.so
lrwxrwxrwx 1 root root        15 Oct 11  2018 libocci.so -> libocci.so.12.1
-rwxrwxr-x 1 root root   2576030 Jul  7  2014 libocci.so.12.1
-rwxrwxr-x 1 root root 109549133 Jul  7  2014 libociei.so
-rwxrwxr-x 1 root root    156353 Jul  7  2014 libocijdbc12.so
-rwxrwxr-x 1 root root    337137 Jul  7  2014 libons.so
-rwxrwxr-x 1 root root    118491 Jul  7  2014 liboramysql12.so
-rwxrwxr-x 1 root root   1564082 Jul  7  2014 libsqlplusic.so
-rwxrwxr-x 1 root root   1546540 Jul  7  2014 libsqlplus.so
-rwxrwxr-x 1 root root   3670975 Jul  7  2014 ojdbc6.jar
-rwxrwxr-x 1 root root   3677511 Jul  7  2014 ojdbc7.jar
-rwxrwxr-x 1 root root    311555 Jul  7  2014 ottclasses.zip
-rwxrwxr-x 1 root root     35925 Jul  7  2014 xstreams.jar

/usr/lib/oracle/12.1/client64/network:
total 0
drwxrwxr-x 2 root root 26 Mar  4  2019 admin

/usr/lib/oracle/12.1/client64/network/admin:
total 4
-rwxrwxr-x 1 root root 196 Mar  4  2019 tnsnames.ora

Re: (No output on stdout) stderr: when running oracle monito

Posted: Wed Sep 16, 2020 5:41 pm
by cdienger
What kind of 'experimenting' took place? Were any changes made to the /usr/local/nagios/libexec/check_oracle_health plugin? It may be worth downloading and installing it again - https://labs.consol.de/nagios/check_ora ... stallation