<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ton Voon wrote:
<blockquote cite="mid081A773F-CED5-440D-8A68-AFC113DE929F@altinity.com"
type="cite"><br>
<div>
<div>On 18 Jul 2006, at 02:33, Yang Xiao wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite"><br>
<br>
<div><DEFANGHTML_SPAN class="gmail_quote">On 7/11/06, <b
class="gmail_sendername">Ton Voon</b> <<a
href="mailto:ton.voon@altinity.com">ton.voon@altinity.com</a>>
wrote:</DEFANGHTML_SPAN>
<blockquote class="gmail_quote"
defanghtml_style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div><DEFANGHTML_SPAN class="q"><br>
</DEFANGHTML_SPAN>
<div>
<div>On 11 Jul 2006, at 11:21, Hari Sekhon wrote:</div>
<br>
<blockquote type="cite">
<div defanghtml_style="margin: 0px;">It's happened again, I
changed a non-related service name and then <DEFANGHTML_SPAN> </DEFANGHTML_SPAN></div>
<div defanghtml_style="margin: 0px;">restarted nagios and now
again it doesn't find $ORACLE_HOME for the sids<DEFANGHTML_SPAN> </DEFANGHTML_SPAN></div>
<div defanghtml_style="margin: 0px;">of the databases
apparently. This is ridiculous since I can </div>
<div defanghtml_style="margin: 0px; min-height: 14px;"><br>
</div>
<div defanghtml_style="margin: 0px;">su - nagios</div>
<div defanghtml_style="margin: 0px;">echo $ORACLE_HOME</div>
<div defanghtml_style="margin: 0px;">/usr/lib/oracle/10.2.0.2/client</div>
<div defanghtml_style="margin: 0px; min-height: 14px;"> <br>
</div>
<div defanghtml_style="margin: 0px;">which gives me the path to
the oracle client installation and I can also</div>
<div defanghtml_style="margin: 0px; min-height: 14px;"><br>
</div>
<div defanghtml_style="margin: 0px;">sqlplus
"user/password@dbname " successfully and get a login.</div>
<div defanghtml_style="margin: 0px; min-height: 14px;"><br>
</div>
<div defanghtml_style="margin: 0px;">/usr/nagios/libexec/check_oracle
--login dbname</div>
<div defanghtml_style="margin: 0px;">OK - dummy login connected
</div>
<div defanghtml_style="margin: 0px; min-height: 14px;"><br>
</div>
<div defanghtml_style="margin: 0px;">Does anybody understand
why this check has stopped working again when I<DEFANGHTML_SPAN> </DEFANGHTML_SPAN></div>
<div defanghtml_style="margin: 0px;">haven't</div>
<div defanghtml_style="margin: 0px;"> done anything to it, I
have to get this working in a stable fashion, I<DEFANGHTML_SPAN> </DEFANGHTML_SPAN></div>
<div defanghtml_style="margin: 0px;">can't have it doing this
every time I restart nagios...</div>
</blockquote>
</div>
<br>
</div>
<div>
<div> How do you restart Nagios? Or do you mean reload?</div>
<div><br>
</div>
<div>If the former, check that the startup scripts correctly
source the environment variables. If the latter, it could be a bug in
Nagios, though I'm not sure why. </div>
<div><br>
</div>
<div>Alternatively, <DEFANGHTML_SPAN id="st" name="st" class="st">check_oracle</DEFANGHTML_SPAN>
will parse /var/opt/oracle/oratab (and other locations) for the
ORACLE_HOME variable. Some installations of Oracle use this to know
what SIDs are installed on a server. You could amend that instead. </div>
</div>
<div><DEFANGHTML_SPAN class="q"></DEFANGHTML_SPAN>
<div><br>
</div>
<div>Ton</div>
<div><br>
</div>
<br>
<br>
</div>
</div>
</blockquote>
</div>
Just figured out the same problem by looking at another thread on this,
the answer is permission, make sure the oracle install tree has the
world execute bit on! <br>
chmod 755 /app/oracle -R<br>
btw, I'm doing this via nrpe...so it has nothing to do with
ORACLE_HOME, oracle client, ...none of that.<br>
<br>
</blockquote>
Thanks Yang. I've forwarded this to nagios-users and to Hari.</div>
<div><br class="khtml-block-placeholder">
</div>
<div>Ton</div>
<div><span class="Apple-style-span"
style="border-collapse: separate; border-spacing: 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-indent: 0px; 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; 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-indent: 0px; 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; 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-indent: 0px; 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; 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-indent: 0px; 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; 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-indent: 0px; 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; 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-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;">
<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>
</blockquote>
My problem with this wasn't the x bit, since I could su - nagios and
run the plug-in fine, and I had the $ORACLE_HOME var set. So I figured
it must be the var problem that the script is falling down on and after
adding the $ORACLE_HOME variable to the beginning of the script, I have
had no further problems...<br>
<br>
-h<br>
<br>
<br>
</body>
</html>