not able to install oracle plugin

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

not able to install oracle plugin

Post by wiproltdwiv »

Hi,

I am not able to install oracle plugin, getting below error.


Can't locate strict.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.16.1/x86_64-linux /usr/local/lib/perl5/site_perl/5.16.1 /usr/local/lib/perl5/5.16.1/x86_64-linux /usr/local/lib/perl5/5.16.1 .) at /usr/local/bin/cpan line 5.
BEGIN failed--compilation aborted at /usr/local/bin/cpan line 5.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: not able to install oracle plugin

Post by scottwilkerson »

Do you have strict.pm on the compoter?

Code: Select all

locate strict.pm
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

Re: not able to install oracle plugin

Post by wiproltdwiv »

yes, we have installed that.

[root@EMSNagios1 local]# locate strict.pm
/root/localperl/lib/5.16.1/strict.pm
/usr/share/perl5/strict.pm
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: not able to install oracle plugin

Post by mguthrie »

It looks like the directory it put it in is not part of your perl includes directory. You can created a symlink to it with the following command:

Code: Select all

ln -s /usr/share/perl5/strict.pm  /usr/local/lib/perl5/5.16.1/x86_64-linux/strict.pm
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

Re: not able to install oracle plugin

Post by wiproltdwiv »

We have installed all required modules and now we are getting the below error. Our system is RHEL6.3 64 bit

CRITICAL - cannot connect to 10.1.1.21:1521. ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA (DBD ERROR: OCIServerAttach)

We have tried to change the tnsnames.ora file with the help of on DBA. Manually we are able to connect to server with sqlplus

CHDGSCB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.21)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = chdgscb)
)
)


We have also tried to put the oracle paths in bashrc file of root as well as nagios user. But the issue persists.

Please help to resolve the issue.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: not able to install oracle plugin

Post by scottwilkerson »

A little out of my expertise, but the connect string can be changed on the nagios side, If you look at the following post you can see what someone else is using after --connect=""

http://support.nagios.com/forum/viewtop ... 185#p24194
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

Re: not able to install oracle plugin

Post by wiproltdwiv »

It is working now, but for some parameaters it is always showing pending status.
You do not have the required permissions to view the files attached to this post.
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

Re: not able to install oracle plugin

Post by TSCAdmin »

Hi,

I'm assuming you are using check_oracle_health plugin from labs.console.de. What do you get when you run the following command from the command line as Nagios user?

Code: Select all

$ ./check_oracle_health --connect chdgscb --username <USERNAME> --password <PASSWORD> --mode event-waits
Replace <USERNAME> and <PASSWORD> with the authorised user and pass for Oracle authentication.
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

Re: not able to install oracle plugin

Post by wiproltdwiv »

From commandline getting output, but in gui it is showing always pending.
You do not have the required permissions to view the files attached to this post.
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

Re: not able to install oracle plugin

Post by TSCAdmin »

From the command line, try:

Code: Select all

echo "[$(date +%s)] SCHEDULE_FORCED_HOST_SVC_CHECKS;bihrscb;$(date +%s)" > /usr/local/nagios/var/rw/nagios.cmd
wait for a little while and check again in Nagios XI. Does it work?
Locked