<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.3790.2759" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006>My Nagios server is
returning this error when executing the check_by_ssh plugin, which also includes
the check_oracle plugin. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006>Here's the
scenario. </SPAN></FONT><FONT face=Arial size=2><SPAN
class=538290722-06102006>I have a remote server, called <U>olympus</U>, that is
running Oracle 9.2.0.6. I want to be able to monitor tablespace size using
the check_oracle plugin. I have copied the check_oracle plugin to the
remote server, <U>olympus</U>, and have successfully run the plugin on
<U>olympus</U>. When I run the check_oracle plugin I am logged in as
nagios. e.g. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006><STRONG>nagios@olympus:~>
/usr/local/nagios/libexec/check_oracle --tablespace mwmt01 nagios password TS01
98 96</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006><STRONG>mwmt01 :
TS01 OK - 18.80% used [ 487 / 600 MB available
]|TS01=18.80%;96;98;0;100</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006><STRONG>nagios@olympus:~></STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006>This is what I
expected. Now, from my Nagios Server, <U>dev02</U>, I would like to be
able to monitor the oracle tablespace on <U>olympus</U>. I first tested
ssh by executing the following command from <U>dev02</U>:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006><STRONG>dev02: # su
- nagios</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006><STRONG>nagios@dev02:~> ssh -i
/usr/local/nagios/.ssh/id_dsa olympus "/usr/local/nagios/libexec/check_oracle
--tablespace mwmt01 nagios password TS01 98 96"</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006><STRONG>mwmt01 :
TS01 OK - 18.80% used [ 487 / 600 MB available
]|TS01=18.80%;96;98;0;100</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006><STRONG>nagios@dev02:~></STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006>As you can see, I
can ssh from my Nagios server and have it execute the check_oracle plugin on
<U>olympus</U>. Everything is good so far. My goal is to to setup
Nagios to run this. I now want to check the tabespace on <U>olympus</U> by
using the Nagios plugin: check_by_ssh. Below is the command that is
executed on <U>dev02</U> :</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006><STRONG>nagios@dev02:~>
/usr/local/nagios/libexec/check_by_ssh -H olympus -i
/usr/local/nagios/.ssh/id_dsa -C "/usr/local/nagios/libexec/check_oracle
--tablespace mwmt01 nagios password TS01 98 96"</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006><STRONG>CRITICAL -
ORA-12154: TNS:could not resolve service name</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006><STRONG>nagios@dev02:~>
</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=538290722-06102006><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=538290722-06102006>The last 2 commands
are both run from the Nagios Server. Why doesn't the check_by_ssh work,
yet the native ssh command does
work?</SPAN></FONT></DIV></SPAN></FONT></DIV></SPAN></FONT></DIV></SPAN></FONT></DIV></BODY></HTML>