check_oracle plugin returns - CRITICAL - ORA-12154:TNS: count not resolve service name
Bret Goodfellow
Bret.Goodfellow at questar.com
Tue Oct 10 19:36:24 CEST 2006
I'm wondering if this could be some sort of authentication problem.
When I run the ssh command as nagios, I get the expected reponse:
dev02: # su - nagios
nagios at dev02:~> ssh -i /usr/local/nagios/.ssh/id_dsa olympus
"/usr/local/nagios/libexec/check_oracle --tablespace mwmt01 nagios
password TS01 98 96"
mwmt01 : TS01 OK - 18.80% used [ 487 / 600 MB available
]|TS01=18.80%;96;98;0;100
nagios at dev02:~>
When I run the ssh command as root, this is where I get the failure:
nagios at dev02:~> su - root
dev02: # ssh -i /usr/local/nagios/.ssh/id_dsa olympus
"/usr/local/nagios/libexec/check_oracle --tablespace mwmt01 nagios
password TS01 98 96"
CRITICAL - ORA-12154: TNS:could not resolve service name
dev02 <mailto:s at dev02> : #
Now, notice when I switch back to nagios and run check_by_ssh (not to be
confused with ssh), I get the same error as above:
dev02: # su - nagios
nagios at 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" -l nagios
CRITICAL - ORA-12154: TNS:could not resolve service name
nagios at dev02:~>
Notice that the last two commands have the same result. The first is
using ssh as user root, and the second is using check_by_ssh as user
nagios. Yet, if I run ssh as user nagios I then get the expected
response. Any ideas?
________________________________
From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Bret
Goodfellow
Sent: Friday, October 06, 2006 4:29 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] check_oracle plugin returns - CRITICAL -
ORA-12154:TNS: count not resolve service name
My Nagios server is returning this error when executing the check_by_ssh
plugin, which also includes the check_oracle plugin.
Here's the scenario. I have a remote server, called olympus, 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, olympus, and have successfully run the plugin on
olympus. When I run the check_oracle plugin I am logged in as nagios.
e.g.
nagios at olympus:~> /usr/local/nagios/libexec/check_oracle --tablespace
mwmt01 nagios password TS01 98 96
mwmt01 : TS01 OK - 18.80% used [ 487 / 600 MB available
]|TS01=18.80%;96;98;0;100
nagios at olympus:~>
This is what I expected. Now, from my Nagios Server, dev02, I would
like to be able to monitor the oracle tablespace on olympus. I first
tested ssh by executing the following command from dev02:
dev02: # su - nagios
nagios at dev02:~> ssh -i /usr/local/nagios/.ssh/id_dsa olympus
"/usr/local/nagios/libexec/check_oracle --tablespace mwmt01 nagios
password TS01 98 96"
mwmt01 : TS01 OK - 18.80% used [ 487 / 600 MB available
]|TS01=18.80%;96;98;0;100
nagios at dev02:~>
As you can see, I can ssh from my Nagios server and have it execute the
check_oracle plugin on olympus. Everything is good so far. My goal is
to to setup Nagios to run this. I now want to check the tabespace on
olympus by using the Nagios plugin: check_by_ssh. Below is the command
that is executed on dev02 :
nagios at 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"
CRITICAL - ORA-12154: TNS:could not resolve service name
nagios at dev02:~>
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20061010/7f02bf05/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list