[-]
[+]
|
Changed |
nagios-plugins-oracle.changes
|
|
[-]
[+]
|
Changed |
nagios-plugins-oracle.spec
^
|
|
[-]
[+]
|
Changed |
check_oracle_health-1.7.2.tar.bz2/ChangeLog
^
|
@@ -2,6 +2,11 @@
# Changelog of the check_oracle_health plugin #
###############################################
+1.7.2 - 2011-09-21
+- add mode sga-library-cache-pinhit-ratio
+- sga-library-cache-hit-ratio becomes sga-library-cache-gethit-ratio
+- add mode sga-library-cache-reloads
+
1.7.1 - 2001-08-17
- add option --commit (Thanks Ovidiu)
|
[-]
[+]
|
Changed |
check_oracle_health-1.7.2.tar.bz2/configure
^
|
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.in .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for check_oracle_health 1.7.1.
+# Generated by GNU Autoconf 2.59 for check_oracle_health 1.7.2.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
@@ -268,8 +268,8 @@
# Identity of this package.
PACKAGE_NAME='check_oracle_health'
PACKAGE_TARNAME='check_oracle_health'
-PACKAGE_VERSION='1.7.1'
-PACKAGE_STRING='check_oracle_health 1.7.1'
+PACKAGE_VERSION='1.7.2'
+PACKAGE_STRING='check_oracle_health 1.7.2'
PACKAGE_BUGREPORT=''
ac_default_prefix=/usr/local/nagios
@@ -722,7 +722,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures check_oracle_health 1.7.1 to adapt to many kinds of systems.
+\`configure' configures check_oracle_health 1.7.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -788,7 +788,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of check_oracle_health 1.7.1:";;
+ short | recursive ) echo "Configuration of check_oracle_health 1.7.2:";;
esac
cat <<\_ACEOF
@@ -897,7 +897,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-check_oracle_health configure 1.7.1
+check_oracle_health configure 1.7.2
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -911,7 +911,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by check_oracle_health $as_me 1.7.1, which was
+It was created by check_oracle_health $as_me 1.7.2, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1554,7 +1554,7 @@
# Define the identity of the package.
PACKAGE='check_oracle_health'
- VERSION='1.7.1'
+ VERSION='1.7.2'
cat >>confdefs.h <<_ACEOF
@@ -2725,7 +2725,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by check_oracle_health $as_me 1.7.1, which was
+This file was extended by check_oracle_health $as_me 1.7.2, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -2780,7 +2780,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-check_oracle_health config.status 1.7.1
+check_oracle_health config.status 1.7.2
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
[-]
[+]
|
Changed |
check_oracle_health-1.7.2.tar.bz2/configure.in
^
|
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_REVISION ($Revision: 1.150 $)
AC_PREREQ(2.58)
-AC_INIT(check_oracle_health,1.7.1)
+AC_INIT(check_oracle_health,1.7.2)
AM_INIT_AUTOMAKE([1.9 tar-pax])
AC_CANONICAL_HOST
|
[-]
[+]
|
Changed |
check_oracle_health-1.7.2.tar.bz2/plugins-scripts/Nagios/DBD/Oracle/Server/Instance/SGA/SharedPool/LibraryCache.pm
^
|
@@ -18,6 +18,8 @@
sum_pinhits => undef,
get_hitratio => undef,
pin_hitratio => undef,
+ reloads => undef,
+ invalidations => undef,
warningrange => $params{warningrange},
criticalrange => $params{criticalrange},
};
@@ -31,20 +33,44 @@
my %params = @_;
$self->init_nagios();
if ($params{mode} =~
- /server::instance::sga::sharedpool::librarycache::hitratio/) {
+ /server::instance::sga::sharedpool::librarycache::(reloads|.*hitratio)/) {
+ # http://download.oracle.com/docs/cd/B10500_01/server.920/a96533/sqlviews.htm
+ # Look for the following when querying this view:
+ #
+ # High RELOADS or INVALIDATIONS
+ # Low GETHITRATIO or GETPINRATIO
+ #
+ # High number of RELOADS could be due to the following:
+ #
+ # Objects being invalidated (large number of INVALIDATIONS)
+ # Objects getting swapped out of memory
+ #
+ # Low GETHITRATIO could indicate that objects are getting swapped out of memory.
+ #
+ # Low PINHITRATIO could indicate the following:
+ #
+ # Session not executing the same cursor multiple times (even though it might be shared across different sessions)
+ # Session not finding the cursor shared
+ #
+ # The next step is to query V$DB_OBJECT_CACHE/V$SQLAREA to see if problems are limited to certain objects or spread across different objects. If invalidations are high, then it might be worth investigating which of the (invalidated object's) underlying objects are being changed.
+ #
($self->{sum_gethits}, $self->{sum_gets}, $self->{sum_pinhits},
- $self->{sum_pins}) = $self->{handle}->fetchrow_array(q{
- SELECT SUM(gethits), SUM(gets), SUM(pinhits), SUM(pins)
+ $self->{sum_pins}, $self->{reloads}, $self->{invalidations}) =
+ $self->{handle}->fetchrow_array(q{
+ SELECT SUM(gethits), SUM(gets), SUM(pinhits), SUM(pins),
+ SUM(reloads), SUM(invalidations)
FROM v$librarycache
});
if (! defined $self->{sum_gets} || ! defined $self->{sum_pinhits}) {
$self->add_nagios_critical("unable to get sga lc");
} else {
- $self->valdiff(\%params, qw(sum_gets sum_gethits sum_pins sum_pinhits));
+ $self->valdiff(\%params, qw(sum_gets sum_gethits sum_pins sum_pinhits reloads invalidations));
$self->{get_hitratio} = $self->{delta_sum_gets} ?
(100 * $self->{delta_sum_gethits} / $self->{delta_sum_gets}) : 0;
$self->{pin_hitratio} = $self->{delta_sum_pins} ?
(100 * $self->{delta_sum_pinhits} / $self->{delta_sum_pins}) : 0;
+ $self->{reload_rate} = $self->{delta_reloads} / $self->{delta_timestamp};
+ $self->{invalidation_rate} = $self->{delta_invalidations} / $self->{delta_timestamp};
}
}
}
@@ -54,12 +80,28 @@
my %params = @_;
if (! $self->{nagios_level}) {
if ($params{mode} =~
- /server::instance::sga::sharedpool::librarycache::hitratio/) {
+ /server::instance::sga::sharedpool::librarycache::(get)*hitratio/) {
$self->add_nagios(
$self->check_thresholds($self->{get_hitratio}, "98:", "95:"),
- sprintf "SGA library cache hit ratio %.2f%%", $self->{get_hitratio});
+ sprintf "SGA library cache (get) hit ratio %.2f%%", $self->{get_hitratio});
$self->add_perfdata(sprintf "sga_library_cache_hit_ratio=%.2f%%;%s;%s",
$self->{get_hitratio}, $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~
+ /server::instance::sga::sharedpool::librarycache::pinhitratio/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{pin_hitratio}, "98:", "95:"),
+ sprintf "SGA library cache (pin) hit ratio %.2f%%", $self->{get_hitratio});
+ $self->add_perfdata(sprintf "sga_library_cache_hit_ratio=%.2f%%;%s;%s",
+ $self->{get_hitratio}, $self->{warningrange}, $self->{criticalrange});
+ } elsif ($params{mode} =~
+ /server::instance::sga::sharedpool::librarycache::reloads/) {
+ $self->add_nagios(
+ $self->check_thresholds($self->{pin_hitratio}, "10", "100"),
+ sprintf "SGA library cache reloads %.2f/sec", $self->{reload_rate});
+ $self->add_perfdata(sprintf "sga_library_cache_reloads_per_sec=%.2f;%s;%s",
+ $self->{reload_rate}, $self->{warningrange}, $self->{criticalrange});
+ $self->add_perfdata(sprintf "sga_library_cache_invalidations_per_sec=%.2f",
+ $self->{invalidation_rate});
}
}
}
|
[-]
[+]
|
Changed |
check_oracle_health-1.7.2.tar.bz2/plugins-scripts/check_oracle_health.pl
^
|
@@ -51,9 +51,15 @@
['server::instance::sga::databuffer::hitratio',
'sga-data-buffer-hit-ratio', undef,
'Data Buffer Cache Hit Ratio' ],
- ['server::instance::sga::sharedpool::librarycache::hitratio',
- 'sga-library-cache-hit-ratio', undef,
- 'Library Cache Hit Ratio' ],
+ ['server::instance::sga::sharedpool::librarycache::gethitratio',
+ 'sga-library-cache-gethit-ratio', ['sga-library-cache-hit-ratio'],
+ 'Library Cache (Get) Hit Ratio' ],
+ ['server::instance::sga::sharedpool::librarycache::pinhitratio',
+ 'sga-library-cache-pinhit-ratio', undef,
+ 'Library Cache (Pin) Hit Ratio' ],
+ ['server::instance::sga::sharedpool::librarycache::reloads',
+ 'sga-library-cache-reloads', undef,
+ 'Library Cache Reload (and Invalidation) Rate' ],
['server::instance::sga::sharedpool::dictionarycache::hitratio',
'sga-dictionary-cache-hit-ratio', undef,
'Dictionary Cache Hit Ratio' ],
|