Page 2 of 2

Re: Three Oracle db status need to be monitor ...

Posted: Thu Sep 05, 2013 9:41 am
by slansing
I don't think this has been covered yet, but have you ran through:

http://assets.nagios.com/downloads/nagi ... lation.pdf

I'd suggest making another pass so nothing is missed. Please point out if you run into any issues however small they may be.

Re: Three Oracle db status need to be monitor ...

Posted: Mon Sep 09, 2013 1:04 pm
by xpertech
It seems that the environment variable not being set properly, but we had followed that document, still can not go through?! same error message. wondering what and where the environment variable to be setup?

for time savings, could we open a case to find out what the problem is?

Re: Three Oracle db status need to be monitor ...

Posted: Mon Sep 09, 2013 1:45 pm
by sreinhardt
You can always send in an email to [email protected] however since you are testing via cli the escaping and $user9$ will not work. According to the error, you are missing some of the so files.

Code: Select all

ll /usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so
locate Oracle.so
locate libocci.so

Re: Three Oracle db status need to be monitor ...

Posted: Fri Oct 11, 2013 1:59 pm
by abrist
NECRO ALERT!

I resolved a similar problem in a remote today. The solution is to url encode sql mode queries with special characters (the plugin supports url encoding). So the following query:

Code: Select all

--name="select count(*) from v\$session where status = 'active'"
Actually needs to be (remove the wrapping double quotes and encode):

Code: Select all

--name=select%20count(*)%20from%20v%24session%20where%20status%20%3D%20%27active%27 
I just thought I would necro this thread for future forum goers and google site searchers.

Re: Three Oracle db status need to be monitor ...

Posted: Sat Oct 12, 2013 2:38 am
by xpertech
There are two point should be noted ...

1. When using cli command in querying Oracle DB from NagiosXI, you should add environment variables in front of script, e.g.

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect 192.168.1.107:1521/test01 --username system --password Passw0rd --mode sql --name="select count(*) from v\$session where status='ACTIVE'" --warning 30 --critical 100

note the two place marked red,
** you should add Oracle service port 1521 and DB name.
** you should use single Backslash(v\$session) and single quote and upper case(depend on Oracle's command).

2. When using GUI in querying Oracle DB from NagiosXI, the above example should use double Backslash(v\\$session).

Re: Three Oracle db status need to be monitor ...

Posted: Mon Oct 14, 2013 9:12 am
by slansing
xpertech,

Are you saying that you resolved this using the above method?

Re: Three Oracle db status need to be monitor ...

Posted: Tue Oct 15, 2013 1:10 am
by xpertech
slansing wrote:xpertech,

Are you saying that you resolved this using the above method?
Yes! 8-)