Three Oracle db status need to be monitor ...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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.
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

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

Post 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?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

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

Post 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
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

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

Post 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).
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post by slansing »

xpertech,

Are you saying that you resolved this using the above method?
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

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

Post by xpertech »

slansing wrote:xpertech,

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