<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 30 Sep 2005, at 15:29, Hans Engelen wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><BR><BR> <DIV><DEFANGHTML_SPAN class="gmail_quote">On 9/30/05, <B class="gmail_sendername">Andreas Ericsson</B> <<A href="mailto:ae@op5.se">ae@op5.se</A>> wrote:</DEFANGHTML_SPAN> <BLOCKQUOTE class="gmail_quote" defanghtml_style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">It's the LANG environment variable. NLS_LANG has no special meaning. <BR><BR>Nagios uses the library wrapper popen() to execute other programs (for<BR>now, anyways). popen()'ed children inherit the environment from the<BR>parent (but doesn't read any of the profile or rc-files; sh -c is called <BR>in to execute the program in question). At least on Linux and *BSD,<BR>although I can't imagine those systems going through the extra trouble<BR>of copying the environment data unless it was in POSIX.</BLOCKQUOTE> <DIV> </DIV> <DIV>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 ... </DIV> <DIV> </DIV> <DIV>Is there any ... ehm ... approved solution for that ?</DIV> <DIV> </DIV></DIV></BLOCKQUOTE><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Ton</DIV><BR><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><A href="http://www.altinity.com">http://www.altinity.com</A></DIV><DIV>T: +44 (0)870 787 9243</DIV><DIV>F: +44 (0)845 280 1725</DIV><DIV>Skype: tonvoon</DIV></SPAN></SPAN></SPAN></SPAN></SPAN><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>