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.

Watch Question

DevOps Engineer
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.

  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
   Check local database for library and buffer cache hit ratios
       --->  Requires Oracle user/password and SID specified.
                   --->  Requires select on v_ and v_
   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
   Print this help screen
   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:

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:
nagios plugin to execute a specific sql query (ksh script)
Query DB System Tables to get the details
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
You can also check with
Please select the plugin that matches your needs from
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

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.


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
Deepak KosarajuDevOps Engineer
User Google translator to translate the German to English

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.
I am not sure about DB Query time as it might vary depends on the application configured with DB.