Problem with check_oracle

Ton Voon ton.voon at altinity.com
Mon Oct 3 11:06:17 CEST 2005


On 30 Sep 2005, at 15:29, Hans Engelen wrote:

>
>
> On 9/30/05, Andreas Ericsson <ae at op5.se> wrote:
> It's the LANG environment variable. NLS_LANG has no special meaning.
>
> Nagios uses the library wrapper popen() to execute other programs (for
> now, anyways). popen()'ed children inherit the environment from the
> parent (but doesn't read any of the profile or rc-files; sh -c is  
> called
> in to execute the program in question). At least on Linux and *BSD,
> although I can't imagine those systems going through the extra trouble
> of copying the environment data unless it was in POSIX.
>
> That sorta fits in then with what was going on. Depending on the  
> client version you have installed (and I took the version 10 client  
> of course, grumble) those variables have to be set though or your  
> check_nagios goes horribly wrong. I think I even went sofar as to  
> try setting them from withing check_nagios itself at one point  
> before getting to the sqlclient part but ...
>
> Is there any ... ehm ... approved solution for that ?
>

I don't have access to an Oracle system to try, but when I used to  
use Oracle 8 clients, configuring the oratab file (to point to the  
ORACLE_HOME for a particular sid or * for wildcards) and configuring  
the tnsnames.ora file (in $ORACLE_HOME/network/tnsnames.ora) was  
usually sufficient for the check_oracle script to find the Oracle  
executable.

I didn't use the --tns option. We found that the --login option was  
better - this told you information about why a database was not  
contactable, including if TNS was not running on a remote server.

Since this works over the network, you can setup your Nagios server  
to run check_oracle and it will use the Oracle executables on your  
Nagios server to connect to the remote database, so it is not  
necessary to do the check via nrpe.

Ton




http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20051003/f3c55a92/attachment.html>


More information about the Users mailing list