Issues installing Oracle plugin in NagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Issues installing Oracle plugin in NagiosXI

Post by bosecorp »

Hi Team,

I'm trying to install the oracle client and plugin on to our nagios server

Below is the document which i'm following

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

If you see the last part in the above mentioned document, it says
=====================================
Nagios gives this error:
CRITICAL - cannot connect to 192.168.5.55:1521. install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC
contains: /usr/local/nagios/libexec /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl

This is due to the Perl module not being installed properly. To remedy this problem, execute the following from the command line:
export ORACLE_HOME=<path to your Oracle which was given by the script>
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
cpan -i DBD::Oracle
=====================================

But when i try to install the perl module via cpan, i'm getting the attached error.

I have already refered older topics, but it did not helped me
https://support.nagios.com/forum/viewto ... f=6&t=5462

Need your assistance on this on high priority.

Below are some additional details

# uname -a
Linux nagmonusdev1 2.6.32-431.20.3.el6.x86_64 #1 SMP Fri Jun 6 18:30:54 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Issues installing Oracle plugin in NagiosXI

Post by tmcdonald »

Can you please provide your Nagios XI version, your OS + version, and your perl -v version? It appears you have perl 5.8.8 according to the output, but I want to confirm this is the case, and see if you might have multiple versions.
Former Nagios employee
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Issues installing Oracle plugin in NagiosXI

Post by ssax »

Please run these commads:
- Note: you will need to change the paths for each to it's proper location if you installed a different version of instantclient.

Code: Select all

export ORACLE_HOME=/usr/lib/oracle/12.1/client64/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/12.1/client64/lib/
export PATH=$PATH:/usr/lib/oracle/12.1/client64/bin
cpan -i DBD::Oracle
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Issues installing Oracle plugin in NagiosXI

Post by bosecorp »

Looks like the perl module got installed.

but i'm not able to to a tnsping with check_oracle_health

# ./check_oracle_health --connect xxx.bose.com --mode tnsping
CRITICAL - cannot connect to xxx.bose.com. timeout alarm

the server xxx.bose.com is reachable from the Nagios server.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Issues installing Oracle plugin in NagiosXI

Post by rkennedy »

Can you please run nmap 192.168.5.55 (I assume this is the same as xxx.bose.com?), and post the result?
Former Nagios Employee
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Issues installing Oracle plugin in NagiosXI

Post by bosecorp »

I'm able to run tnsping

# ./check_oracle_health --connect xxx.bose.com --mode tnsping
OK - connection established to xxx.bose.com.

But when i try to run a query it fails with below error message

# ./check_oracle_health -connect xxx.bose.com:1526 --username nagios --password "nagios" --mode sql --name 'select count(*) from S_ESCL_REQ' --warning 1500 --critical 2000
CRITICAL - cannot connect to xxx.bose.com:1526. ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)

Let me know what can done here
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Issues installing Oracle plugin in NagiosXI

Post by tgriep »

You are missing the SID in the connect option. Here is an example is what it should look like.

Code: Select all

192.168.1.1:1521/orcl
Be sure to check out our Knowledgebase for helpful articles and solutions!
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Issues installing Oracle plugin in NagiosXI

Post by bosecorp »

I tried it, bit still same error

# ./check_oracle_health -connect xxx.bose.com:1526/SBLQA1 --username nagios --password "xxx" --mode sql --name="select count(*) from S_ESCL_REQ" --warning 1500 --critical 2000
CRITICAL - cannot connect to xxx.bose.com:1526/SBLQA1. ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Issues installing Oracle plugin in NagiosXI

Post by bosecorp »

Can someone please look into this
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Issues installing Oracle plugin in NagiosXI

Post by tgriep »

Your first post you were using port 1521 and then later on you were using port 1526, can you verify which port it is?
Can you run the following and post the output. Replace xxx.xxx.xxx.xxx with the IP address of the server.

Code: Select all

nmap xxx.xxx.xxx.xxx -p 1521
nmap xxx.xxx.xxx.xxx -p 1526
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked