<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>You might try adding the nagios user to the dba group in the /etc/group file on your DB box.  Or the oracle group if that was what was used but it’s usually dba.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Oracle in their infinite wisdom locks down the entire oracle install to only the oracle user for read-write and read-only for the dba group.  Usually just adding a user to the dba group resolves the issue of not being able to actually use the libraries the the ORACLE_HOME is pointing you to.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>The first error you got on the Nagios server is because you don’t have Oracle installed or don’t have the ORACLE_HOME set.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Dermot Duffy [mailto:dermot.duffy@brandtone.ie] <br><b>Sent:</b> Monday, December 12, 2011 9:30 AM<br><b>To:</b> Nagios Users List<br><b>Subject:</b> Re: [Nagios-users] check_oracle NRPE<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'>On Nagios Server:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'>[nagios@nagios-server]$ ./check_oracle --login PCMDB<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'>Cannot determine ORACLE_HOME for sid PCMDB<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'>On db Server:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'>[nagios@db1]$ ./check_oracle --login PCMDB<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'>sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'>CRITICAL –<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'>D.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-language:EN-IE'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-language:EN-IE'> Assaf Flatto <a href="mailto:[mailto:nagios@flatto.net]">[mailto:nagios@flatto.net]</a> <br><b>Sent:</b> 12 December 2011 14:42<br><b>To:</b> Nagios Users List<br><b>Subject:</b> Re: [Nagios-users] check_oracle NRPE<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-IE><o:p> </o:p></span></p><div><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-IE style='font-family:"Arial","sans-serif";color:black'>On your nagios server from the command line try running the command as the nagios user , and also on the remote machine as the nagios user.<br><br>This will give you some idea what is wrong.<o:p></o:p></span></p><div class=MsoNormal align=center style='text-align:center'><span lang=EN-IE style='font-family:"Arial","sans-serif";color:black'><hr size=2 width="100%" align=center></span></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><b><span lang=EN-IE style='font-family:"Helvetica","sans-serif";color:black'>From: </span></b><span lang=EN-IE style='font-family:"Helvetica","sans-serif";color:black'>"Dermot Duffy" <<a href="mailto:dermot.duffy@brandtone.ie">dermot.duffy@brandtone.ie</a>><br><b>To: </b><a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br><b>Sent: </b>Monday, 12 December, 2011 2:29:40 PM<br><b>Subject: </b>[Nagios-users] check_oracle NRPE<br><br></span><span lang=EN-IE style='font-size:12.0pt;font-family:"Helvetica","sans-serif";color:black;mso-fareast-language:EN-IE'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>I have configured the following plugin on my oracle db server<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>Db1:/usr/local/nagios/etc/nrpe.cfg<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'># Oracle Checks<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>command[check_oracle]=/usr/local/nagios/libexec/check_oracle --login PCMDB<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>From the command line this works locally.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>[root@db1etc]# /usr/local/nagios/libexec/check_oracle --login PCMDB<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>OK - dummy login connected<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>However I am unable to get it to work from my nagios server.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>I have defined the check_oracle script at the following location in the nagios server:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>Nagios_server:/usr/local/nagios/etc/objects/db1.cfg<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>define service{<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>          use                 generic-service<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>          host_name           mvdbs1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>          service_description Check Oracle<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>          check_command       check_nrpe!check_oracle<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>          }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>The NRPE connection between db server and nagios server is fine:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>[root@Nagios_Server]# ./check_nrpe -H db-server<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>NRPE v2.12<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>But when I run this from the nagios server (GUI) I get the following:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'><img border=0 width=602 height=413 id="Picture_x0020_2" src="cid:image001.jpg@01CCB8B2.73FDBCC0"><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'>D.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'> <o:p></o:p></span></p><table class=MsoNormalTable border=0 cellpadding=0 align=left><tr><td style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal style='line-height:10.5pt;mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly'><b><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:#C00000'>____________________________________________________________________________________________________________________________________________________________________________________________</span></b><o:p></o:p></p><p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly'><span style='color:#1F497D'><img border=0 width=318 height=61 id="Picture_x0020_1" src="cid:image002.jpg@01CCB8B2.73FDBCC0" alt="Description: Description: Description: Description: Brandtone Side Bar logo cropped"></span><o:p></o:p></p><p class=MsoNormal style='line-height:10.5pt;mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly'><b><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>Dermot Duffy</span></b><o:p></o:p></p><p class=MsoNormal style='line-height:10.5pt;mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly'><b><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>IT Infrastructure Technical Lead</span></b><o:p></o:p></p><p class=MsoNormal style='line-height:10.5pt;mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly'><b><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:#C00000'><a href="http://www.brandtone.ie/" target="_blank"><span style='color:#C00000'>www.brandtone.ie</span></a> | <a href="mailto:Dermot.Duffy@brandtone.ie" target="_blank">Dermot.Duffy@brandtone.ie</a></span></b><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:#292827'><br>M: +353 85 711 7530</span><o:p></o:p></p></td></tr><tr><td style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal style='margin-bottom:4.5pt;line-height:10.5pt;mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly'><b><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:#262626'>Disclaimer</span></b><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:#262626'> </span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:4.5pt;line-height:10.5pt;mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly'><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:#262626'>The information contained in this message (including any attachments) is <b>confidential</b> and intended solely for the  attention and use of the named addressee(s).  It must not be disclosed to any person without our authority.  If you are not the intended recipient, please delete it from your system immediately - any disclosure, copying or distribution thereof or any action taken or omitted to be taken in reliance thereon is prohibited and may be unlawful. <br><br>BrandTone Limited makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the transmission, reception, storage or use of such information in any way whatsoever.  Any opinions expressed in this message are those of the author and do not necessarily reflect the opinions of BrandTone Limited. </span><o:p></o:p></p></td></tr></table><p class=MsoNormal><span lang=EN-IE style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-IE style='font-size:12.0pt;font-family:"Helvetica","sans-serif";color:black;mso-fareast-language:EN-IE'><br>------------------------------------------------------------------------------<br>Learn Windows Azure Live!  Tuesday, Dec 13, 2011<br>Microsoft is holding a special Learn Windows Azure training event for <br>developers. It will provide a great way to learn Windows Azure and what it <br>provides. You can attend the event by watching it streamed LIVE online.  <br>Learn more at <a href="http://p.sf.net/sfu/ms-windowsazure">http://p.sf.net/sfu/ms-windowsazure</a><br>_______________________________________________<br>Nagios-users mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. <br>::: Messages without supporting info will risk being sent to /dev/null<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-IE style='font-size:12.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:EN-IE'><o:p> </o:p></span></p></div></div></body></html>