Oracle plugin

Dermot Duffy dermot.duffy at brandtone.ie
Fri Nov 25 12:50:06 CET 2011


Hi,

All variables are set correctly. I have set LANG variable also and it doesn't make any difference.

I copied this script (check_oracle_instance) from the below link - are there any shell script equivalent???

http://exchange.nagios.org/directory/Plugins/Databases/Oracle/Check-Oracle-status-%26-health-without-install-Oracle-client/details

R,
D.


-----Original Message-----
From: Stuart Browne [mailto:stuart.browne at ausregistry.com.au] 
Sent: 20 November 2011 22:21
To: Nagios Users List
Subject: Re: [Nagios-users] Oracle plugin

Hi,

One of the errors is saying you're not using $sqlplus variable for execution, but we can't see the code that actually does the executing (you probably just left off the $).

The language isn't being set properly.  Possibly this is the shell you're executing from doesn't have it, thus all the warnings from perl..  Setting a LANG= before executing should get rid of it.  

In any case given that you're executing a lot of shell scripts, why are you writing this in perl?  A simple shell script would be quicker and cleaner.

Stuart

> -----Original Message-----
> From: Dermot Duffy [mailto:dermot.duffy at brandtone.ie]
> Sent: Friday, 18 November 2011 11:17 PM
> To: Nagios Users List
> Subject: Re: [Nagios-users] Oracle plugin
> 
> I have successfully installed the oracleclient and connected to the db 
> - used a different version in the end (downgraded to 10_2_ and it 
> worked fine).
> 
> My "check_oracle_instant" script however is posting out the following 
> errors.
> 
> libexec]# ./check_oracle_instant
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
>         LANGUAGE = (unset),
>         LC_ALL = (unset),
>         LANG = "en_UK"
>     are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").
> sh: sqlplus: command not found
> Unable to connect to  ORACLE !!!
> 
> I have got the sqlplus & LD_LIB paths set correctly:
> 
> #!/usr/bin/perl
> 
> $host = $ARGV[0];
> $port = $ARGV[1];
> $service_name  = $ARGV[2];
> $user  = $ARGV[3];
> $pass  = $ARGV[4];
> 
> $ORACLE_HOME = "/root/instantclientdir";
> 
> ### point this to your sqlplus binary
> my $sqlplus = "/root/instantclientdir/bin/sqlplus";
> 
> ### point this to your sqlplus directory $ENV{"LD_LIBRARY_PATH"} = 
> "/root/instantclientdir/lib";
> 
> .......any ideas on how to resolve this?
> 
> 
> -----Original Message-----
> From: Onotsky, Steve x55328 [mailto:Steve.Onotsky at broadridge.com]
> Sent: 17 November 2011 17:40
> To: Nagios Users List
> Subject: Re: [Nagios-users] Oracle plugin
> 
> >From: Dermot Duffy [mailto:dermot.duffy at brandtone.ie]
> >Sent: Thursday, November 17, 2011 11:49 AM
> >To: Nagios Users List
> >Subject: Re: [Nagios-users] Oracle plugin
> >
> >I brought the sqlplus binary across from the db server but I get the
> following error..
> >
> ># ldd /usr/local/instantclient_10_2/sqlplus
> >/usr/local/instantclient_10_2/sqlplus: error while loading shared
> libraries: /usr/lib/libclntsh.so.10.1: ELF file data encoding not 
> little- endian
> >
> >Is there any way to load these shared libraries onto the nagios server?
> 
> There is, but you'll save yourself a lot of heartache if you just 
> installed the Oracle client on your Nagios machine.  IIRC you can 
> obtain it from Oracle as part of your maintenance, gratis...
> 
> \sao
> 
> 
> This message and any attachments are intended only for the use of the 
> addressee and may contain information that is privileged and confidential.
> If the reader of the message is not the intended recipient or an 
> authorized representative of the intended recipient, you are hereby 
> notified that any dissemination of this communication is strictly 
> prohibited. If you have received this communication in error, please 
> notify us immediately by e-mail and delete the message and any 
> attachments from your system.
> 
> ----------------------------------------------------------------------
> ----
> ----
> All the data continuously generated in your IT infrastructure contains 
> a definitive record of customers, application performance, security 
> threats, fraudulent activity, and more. Splunk takes this data and 
> makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when 
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
> 
> ----------------------------------------------------------------------
> ----
> ----
> All the data continuously generated in your IT infrastructure contains 
> a definitive record of customers, application performance, security 
> threats, fraudulent activity, and more. Splunk takes this data and 
> makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when 
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list