We help IT Professionals succeed at work.

check_oracle config in Nagios

I have the check_oracle plug-in installed in Nagios & need to know how to configure it for checking a remote Oracle 11.g server for # of DB connections & DB query time.

TIA
Comment
Watch Question

DevOps Engineer
Commented:
Following are the options:
check_oracle v1749 (nagios-plugins 1.4.12)
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Usage:
  check_oracle --tns
  check_oracle --db
  check_oracle --login
  check_oracle --cache    
  check_oracle --tablespace      
  check_oracle --oranames
  check_oracle --help
  check_oracle --version

Check Oracle status

--tns SID/IP Address
   Check remote TNS server
--db SID
   Check local database (search /bin/ps for PMON process) and check
   filesystem for sgadefORACLE_SID.dbf
--login SID
   Attempt a dummy login and alert if not ORA-01017: invalid username/password
--cache
   Check local database for library and buffer cache hit ratios
       --->  Requires Oracle user/password and SID specified.
                   --->  Requires select on v_ and v_
--tablespace
   Check local database for tablespace capacity in ORACLE_SID
       --->  Requires Oracle user/password specified.
                   --->  Requires select on dba_data_files and dba_free_space
--oranames Hostname
   Check remote Oracle Names server
--help
   Print this help screen
--version
   Print version and license information

If the plugin doesn't work, check that the ORACLE_HOME environment
variable is set, that ORACLE_HOME/bin is in your PATH, and the
tnsnames.ora file is locatable and is properly configured.

When checking local database status your ORACLE_SID is case sensitive.

If you want to use a default Oracle home, add in your oratab file:
*:/opt/app/oracle/product/7.3.4:N

Send email to nagios-users@lists.sourceforge.net if you have questions
regarding use of this software. To submit patches or suggest improvements,
send email to nagiosplug-devel@lists.sourceforge.net.
Please include version information with all correspondence (when possible,
use output from the --version option of the plugin itself).


You can only following using check_oracle plugin:
check_oracle --tns
  check_oracle --db
  check_oracle --login
  check_oracle --cache    
  check_oracle --tablespace      
  check_oracle --oranames
  check_oracle --help
  check_oracle --version

To check the DB Connections and DB Query time please consider following plugins:
check_sql_query
nagios plugin to execute a specific sql query (ksh script)
Query DB System Tables to get the details
http://exchange.nagios.org/directory/Databases/Plugins/Oracle
Take the help of your DB team to give you the sql query to trigger on SYSTEM Tables to know DB Connections and Query Time.
Deepak KosarajuDevOps Engineer
Commented:
You can also check with
http://exchange.nagios.org/directory/Databases/Plugins/Oracle/check_oracle_health/details
Please select the plugin that matches your needs from
http://exchange.nagios.org/directory/Databases/Plugins/Oracle
Download the script make sure you have required perl modules installed if its perl plugins, test in your test environment and deploy in production. Work closely with your DB Team to end-up with success results.
Gud luck.
Deepak KosarajuDevOps Engineer

Commented:
https://code.bluegecko.net/wiki/Monocle
Monocle is one of the opensource tool completely designed to monitor oracle using nagios. I explored it at the beginning but our DB team doesn't have time to spend with us to configure Monocle to monitoring Oracle.

Author

Commented:
I actually have the check_oracle plugin installed on my nagios server, I am trying to figure out how to add it to an existing .cfg file in the sshperf & in the hosts directories so I can have Nagios monitoring my Oracle DB.

Unfortuanely both my DBA's are out until next week so I am on my own for now...
madunixEE MVE, Chief Information Officer (CIO)
Most Valuable Expert 2019
Commented:
Deepak KosarajuDevOps Engineer
Commented:
User Google translator to translate the German to English
http://translate.google.com/translate?hl=en&sl=de&tl=en&u=http%3A%2F%2Flabs.consol.de%2Flang%2Fde%2Fnagios%2Fcheck_oracle_health%2F

To add service to existing .cfg file it only make sense if you know what is the query you need to trigger on the DB. To know the DB Connections and Query Time you have to take help.
http://decipherinfosys.wordpress.com/2007/02/10/monitoring-number-of-connections-in-oracle/
I am not sure about DB Query time as it might vary depends on the application configured with DB.