Changes of Revision 18
[-] | Changed | nagios-plugins-oracle.spec |
x 1
2 %define pkg_name check_oracle_health 3 Name: nagios-plugins-oracle 4 -Version: 1.6.8 5 +Version: 1.6.8.1 6 Release: 1 7 Summary: Oracle health check plugins for Nagios 8 Group: Applications/System 9 License: GPL 10 URL: http://www.consol.de/opensource/nagios/check-oracle-health 11 -Source0: http://www.consol.de/fileadmin/opensource/Nagios/%{pkg_name}-%{version}.tar.gz 12 +Source0: http://www.consol.de/fileadmin/opensource/Nagios/%{pkg_name}-%{version}.tar.bz2 13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 14 15 Prefix: %{_prefix}/lib/nagios/plugins 16
17 %doc AUTHORS ChangeLog README COPYING 18 19 %changelog 20 +* Thu Feb 10 2011 Carsten Schoene <cs@linux-administrator.com> - 1.6.8.1-1 21 +- update to version 1.6.8.1 22 + 23 * Thu Jan 06 2011 Carsten Schoene <cs@linux-administrator.com> - 1.6.8-1 24 - update to version 1.6.8 25 26 |
||
[+] | Changed | check_oracle_health-1.6.8.1.tar.bz2/ChangeLog ^ |
@@ -2,6 +2,9 @@ # Changelog of the check_oracle_health plugin # ############################################### +1.6.8.1 - 2011-01-08 +- Workaround for the windows version which cleans up leftover spool files which cannot be deleted. + 1.6.8 - 2010-01.03 - massive speedup in modes seg-top10-* (Thanks Michael Nieberg http://kenntwas.de) - bugfix in --mode sql (numeric vs. regexp result) (Thanks Michel Meelker) | ||
[+] | Changed | check_oracle_health-1.6.8.1.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.6.8. +# Generated by GNU Autoconf 2.59 for check_oracle_health 1.6.8.1. # # 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.6.8' -PACKAGE_STRING='check_oracle_health 1.6.8' +PACKAGE_VERSION='1.6.8.1' +PACKAGE_STRING='check_oracle_health 1.6.8.1' 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.6.8 to adapt to many kinds of systems. +\`configure' configures check_oracle_health 1.6.8.1 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.6.8:";; + short | recursive ) echo "Configuration of check_oracle_health 1.6.8.1:";; 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.6.8 +check_oracle_health configure 1.6.8.1 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.6.8, which was +It was created by check_oracle_health $as_me 1.6.8.1, 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.6.8' + VERSION='1.6.8.1' cat >>confdefs.h <<_ACEOF @@ -2725,7 +2725,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by check_oracle_health $as_me 1.6.8, which was +This file was extended by check_oracle_health $as_me 1.6.8.1, 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.6.8 +check_oracle_health config.status 1.6.8.1 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" | ||
[+] | Changed | check_oracle_health-1.6.8.1.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.6.8) +AC_INIT(check_oracle_health,1.6.8.1) AM_INIT_AUTOMAKE([1.9 tar-pax]) AC_CANONICAL_HOST | ||
[+] | Changed | check_oracle_health-1.6.8.1.tar.bz2/plugins-scripts/Nagios/DBD/Oracle/Server.pm ^ |
@@ -949,7 +949,7 @@ my $re_tns_gentry = '^\w.*?='; # generic entry my $re_tns_pair = '\w+\s*\=\s*[\w\.]+'; # used to parse key=val my $re_keys = 'host|port|sid'; - my @tnsfile = split(/\n/, do { local (@ARGV, $/) = $self->{tnsfile}; <> }); + my @tnsfile = split(/\n/, do { local (@ARGV, $/) = $self->{tnsfile}; my $x = <>; close ARGV; $x; }); my $found = 0; my $datastring = ""; foreach (@tnsfile) { @@ -1101,21 +1101,28 @@ my $retval = undef; $self->{loginstring} = "traditional"; my $template = $self->{mode}.'XXXXX'; + my $now = time; if ($^O =~ /MSWin/) { $template =~ s/::/_/g; + # This is no longer necessary. (Explanation in fetchrow_array "best practice". + # But maybe we have crap files for whatever reason. + my $pattern = $template; + $pattern =~ s/XXXXX$//g; + foreach (glob $self->system_tmpdir().'/'.$pattern.'*') { + if (/\.(sql|out|err)$/) { + if (($now - (stat $_)[9]) > 300) { + unlink $_; + } + } + } } - ($self->{sql_commandfile_handle}, $self->{sql_commandfile}) = - tempfile($template, SUFFIX => ".sql", - DIR => $self->system_tmpdir() ); - close $self->{sql_commandfile_handle}; - ($self->{sql_resultfile_handle}, $self->{sql_resultfile}) = - tempfile($template, SUFFIX => ".out", - DIR => $self->system_tmpdir() ); - close $self->{sql_resultfile_handle}; - ($self->{sql_outfile_handle}, $self->{sql_outfile}) = - tempfile($template, SUFFIX => ".out", + my ($tempfile_handle, $tempfile) = + tempfile($template, SUFFIX => ".temp", UNLINK => 1, DIR => $self->system_tmpdir() ); - close $self->{sql_outfile_handle}; + close $tempfile_handle; + ($self->{sql_commandfile} = $tempfile) =~ s/temp$/sql/; + ($self->{sql_resultfile} = $tempfile) =~ s/temp$/out/; + ($self->{sql_outfile} = $tempfile) =~ s/temp$/err/; if ($self->{mode} =~ /^server::tnsping/) { if (! $self->{connect}) { $self->{errstr} = "Please specify a database"; @@ -1392,13 +1399,15 @@ $self->create_commandfile($sql); my $exit_output = `$self->{sqlplus}`; if ($?) { - my $output = do { local (@ARGV, $/) = $self->{sql_outfile}; <> }; + my $output = do { local (@ARGV, $/) = $self->{sql_outfile}; my $x = <>; close ARGV; $x } || 'empty'; my @oerrs = map { /(ORA\-\d+:.*)/ ? $1 : (); } split(/\n/, $output); - $self->{errstr} = join(" ", @oerrs); + $self->{errstr} = join(" ", @oerrs).' '.$exit_output; } else { - my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> }; + # This so-called "best practice" leaves an open filehandle under windows + # my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> }; + my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; my $x = <>; close ARGV; $x }; @row = map { convert($_) } map { s/^\s+([\.\d]+)$/$1/g; $_ } # strip leading space from numbers map { s/\s+$//g; $_ } # strip trailing space @@ -1439,13 +1448,13 @@ my $exit_output = `$self->{sqlplus}`; if ($?) { printf STDERR "fetchrow_array exit bumm %s\n", $exit_output; - my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> }; + my $output = do { local (@ARGV, $/) = $self->{sql_outfile}; my $x = <>; close ARGV; $x } || 'empty'; my @oerrs = map { /(ORA\-\d+:.*)/ ? $1 : (); } split(/\n/, $output); - $self->{errstr} = join(" ", @oerrs); + $self->{errstr} = join(" ", @oerrs).' '.$exit_output; } else { - my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> }; + my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; my $x = <>; close ARGV; $x }; my @rows = map { [ map { convert($_) } map { s/^\s+([\.\d]+)$/$1/g; $_ } @@ -1533,6 +1542,7 @@ printf CMDCMD "SPOOL %s\n", $self->{sql_resultfile}; # printf CMDCMD "ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.,';\n/\n"; printf CMDCMD "%s\n/\n", $sql; + printf CMDCMD "SPOOL OFF\n", $sql; printf CMDCMD "EXIT\n"; close CMDCMD; } |