check-oracle - Nagios compatible check plugin for basic Oracle health checks
check-oracle [--tns | --login | --cache | --tablespace tablespace name] [--sid Oracle SID] [--user user] [--password password] [--hostname hostname] [--warning threshold] [--critical threshold] [--oraclehome home path] [--verbose] [--help]
check-oracle works as a Nagios NRPE plugin for basic Oracle health checks like tns ping, login, cache and tablespaces
Performs an Oracle ping on the SID/hostname by using tnsping tool, and returns CRITICAL if not succeeded. Returns respectively CRITICAL or WARNING if tns reply time is larger than critical or warning.
Attempts a dummy login on the SID and returns CRITICAL if not ORA-01017: invalid username/password returns.
Checks local database for library and buffer cache hit ratios on the SID, by using credentials user/password to logon. Returns respectively CRITICAL or WARNING if at least one cache ratio is below critical or warning.
Checks local database for tablespace capacity of the tablespace on the SID, by using credentials user/password to logon. Returns respectively CRITICAL or WARNING if the usage percent is more than critical or warning.
check-oracle tries to locate Oracle home directory by using ORACLE_HOME env variable or values in the registry. You can use this option if you want to override plugin's path location behaviour.
Produces detailed messages for debugging.
Produces a help message.
check-oracle --tns --sid MYORACLE
Pings the SID MYORACLE and returns CRITICAL if not succeeded or NORMAL otherwise.
check-oracle --login --sid MYORACLE
Performs a dummy login on the SID MYORACLE and returns CRITICAL if the server answers with a message other than ORA-01017 or NORMAL otherwise.
check-oracle --cache --sid MYORACLE --user ping --password pong --warning 99 --critical 95
Logs on by using the credentials ping/pong on the SID MYORACLE, queries system tables and calculates library and buffer cache hit ratios. Returns CRITICAL if at least one of the hit ratios is below 95%, WARNING if it is below 99% or NORMAL otherwise.
check-oracle --tablespace MYTABLE --sid MYORACLE --user ping --password pong --warning 90 --critical 95
Logs on by using the credentials ping/pong on the SID MYORACLE, queries system tables and calculates the usage ratio for the tablespace MYTABLE. Returns CRITICAL if the usage is over 95%, WARNING if it is over 90%, or NORMAL otherwise.
0 OK
1 WARNING
2 CRITICAL
3 UNKNOWN
Tevfik Karagulle http://www.itefix.net
This program is distributed under the Artistic License. http://www.opensource.org/licenses/artistic-license.php
Version 1.1, May 2011
- performance data output for tns check
- ability to specify warning and critical levels for tns checks
- Windows independency