(No output on stdout) stderr: Use of uninitialized value in split at /usr/local/nagios/libexec/check_oracle_health line 4579.
Use of uninitialized value in split at /usr/local/nagios/libexec/check_oracle_health line 4579.
bumm Can't call method "execute" on an undefined value at /usr/local/nagios/libexec/check_oracle_health line 4891.
Can't use an undefined value as an ARRAY reference at /usr/local/nagios/libexec/check_oracle_health line 4905.
Last edited by rkennedy on Mon Jan 25, 2016 11:23 am, edited 1 time in total.
Reason:fixed [code][/code]
Tom Griep @tgriep is the one who installed Oracle on our prod systems. I worked with him on that, and we have configured one server for Oracle database and it is working. but for this Server I am facing issues.
[nagios@lussvpnagiosxi00 root]$ /usr/local/nagios/libexec/check_oracle_health
Please select a mode
Copyright (c) 2008 Gerhard Lausser
Check various parameters of Oracle databases
Usage:
check_oracle_health [-v] [-t <timeout>] --connect=<connect string>
--username=<username> --password=<password> --mode=<mode>
--tablespace=<tablespace>
check_oracle_health [-h | --help]
check_oracle_health [-V | --version]
Options:
--connect
the connect string
--username
the oracle user
--password
the oracle user's password
--warning
the warning range
--critical
the critical range
--mode
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)
session-usage (Percentage of sessions used)
process-usage (Percentage of processes used)
rman-backup-problems (Number of rman backup errors during the last 3 days)
sga-data-buffer-hit-ratio (Data Buffer Cache Hit Ratio)
sga-library-cache-gethit-ratio (Library Cache (Get) Hit Ratio)
sga-library-cache-pinhit-ratio (Library Cache (Pin) Hit Ratio)
sga-library-cache-reloads (Library Cache Reload (and Invalidation) Rate)
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)
corrupted-blocks (Number of corrupted blocks in database)
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)
datafiles-existing (Percentage of the maximum possible number of datafiles)
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)
--name
the name of the tablespace, datafile, wait event,
latch, enqueue, or sql statement depending on the mode.
--name2
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.
--regexp
if this parameter is used, name will be interpreted as a
regular expression.
--units
one of %, KB, MB, GB. This is used for a better output of mode=sql
and for specifying thresholds for mode=tablespace-free
--ident
outputs instance and database names
--commit
turns on autocommit for the dbd::oracle module
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
--name=select%20count%28%2A%29%20from%20v%24session%20where%20status%20%3D%20%27ACTIVE%27
For your convenience you can call check_oracle_health with the --encode
option and it will encode the standard input.
Send email to [email protected] if you have questions
regarding use of this software.
Please include version information with all correspondence (when possible,
use output from the --version option of the plugin itself).
Replace xxx.xxx.xxx.xxx with the IP address of the Oracle server
Replace oraclesid with the SID of the Oracle server
Replace oracleuser and oraclepass with the username and password that is setup on the Oracle server.
Also, can you post how the service check is configured on the XI server so we can review it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Replace xxx.xxx.xxx.xxx with the IP address of the Oracle server
Replace oraclesid with the SID of the Oracle server
Replace oracleuser and oraclepass with the username and password that is setup on the Oracle server.
Also, can you post how the service check is configured on the XI server so we can review it?
Hi Tom,
Please find the output asked for:
/usr/local/nagios/libexec/check_oracle_health --connect 'xx.xx.xx.xx:1521/SID' -username 'nagios' --password 'passwd' --mode tablespace-free --warning 10 --critical 20
CRITICAL - cannot connect to xx.xx.xx.xx:1521/SID. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.11.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.
at (eval 19) line 3
Compilation failed in require at (eval 19) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/local/nagios/libexec/check_oracle_health line 4755
uname -a
ls -l /usr/lib
ls -l /usr/lib/oracle
ls -l /usr/lib/oracle/11.2
ls -l /usr/lib/oracle/11.2/client64/lib
ls -l /usr/lib/oracle/11.2/client64
ls -l /usr/lib64/perl5/
Be sure to check out our Knowledgebase for helpful articles and solutions!
uname -a
ls -l /usr/lib
ls -l /usr/lib/oracle
ls -l /usr/lib/oracle/11.2
ls -l /usr/lib/oracle/11.2/client64/lib
ls -l /usr/lib/oracle/11.2/client64
ls -l /usr/lib64/perl5/