Page 1 of 2

not able to install oracle plugin

Posted: Sat Sep 29, 2012 2:58 am
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.

Re: not able to install oracle plugin

Posted: Sat Sep 29, 2012 5:16 pm
by scottwilkerson
Do you have strict.pm on the compoter?

Code: Select all

locate strict.pm

Re: not able to install oracle plugin

Posted: Tue Oct 02, 2012 4:57 am
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

Re: not able to install oracle plugin

Posted: Tue Oct 02, 2012 9:53 am
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

Re: not able to install oracle plugin

Posted: Tue Oct 09, 2012 3:01 am
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.

Re: not able to install oracle plugin

Posted: Tue Oct 09, 2012 10:57 am
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

Re: not able to install oracle plugin

Posted: Wed Nov 21, 2012 1:28 am
by wiproltdwiv
It is working now, but for some parameaters it is always showing pending status.

Re: not able to install oracle plugin

Posted: Wed Nov 21, 2012 5:49 am
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.

Re: not able to install oracle plugin

Posted: Wed Nov 21, 2012 6:58 am
by wiproltdwiv
From commandline getting output, but in gui it is showing always pending.

Re: not able to install oracle plugin

Posted: Wed Nov 21, 2012 8:02 am
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?