Page 1 of 3
error"TNS:listener was not given the SERVICE_NAME"
Posted: Mon Feb 25, 2013 11:10 am
by naveenreddyv
Hi Team,
Nagios Details:
Nagios XI Version : 2012R1.6
2.6.32-279.19.1.el6.x86_64 x86_64
CentOS release 6.3 (Final) 64bit
Manual install of XI
Gnome is not installed
We are trying to monitor oracle query and we are receiving the below error.
"CRITICAL - cannot connect to IPAddress:1521. ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA (DBD ERROR: OCIServerAttach)"
We have installed oracle plugins and set the home path as well.
Thanks,
Naveen Reddy
Re: error"TNS:listener was not given the SERVICE_NAME"
Posted: Mon Feb 25, 2013 11:11 am
by abrist
What is the full check command you are using? (feel free to obfuscate login credentials)
Re: error"TNS:listener was not given the SERVICE_NAME"
Posted: Mon Feb 25, 2013 11:08 pm
by naveenreddyv
Please find the check command...
check_xi_oraclequery!-connect IPAddress:1521 --username username --password "password" --mode sql --name="query" --warning 50 --critical 200
Re: error"TNS:listener was not given the SERVICE_NAME"
Posted: Tue Feb 26, 2013 4:44 am
by danieloo
Use this patch (see attached)..
place it in: /usr/local/nagiosxi/html/includes/configwizards/oracle_serverspace/
run: patch oracle_serverspace.inc.php < oracle_serverspace.inc.php.patch
This will make the sid (servicename) available from withing the wizard and will change the comamnd to:
check_xi_oraclequery!-connect IPAddress:1521/sid --username username --password "password" --mode sql --name="query" --warning 50 --critical 200
Re: error"TNS:listener was not given the SERVICE_NAME"
Posted: Tue Feb 26, 2013 8:46 am
by naveenreddyv
I did not find any attachment. please add the attachment
Re: error"TNS:listener was not given the SERVICE_NAME"
Posted: Tue Feb 26, 2013 10:34 am
by slansing
Thanks for the tips danieloo, I also look forward to seeing this patch

.
Re: error"TNS:listener was not given the SERVICE_NAME"
Posted: Tue Feb 26, 2013 11:53 am
by danieloo
here is the patch
oracle_serverspace.inc.php.txt
sorry it took so long the extensions were not allowed
rename to .patch instead of txt..
I am pretty new at using diff and patch so sorry for that...
Re: error"TNS:listener was not given the SERVICE_NAME"
Posted: Tue Feb 26, 2013 12:03 pm
by abrist
This patch should probably be uploaded to the exchange and noted on
http://tracker.nagios.com
Re: error"TNS:listener was not given the SERVICE_NAME"
Posted: Wed Feb 27, 2013 3:44 am
by danieloo
done..
Re: error"TNS:listener was not given the SERVICE_NAME"
Posted: Wed Feb 27, 2013 5:18 am
by naveenreddyv
I tried to do the patch and got the below response...
e_serverspace.inc.php.patch
patching file oracle_serverspace.inc.php
patch: **** `>' expected at line 11 of patch