check_oracle_health help run

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

check_oracle_health help run

Postby clinton92 » Wed Oct 11, 2017 3:13 pm

Hello Guys,

So I've seen this service check_oracle_health in exchange.
you can check it here ... e-database or ... th/details

First things first, I would like to make nagios get the oracle query from a DB server. Specifically for the FRA(Flash Recovery Area) which this service provides.
flash-recovery-area-usage (Used space in flash recovery area)
flash-recovery-area-free (Free space in flash recovery area)

So the idea is to query the FRA usage/free of the DB server and then the nagios server will catch the value and monitor it on frontend.
Please provide a step by step configuration of the DB details to connect with nagios.

Plus, if ever you have tried this server check_oracle_health. can you please provide an example on how to install it step by step on a CentOS server or any redhat server.

I've tried installing the DBI::Oracle which is needed however I had no luck.

Thanks everyone!
Posts: 3
Joined: Thu Sep 28, 2017 1:29 pm

Re: check_oracle_health help run

Postby dwasswa » Wed Oct 11, 2017 5:02 pm

Hi @clinton92,
For centos:
To download the plugin:
Code: Select all
cd /usr/local/nagios/libexec

Then run command:
Code: Select all
wget /details
to download the plugin check_oracle_health

For plugin Usage:
Code: Select all

    check_oracle_health [-v] [-t ] --connect=

        --username= --password= --mode=


    check_oracle_health [-h | --help]

    check_oracle_health [-V | --version]



       the connect string


       the oracle user


       the oracle user's password


       the warning range


       the critical range


       the mode of the plugin. select one of the following keywords:

       tnsping                          (Check the reachability of the server)

       connection-time                  (Time to connect to the server)

       connected-users                  (Number of currently connected users)

       sga-data-buffer-hit-ratio        (Data Buffer Cache Hit Ratio)

       sga-library-cache-hit-ratio      (Library Cache Hit Ratio)

       sga-dictionary-cache-hit-ratio   (Dictionary Cache Hit Ratio)

       sga-latches-hit-ratio            (Latches Hit Ratio)

       sga-shared-pool-reload-ratio     (Shared Pool Reloads vs. Pins)

       sga-shared-pool-free             (Shared Pool Free Memory)

       pga-in-memory-sort-ratio         (PGA in-memory sort ratio)

       invalid-objects                  (Number of invalid objects in database)

       stale-statistics                 (Find objects with stale optimizer statistics)

       tablespace-usage                 (Used space in tablespaces)

       tablespace-free                  (Free space in tablespaces)

       tablespace-remaining-time        (Remaining time until a tablespace is full)

       tablespace-fragmentation         (Free space fragmentation index)

       tablespace-io-balance            (balanced io of all datafiles)

       tablespace-can-allocate-next     (Segments (of a tablespace) can allocate next extent)

       datafile-io-traffic              (io operations/per sec of a datafile)

       soft-parse-ratio                 (Percentage of soft parses)

       switch-interval                  (Time between redo log file switches)

       retry-ratio                      (Redo buffer allocation retries)

       redo-io-traffic                  (Redo log io bytes per second)

       roll-header-contention           (Rollback segment header contention)

       roll-block-contention            (Rollback segment block contention)

       roll-hit-ratio                   (Rollback segment hit ratio (gets/waits))

       roll-wraps                       (Rollback segment wraps (per sec))

       roll-extends                     (Rollback segment extends (per sec))

       roll-avgactivesize               (Rollback segment average active size)

       seg-top10-logical-reads          (user objects among top 10 logical reads)

       seg-top10-physical-reads         (user objects among top 10 physical reads)

       seg-top10-buffer-busy-waits      (user objects among top 10 buffer busy waits)

       seg-top10-row-lock-waits         (user objects among top 10 row lock waits)

       event-waits                      (processes wait events)

       event-waiting                    (time spent by processes waiting for an event)

       enqueue-contention               (percentage of enqueue requests which must wait)

       enqueue-waiting                  (percentage of time spent waiting for the enqueue)

       latch-contention                 (percentage of latch get requests which must wait)

       latch-waiting                    (percentage of time a latch spends sleeping)

       sysstat                          (change of sysstat values over time)

       flash-recovery-area-usage        (Used space in flash recovery area)

       flash-recovery-area-free         (Free space in flash recovery area)

       sql                              (any sql command returning a single number)

       list-tablespaces                 (convenience function which lists all tablespaces)

       list-datafiles                   (convenience function which lists all datafiles)

       list-enqueues                    (convenience function which lists all enqueues)

       list-latches                     (convenience function which lists all latches)

       list-events                      (convenience function which lists all events)

       list-background-events           (convenience function which lists all background events)

       list-sysstats                    (convenience function which lists all statistics from v$sysstat)


       the name of the tablespace, datafile, wait event,

       latch, enqueue, or sql statement depending on the mode.


       if name is a sql statement, this statement would appear in

       the output and the performance data. This can be ugly, so

       name2 can be used to appear instead.


       if this parameter is used, name will be interpreted as a

       regular expression.


       one of %, KB, MB, GB. This is used for a better output of mode=sql

       and for specifying thresholds for mode=tablespace-free


       outputs instance and database names

  Tablespace-related modes check all tablespaces in one run by default.

  If only a single tablespace should be checked, use the --name parameter.

  The same applies to datafile-related modes.

  tablespace-remaining-time will take historical data into account. The number

  of days in the past can be given with the --lookback parameter. (Default: 30)


  In mode sql you can url-encode the statement so you will not have to mess

  around with special characters in your Nagios service definitions.

  Instead of

  --name="select count(*) from v$session where status = 'ACTIVE'"

  you can say


  For your convenience you can call check_oracle_health with the --encode

  option and it will encode the standard input.

Let me know if you have any questions.
User avatar
Posts: 179
Joined: Tue Jul 25, 2017 3:32 pm

Re: check_oracle_health help run

Postby clinton92 » Fri Oct 13, 2017 9:54 pm

hi @dwasswa

i've successfully downloaded the plugin however, after trying just the --help option. I encountered this error.

libexec]# ./ --help
./ line 2: package: command not found
./ line 4: use: command not found
./ line 5: syntax error near unexpected token `('
./ line 5: `use Getopt::Long qw(:config no_ignore_case);'

Hope you can help me with this one, with a step by step instruction. thank you!
Posts: 3
Joined: Thu Sep 28, 2017 1:29 pm

Re: check_oracle_health help run

Postby dwasswa » Mon Oct 16, 2017 1:05 pm

You have an syntax error change
Code: Select all
Code: Select all
and try again.

Also,please send me the
Code: Select all
script you downloaded.
User avatar
Posts: 179
Joined: Tue Jul 25, 2017 3:32 pm

Return to Nagios Core

Who is online

Users browsing this forum: npolovenko and 23 guests