Page 2 of 3
Re: Setting up Oracle database Monitoring - facing issue
Posted: Fri Apr 13, 2012 12:28 pm
by scottwilkerson
I see.. Can you verify you have the correct information about your Oracle server in the tnsnames.ora file...
Re: Setting up Oracle database Monitoring - facing issue
Posted: Fri Apr 13, 2012 3:26 pm
by maxwellmiranda
yes i have....the tns entries are correct
i tried the instructions on the "
http://usestrict.net/2009/07/perl-insta ... nt-client/" link
now i am getting a different error when i execute on the command line.....
CRITICAL - cannot connect to dbatools:1527. ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA (DBD ERROR: OCIServerAttach)
when i use the oracle tablespace plugin i get the below error
CRITICAL - cannot connect to dbatools.bose.com:1521. ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach)
my database and listener on the dbatools.bose.com are running fine....
Re: Setting up Oracle database Monitoring - facing issue
Posted: Fri Apr 13, 2012 4:01 pm
by maxwellmiranda
i have one more update
i tried the following from the command line and it worked....
nagmon:/usr/lib/oracle/11.2/client/bin> /usr/bin/env TNS_ADMIN=/usr/lib/oracle/11.2/client/network/admin LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle_health --connect "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = dbatools.bose.com)(PORT = 1527)))(CONNECT_DATA =(SID = pwdb)))" --username system --password "****" --mode connection-time --warning 1 --critical 5
OK - 0.28 seconds to connect as SYSTEM | connection_time=0.2812;1;5
how do i get the error fixed from the web browser
Re: Setting up Oracle database Monitoring - facing issue
Posted: Fri Apr 13, 2012 4:41 pm
by scottwilkerson
this is great news
You can edit the commands in
Configure -> Core Config Manager -> Commands -> Modify ( *oracle*)
You can add the TNS_ADMIN=/usr/lib/oracle/11.2/client/network/admin as used when it worked
Re: Setting up Oracle database Monitoring - facing issue
Posted: Mon Apr 16, 2012 10:21 am
by maxwellmiranda
the command that worked was tnsping..
i am trying to run the tablespace info check on the command line
i am getting this error
nagmon:/usr/local/nagios/libexec> /usr/bin/env TNS_ADMIN=/usr/lib/oracle/11.2/client/network/admin LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle_health --connect "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = dbatools.bose.com)(PORT = 1527)))(CONNECT_DATA =(SID = pwdb)))" --username system --password "****" --name pwdb --mode tablespace-usage --warning 90 --critical 98
CRITICAL - unable to aquire tablespace info
Re: Setting up Oracle database Monitoring - facing issue
Posted: Mon Apr 16, 2012 10:39 am
by nscott
With the tablespace options you'll nned to specify the tablespace with the --tablespace option. Can you try adding that option to the command?
Re: Setting up Oracle database Monitoring - facing issue
Posted: Mon Apr 16, 2012 10:45 am
by maxwellmiranda
if i need to find the tablespace usage of all the tablespaces do i have to give this options in the command
i tried with one tablespace...still the same issue
nagmon:/usr/local/nagios/libexec> /usr/bin/env TNS_ADMIN=/usr/lib/oracle/11.2/client/network/admin LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle_health --connect "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = dbatools.bose.com)(PORT = 1527)))(CONNECT_DATA =(SID = pwdb)))" --username system --password "****" --name pwdb --mode tablespace-usage --tablespace "system" --warning 90 --critical 98
CRITICAL - unable to aquire tablespace info
Re: Setting up Oracle database Monitoring - facing issue
Posted: Mon Apr 16, 2012 11:51 am
by nscott
Generally the tablespace is capitalized and case sensitive if I'm not mistaken. Try it with SYSTEM
Re: Setting up Oracle database Monitoring - facing issue
Posted: Mon Apr 16, 2012 12:03 pm
by maxwellmiranda
same error even if i enter the tablespace name in UPPER CASE
nagmon:/usr/local/nagios/libexec> /usr/bin/env TNS_ADMIN=/usr/lib/oracle/11.2/client/network/admin LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle_health --connect "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = dbatools.bose.com)(PORT = 1527)))(CONNECT_DATA =(SID = pwdb)))" --username system --password "*****" --name pwdb --mode tablespace-usage --tablespace "SYSTEM" --warning 90 --critical 98
CRITICAL - unable to aquire tablespace info
nagmon:/usr/local/nagios/libexec>
Re: Setting up Oracle database Monitoring - facing issue
Posted: Mon Apr 16, 2012 2:11 pm
by scottwilkerson
Lets try the command as follows
Code: Select all
/usr/bin/env TNS_ADMIN=/usr/lib/oracle/11.2/client/network/admin LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle_health --connect "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = dbatools.bose.com)(PORT = 1527)))(CONNECT_DATA =(SID = pwdb)))" --username system --password "*****" --name SYSTEM --mode tablespace-usage --warning 90 --critical 98