<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><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 style=""></DIV><DIV><DEFANGHTML_SPAN class="q"><BR><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></DEFANGHTML_SPAN></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"><DIV><BR></DIV><DIV>Ton</DIV><DIV><BR></DIV><BR><BR></DEFANGHTML_SPAN></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 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><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>