check_oracle plugin returns - CRITICAL- ORA-12154:TNS: count not resolve service name
Andreas Ericsson
ae at op5.se
Wed Oct 11 23:13:38 CEST 2006
Bret Goodfellow wrote:
> The user (nagios) is the id that is executing both ssh and check_by_ssh.
> I did discover though, that when these commands are run, the
> "environments" established for ssh and check_by_ssh are different.
>
> Below is the environment established for ssh (THIS IS THE ONE THAT
> WORKS!!):
>
> SHELL=/bin/bash
> SSH_CLIENT=10.8.24.170 58641 22
> USER=nagios
> LS_COLORS=
> ORACLE_SID=ver_9206
> ORACLE_BASE=/oracle
> ORACLE_ADHOC=/oracle/local/adhoc
> MAIL=/var/mail/nagios
> PATH=/usr/bin:/bin:/usr/sbin:/sbin
> TNS_ADMIN=/oracle/network/admin
> PWD=/home/nagios
> LANG=en_US.UTF-8
> SQLPATH=/oracle/local/adhoc:%PATH
> SHLVL=1
> HOME=/home/nagios
> LS_OPTIONS=-N --color=non -T O
> LOGNAME=nagios
> SSH_CONNECTION=10.8.24.170 58641 10.8.24.191 22
> ORACLE_HOME=/oracle/product/9.2.0.6
> _=/usr/bin/env
>
> And, here is the environment when running the command, check_by_ssh
> (THIS ONE FAILS):
>
> SHELL=/bin/bash
> SSH_CLIENT=10.8.24.170 58641 22
> USER=nagios
> LS_COLORS=
> MAIL=/var/mail/nagios
> PATH=/usr/bin:/bin:/usr/sbin:/sbin
> PWD=/home/nagios
> SHLVL=1
> HOME=/home/nagios
> LS_OPTIONS=-N --color=non -T O
> LOGNAME=nagios
> SSH_CONNECTION=10.8.24.170 58641 10.8.24.191 22
> _=/usr/bin/env
>
> I'm running both commands form the same server as user, nagios. It
> appears that check_by_ssh changes my env settings (notice that there are
> no ORACLE environments specified). Does check_by_ssh not use the
> /etc/ssh/config settings? Where is this done? I would almost believe
> that check_by_ssh bypasses the default ssh settings for sending env
> variables.
check_by_ssh executes ssh to connect to the remote server, but it does
so by scrapping the entire environment setup in the process. See
plugins/runcmd.c for details and commentary.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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