Nagios Exchange
  • Home
  • Directory
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up

Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now

Plugins4379Themes and Skins11Addons732Documentation283Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
Monitoring Agents NagEventLog
RSS Feed
Newest Listings Updated Listings
Top Contributors
Julien DESMAREST (4)Davide Lemma (4)deskwork_itunes142 (4)Joerg Hoerter (3)TcoUpLoad (1)
See More
Newest Contributors
Community Member (51)Davide Lemma (4)Alarig Le Lay (1)Penn Rabb (1)Sean Falzon (1)
See More
Home > Dinu Bunduchi
DB

Dinu Bunduchi

@dbunduki

User Stats

Favorites0

Views

Projects0

No Projects Found
Check Oracle status & health without install Oracle client

Fixed script for nagios 3.x and sqlplus 11.2

#!/usr/bin/perl -w my $host = $ARGV[0]; my $port = $ARGV[1]; my $sid = $ARGV[2]; my $user = $ARGV[3]; my $pass = $ARGV[4]; ### point this to your sqlplus binary my $sqlplus = "/usr/local/src/instantclient_11_2/sqlplus"; ### point this to your sqlplus directory $ENV{"LD_LIBRARY_PATH"} = "/usr/local/src/instantclient_11_2/"; sub trim($); my @result; my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2); my @param_array = ( [90,">","Dictionary Cache Hit Ratio",'SELECT (1 - (Sum(getmisses)/(Sum(gets) + Sum(getmisses)))) * 100 FROM v$rowcache;'], [99,">","Library Cache Hit Ratio",'SELECT (1 -(Sum(reloads)/(Sum(pins) + Sum(reloads)))) * 100 FROM v$librarycache;'], [89,">","DB Block Buffer Cache Hit Ratio",'SELECT (1 - (phys.value / (db.value + cons.value))) * 100 FROM v$sysstat phys,v$sysstat db,v$sysstat cons WHERE phys.name = 'physical reads' AND db.name = 'db block gets' AND cons.name = 'consistent gets';'], [98,">","Latch Hit Ratio",'SELECT (1 - (Sum(misses) / Sum(gets))) * 100 FROM v$latch;'], [5,")))" |"); while ( my $res = ) { if ($res =~ /^(ORA-d{5})/) { return $1; } } } if (logon() eq "ORA-01017" ){ for (my $i=0; $iumformat 999.999 $param_array[$i][3] exit EOF |") or die; while ( my $res = ) { #print trim($res)."n"; if ( $res =~/^s*S+/ ) { push(@results,trim($res)); } } } for (my $i=0; $is OK"; exit $ERRORS{"OK"}; } else { print "Unable to connect to $sid database!"; exit $ERRORS{"CRITICAL"}; }

Reviewed 14 years ago

No Favorites Found

Copyright © 2009-2025 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks