Changes of Revision 17
[-] | Changed | nagios-plugins-oracle.spec |
x 1
2 %define pkg_name check_oracle_health 3 Name: nagios-plugins-oracle 4 -Version: 1.6.7 5 +Version: 1.6.8 6 Release: 1 7 Summary: Oracle health check plugins for Nagios 8 Group: Applications/System 9
10 %doc AUTHORS ChangeLog README COPYING 11 12 %changelog 13 +* Thu Jan 06 2011 Carsten Schoene <cs@linux-administrator.com> - 1.6.8-1 14 +- update to version 1.6.8 15 + 16 * Tue Dec 21 2010 Carsten Schoene <cs@linux-administrator.com> - 1.6.7-1 17 - update to version 1.6.7 18 19 |
||
Deleted | check_oracle_health-1.5.0.1.tar.gz ^ | |
Deleted | check_oracle_health-1.5.tar.gz ^ | |
Deleted | check_oracle_health-1.6.2.tar.gz ^ | |
Deleted | check_oracle_health-1.6.3.tar.gz ^ | |
Deleted | check_oracle_health-1.6.4.tar.gz ^ | |
Deleted | check_oracle_health-1.6.6.1.tar.gz ^ | |
Deleted | check_oracle_health-1.6.6.tar.gz ^ | |
Deleted | check_oracle_health-1.6.7.tar.gz ^ | |
[+] | Changed | check_oracle_health-1.6.8.tar.gz/ChangeLog ^ |
@@ -2,6 +2,81 @@ # Changelog of the check_oracle_health plugin # ############################################### +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) + +1.6.7 - 2010-12-18 +- mode sql can now have a non-numerical output which is compared to a string/regexp +- new mode report can be used to output only the bad news (short,long,html) + +1.6.6.2 2010-11-11 +- better error message with method sqlplus when db is down + +1.6.6.1 2010-10-01 +- --dbthresholds can have an argument +- workaround for an oracle-bug in shared-pool-free (Thanks Yannik) + +1.6.6 2010-08-12 +- new parameter --dbthresholds. thresholds can now also be deposited in the table check_oracle_health_thresholds +- bugfix in connection-time. dbuser was uninitialized in rare cases + +1.6.5 2010-08-09 +- plugin can now run on windows +- --with-mymodules-dyn-dir on the commandline overrides the configure-option of the same name +- added mode flash-recovery-area-[usage|free] + +1.6.4 +- added checking of dba_registry to mode invalid-objects. Thanks Ovidiu Marcu +- speedup of tablespace-remaining-time. Thanks Steffen Poulsen +- switch-interval detects redo log timestamps in the future and reports critical- method sqlplus now works with "(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP"-like connectstrings +- new parameter --ident to show instance and database names in the output +- bugfix in tablespace-usage (temp tbs with multiple datafiles). Thanks Philipp Lemke + +1.6.3 2009-09-09 +- optimized tablespace-can-allocate-next +- added more tracing. +- fixed a bug which caused invalid statefile names. Thanks Franky van Liedekerke +- fixed a bug in tablespace-usage for Oracle 8.1.x +- switch-interval now tries to predict the next interval to avoid false alerts. Thanks Naquada. +- passwords do no longer show up in error messages. Thanks Jens Seiffert. +- fixed a bug in mode sql (numbers of the form .5 were rejected). Thanks Shane Jordan. +- fixed a bug in sga-latches-hitratio (thresholds were ignored). Thanks Yannik Charton. +- login parameter --user is now --username (--user still works) + +1.6.2 2009-04-04 +- fixed a bug in tablespace-usage and german localization +- fixed a bug with --method sqlplus and tablespacenames. Thanks "contact_name" +- fixed a bug in tablespace-usage/free with non-autoextensible TEMP-tablespaces. Thanks Daniel Graef. + +1.6.1 2009-03-27 +- NAGIOS__HOSTMYSQL_HOST is now possible +- added detection for offline/damaged tablespaces to --mode=tablespace-usage|free. Thanks Daniel Graef. + +1.6 2009-03-12 +- support for DBD::SQLRelay (use it. it spares your database + the extra load caused by permanent logins) +- added support for mode=sql and an array of results. Thanks Juergen Lesny from Matrix. +- added support for login as "sys". Thanks Joerg Horchler. +- fixed a bug where warning/critical=0 was ignored. Thanks Danijel Tasov. + +1.5.1 2008-12-10 +- the plugin can be used with the embedded perl interpreter. +- fixed some typos. Thanks Oliver Riesen. + +1.5.0.1 2008-10-16 +- fixed a bug with , instead of . in decimal numbers. Thanks Birk Bohne. +- mode=sql numerical results are round up to two decimal places. +- fixed a bug in sga-shared-pool-free. You'll see more free space now. Thanks Birk Bohne. + +1.5.0 2008-10-15 +- added authentication with password store +- added authentication as sysdba +- new parameter --units for mode=sql +- new parameter tablespace-free which allows thresholds in combination with --units +- mode=switch-interval now separates redologs of rac nodes. Thanks Harald Zahn. +- it is now possible to integrate self-written code + 1.4.2.1 2008-09-19 - bugfix in tablespace-usage. resized datafiles caused usage 100% @@ -63,7 +138,7 @@ - added sysstat-rate and list-sysstats 1.2.6 2008-06-14 -- added event-waited +- added event-waiting - added event-waits - added list-events | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/INSTALL ^ |
@@ -227,3 +227,7 @@ `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. +Joerg +===== + +Na, hast du alles brav durchgelesen? | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/Makefile.am ^ |
@@ -3,10 +3,11 @@ # find . \( -type d -and -name .svn -and -prune \) -or -type f -exec fromdos -v {} \; SUBDIRS = plugins-scripts t +EXTRA_DIST = contrib dist-hook: rm -f t/var/tmp/* rm -f t/var/adm/* find $(distdir) -depth -name .svn -exec rm -rf {} \; - find $(distdir) -type f -exec fromdos -v {} \; + find $(distdir) -type f -exec dos2unix -v {} \; make | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/Makefile.in ^ |
@@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,10 +15,13 @@ @SET_MAKE@ # find . \( -type d -and -name .svn -and -prune \) -or -type f -exec fromdos -v {} \; +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -33,31 +36,28 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS TODO config.guess config.sub install-sh \ missing +subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno + configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -72,6 +72,7 @@ GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print +INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ @@ -87,7 +88,6 @@ ECHO_T = @ECHO_T@ GREP = @GREP@ GZIP = @GZIP@ -INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_OPTS = @INSTALL_OPTS@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -97,7 +97,8 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ +MYMODULES_DIR = @MYMODULES_DIR@ +MYMODULES_DYN_DIR = @MYMODULES_DYN_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -116,10 +117,7 @@ SUPPORT = @SUPPORT@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ +ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -129,42 +127,32 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ -builddir = @builddir@ datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ -htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ -localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ with_nagios_group = @with_nagios_group@ with_nagios_user = @with_nagios_user@ SUBDIRS = plugins-scripts t +EXTRA_DIST = contrib all: all-recursive .SUFFIXES: @@ -201,6 +189,7 @@ cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -233,7 +222,8 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -335,22 +325,24 @@ distdir: $(DISTFILES) $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ + mkdir $(distdir) + $(mkdir_p) $(distdir)/plugins-scripts + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -364,7 +356,7 @@ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ @@ -372,8 +364,6 @@ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ @@ -381,10 +371,10 @@ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -find $(distdir) -type d ! -perm -755 -exec chmod a+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz @@ -459,7 +449,7 @@ $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ @@ -528,20 +518,12 @@ install-data-am: -install-dvi: install-dvi-recursive - install-exec-am: -install-html: install-html-recursive - install-info: install-info-recursive install-man: -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -562,32 +544,31 @@ ps-am: -uninstall-am: +uninstall-am: uninstall-info-am -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +uninstall-info: uninstall-info-recursive -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ - tags-recursive uninstall uninstall-am +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-generic clean-recursive ctags \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-recursive distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-info-am dist-hook: rm -f t/var/tmp/* rm -f t/var/adm/* find $(distdir) -depth -name .svn -exec rm -rf {} \; - find $(distdir) -type f -exec fromdos -v {} \; + find $(distdir) -type f -exec dos2unix -v {} \; make # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/README ^ |
@@ -130,6 +130,13 @@ grant select_catalog_role to nagios; instead of "grant select any dictionary..." +If you monitor the oracle 7.x database at the local computer museum: +grant select on V_$SYSSTAT to nagios; +grant select on sys.dba_tablespaces to nagios; +grant select on sys.dba_free_space to nagios; +grant select on sys.dba_data_files to nagios; + + -------------------------------------- That's it. If you have any problems or questions, feel free to send mail to gerhard.lausser@consol.de | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/TODO ^ |
@@ -1 +1,26 @@ a lot + +maybe add some ORA- to the examples +ORA-60X alle Internal Errors +SEGV, SIGBUS alle System Access Violations +Ora-4020 Deadlock on library object +ORA-8103 Object no longer exists +ORA-1410 invalid ROWID +ORA-1578 Data block corrupted +ORA-29740 Node eviction +ORA-255 Database is not mounted +ORA-376 File cannot be read at this time +ORA-4030 Out of memory +ORA-4031 Unable to allocate more bytes of shared memory +ORA-355 The change numbers are out of order +ORA356 Inconsistent lengths in change description +ORA-353 Log corruption +ORA-7445 Operating System exception +Checkpoint not complete + + +! Lesny proposal for multiple sql results + + +flash recovery area free +http://www.muniqsoft.de/tipps/monatstipps/Tipp0308.pdf | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/aclocal.m4 ^ |
@@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,12 +11,7 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) - -# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -26,29 +21,14 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -105,8 +85,8 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -129,20 +109,16 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl +[AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath @@ -162,9 +138,6 @@ AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl @@ -200,10 +173,6 @@ [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) @@ -239,7 +208,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -265,14 +234,14 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 +# serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -288,7 +257,6 @@ # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then @@ -299,7 +267,7 @@ fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -307,23 +275,60 @@ # AM_PROG_MKDIR_P # --------------- -# Check for `mkdir -p'. +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. +# +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- @@ -452,21 +457,9 @@ if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/configure ^ |
@@ -1,55 +1,26 @@ #! /bin/sh # From configure.in . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for check_oracle_health 1.4.2.1. +# Generated by GNU Autoconf 2.59 for check_oracle_health 1.6.8. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -59,43 +30,8 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -109,19 +45,18 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -129,388 +64,157 @@ # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -519,28 +223,7 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -549,124 +232,49 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 </dev/null 6>&1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME='check_oracle_health' PACKAGE_TARNAME='check_oracle_health' -PACKAGE_VERSION='1.4.2.1' -PACKAGE_STRING='check_oracle_health 1.4.2.1' +PACKAGE_VERSION='1.6.8' +PACKAGE_STRING='check_oracle_health 1.6.8' PACKAGE_BUGREPORT='' ac_default_prefix=/usr/local/nagios -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -RELEASE -INSTALL -WARRANTY -SUPPORT -with_nagios_user -with_nagios_group -INSTALL_OPTS -STATEFILES_DIR -SH -PERL -GZIP -GREP -ECHO -SED -CAT -LIBOBJS -LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os RELEASE INSTALL WARRANTY SUPPORT with_nagios_user with_nagios_group INSTALL_OPTS STATEFILES_DIR MYMODULES_DIR MYMODULES_DYN_DIR SH PERL GZIP GREP ECHO SED CAT LIBOBJS LTLIBOBJS' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias' - # Initialize some variables set by options. ac_init_help= @@ -693,48 +301,34 @@ # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -756,45 +350,33 @@ --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -821,12 +403,6 @@ -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -851,16 +427,13 @@ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -925,16 +498,6 @@ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -987,20 +550,24 @@ -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1031,7 +598,8 @@ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1051,19 +619,27 @@ { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1090,76 +666,54 @@ test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias # # Report the --help message. @@ -1168,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.4.2.1 to adapt to many kinds of systems. +\`configure' configures check_oracle_health 1.6.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1188,6 +742,9 @@ -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1205,22 +762,15 @@ --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/check_oracle_health] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1238,7 +788,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of check_oracle_health 1.4.2.1:";; + short | recursive ) echo "Configuration of check_oracle_health 1.6.8:";; esac cat <<\_ACEOF @@ -1248,89 +798,125 @@ --with-nagios-user=USER set user name to run nagios --with-nagios-group=GROUP set group name to run nagios --with-statefiles-dir=PATH sets directory for the state files (default=/var/tmp/check_oracle_health) + --with-mymodules-dir=PATH sets directory for own extensions which will be included during the build process (default=/usr/local/nagios/libexec) + --with-mymodules-dyn-dir=PATH sets directory for own extensions which will be included at runtime (default=/usr/local/nagios/libexec) --with-perl=PATH sets path to perl executable _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -check_oracle_health configure 1.4.2.1 -generated by GNU Autoconf 2.61 +check_oracle_health configure 1.6.8 +generated by GNU Autoconf 2.59 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF 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.4.2.1, which was -generated by GNU Autoconf 2.61. Invocation command line was +It was created by check_oracle_health $as_me 1.6.8, which was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1349,7 +935,7 @@ /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1363,7 +949,6 @@ test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1385,6 +970,7 @@ ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1395,7 +981,7 @@ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1417,7 +1003,9 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1428,8 +1016,8 @@ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1442,34 +1030,20 @@ _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1480,28 +1054,22 @@ echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1513,24 +1081,26 @@ ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1561,17 +1131,14 @@ # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1587,8 +1154,8 @@ { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1600,11 +1167,12 @@ # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1629,7 +1197,8 @@ # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1646,6 +1215,11 @@ { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1670,45 +1244,34 @@ -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version='1.10' +am__api_version="1.9" ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f "$ac_dir/install.sh"; then + elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f "$ac_dir/shtool"; then + elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -1723,8 +1286,8 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1746,7 +1309,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1765,22 +1328,21 @@ ;; esac done -IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the value is a relative name. + # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1790,8 +1352,8 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file @@ -1833,20 +1395,20 @@ Check your system clock" >&2;} { (exit 1); exit 1; }; } fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" + program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" + program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed +rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -1861,60 +1423,45 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" + mkdir_p='$(install_sh) -d' fi fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1927,57 +1474,54 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$AWK" && break done -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF -SHELL = /bin/sh all: - @echo '@@@%%%=$(MAKE)=@@@%%%' + @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi rm -f conftest.make fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -1990,16 +1534,12 @@ fi rmdir .tst 2>/dev/null -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } - fi fi # test whether we have cygpath @@ -2014,7 +1554,7 @@ # Define the identity of the package. PACKAGE='check_oracle_health' - VERSION='1.4.2.1' + VERSION='1.6.8' cat >>confdefs.h <<_ACEOF @@ -2042,7 +1582,7 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right @@ -2052,8 +1592,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2066,34 +1606,32 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2106,47 +1644,33 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi + STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. @@ -2155,8 +1679,8 @@ AMTAR=${AMTAR-"${am_missing_run}tar"} -{ echo "$as_me:$LINENO: checking how to create a pax tar archive" >&5 -echo $ECHO_N "checking how to create a pax tar archive... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking how to create a pax tar archive" >&5 +echo $ECHO_N "checking how to create a pax tar archive... $ECHO_C" >&6 # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' _am_tools=${am_cv_prog_tar_pax-$_am_tools} @@ -2234,94 +1758,65 @@ am_cv_prog_tar_pax=$_am_tool fi -{ echo "$as_me:$LINENO: result: $am_cv_prog_tar_pax" >&5 -echo "${ECHO_T}$am_cv_prog_tar_pax" >&6; } +echo "$as_me:$LINENO: result: $am_cv_prog_tar_pax" >&5 +echo "${ECHO_T}$am_cv_prog_tar_pax" >&6 # Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } -fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -2343,8 +1838,8 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2366,7 +1861,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2385,22 +1880,21 @@ ;; esac done -IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the value is a relative name. + # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2413,33 +1907,32 @@ -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF -SHELL = /bin/sh all: - @echo '@@@%%%=$(MAKE)=@@@%%%' + @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi rm -f conftest.make fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -2451,44 +1944,68 @@ -# Check whether --with-nagios_user was given. +# Check whether --with-nagios_user or --without-nagios_user was given. if test "${with_nagios_user+set}" = set; then - withval=$with_nagios_user; with_nagios_user=$withval + withval="$with_nagios_user" + with_nagios_user=$withval else with_nagios_user=nagios -fi - +fi; -# Check whether --with-nagios_group was given. +# Check whether --with-nagios_group or --without-nagios_group was given. if test "${with_nagios_group+set}" = set; then - withval=$with_nagios_group; with_nagios_group=$withval + withval="$with_nagios_group" + with_nagios_group=$withval else with_nagios_group=nagios -fi - +fi; INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group" -# Check whether --with-statefiles_dir was given. +# Check whether --with-statefiles_dir or --without-statefiles_dir was given. if test "${with_statefiles_dir+set}" = set; then - withval=$with_statefiles_dir; with_statefiles_dir=$withval + withval="$with_statefiles_dir" + with_statefiles_dir=$withval else with_statefiles_dir=/var/tmp/check_oracle_health -fi - +fi; STATEFILES_DIR=$with_statefiles_dir echo variable with_statefiles_dir is $with_statefiles_dir + +# Check whether --with-mymodules_dir or --without-mymodules_dir was given. +if test "${with_mymodules_dir+set}" = set; then + withval="$with_mymodules_dir" + with_mymodules_dir=$withval +else + with_mymodules_dir=/usr/local/nagios/libexec +fi; +MYMODULES_DIR=$with_mymodules_dir + +echo variable with_mymodules_dir is $with_mymodules_dir + + +# Check whether --with-mymodules_dyn_dir or --without-mymodules_dyn_dir was given. +if test "${with_mymodules_dyn_dir+set}" = set; then + withval="$with_mymodules_dyn_dir" + with_mymodules_dyn_dir=$withval +else + with_mymodules_dyn_dir=/usr/local/nagios/libexec +fi; +MYMODULES_DYN_DIR=$with_mymodules_dyn_dir + +echo variable with_mymodules_dyn_dir is $with_mymodules_dyn_dir + EXTRAS= # Extract the first word of "sh", so it can be a program name with args. set dummy sh; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2503,32 +2020,31 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi SH=$ac_cv_path_SH + if test -n "$SH"; then - { echo "$as_me:$LINENO: result: $SH" >&5 -echo "${ECHO_T}$SH" >&6; } + echo "$as_me:$LINENO: result: $SH" >&5 +echo "${ECHO_T}$SH" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2543,32 +2059,31 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi PERL=$ac_cv_path_PERL + if test -n "$PERL"; then - { echo "$as_me:$LINENO: result: $PERL" >&5 -echo "${ECHO_T}$PERL" >&6; } + echo "$as_me:$LINENO: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # Extract the first word of "gzip", so it can be a program name with args. set dummy gzip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GZIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2583,34 +2098,33 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi GZIP=$ac_cv_path_GZIP + if test -n "$GZIP"; then - { echo "$as_me:$LINENO: result: $GZIP" >&5 -echo "${ECHO_T}$GZIP" >&6; } + echo "$as_me:$LINENO: result: $GZIP" >&5 +echo "${ECHO_T}$GZIP" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - for ac_prog in gawk nawk /usr/xpg4/bin/awk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2625,35 +2139,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi AWK=$ac_cv_path_AWK + if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$AWK" && break done # Extract the first word of "grep", so it can be a program name with args. set dummy grep; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2668,32 +2181,31 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi GREP=$ac_cv_path_GREP + if test -n "$GREP"; then - { echo "$as_me:$LINENO: result: $GREP" >&5 -echo "${ECHO_T}$GREP" >&6; } + echo "$as_me:$LINENO: result: $GREP" >&5 +echo "${ECHO_T}$GREP" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # Extract the first word of "echo", so it can be a program name with args. set dummy echo; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ECHO+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2708,32 +2220,31 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi ECHO=$ac_cv_path_ECHO + if test -n "$ECHO"; then - { echo "$as_me:$LINENO: result: $ECHO" >&5 -echo "${ECHO_T}$ECHO" >&6; } + echo "$as_me:$LINENO: result: $ECHO" >&5 +echo "${ECHO_T}$ECHO" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2748,32 +2259,31 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi SED=$ac_cv_path_SED + if test -n "$SED"; then - { echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6; } + echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # Extract the first word of "cat", so it can be a program name with args. set dummy cat; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_CAT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2788,42 +2298,40 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi CAT=$ac_cv_path_CAT + if test -n "$CAT"; then - { echo "$as_me:$LINENO: result: $CAT" >&5 -echo "${ECHO_T}$CAT" >&6; } + echo "$as_me:$LINENO: result: $CAT" >&5 +echo "${ECHO_T}$CAT" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - -# Check whether --with-perl was given. +# Check whether --with-perl or --without-perl was given. if test "${with_perl+set}" = set; then - withval=$with_perl; with_perl=$withval + withval="$with_perl" + with_perl=$withval else with_perl=$PERL -fi - +fi; PERL=$with_perl -ac_config_files="$ac_config_files Makefile plugins-scripts/Makefile plugins-scripts/subst t/Makefile" - + ac_config_files="$ac_config_files Makefile plugins-scripts/Makefile plugins-scripts/subst t/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -2842,58 +2350,39 @@ # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -2902,48 +2391,63 @@ # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -2974,45 +2478,17 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -3022,43 +2498,8 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -3072,19 +2513,18 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -3092,120 +2532,159 @@ # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -3214,28 +2693,7 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -3244,14 +2702,31 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by check_oracle_health $as_me 1.4.2.1, which was -generated by GNU Autoconf 2.61. Invocation command line was +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by check_oracle_health $as_me 1.6.8, which was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -3259,18 +2734,30 @@ CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -3278,7 +2765,7 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -3289,22 +2776,19 @@ $config_files Report bugs to <bug-autoconf@gnu.org>." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -check_oracle_health config.status 1.4.2.1 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +check_oracle_health config.status 1.6.8 +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' +srcdir=$srcdir +INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -3315,42 +2799,60 @@ do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -3366,45 +2868,31 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "plugins-scripts/Makefile") CONFIG_FILES="$CONFIG_FILES plugins-scripts/Makefile" ;; - "plugins-scripts/subst") CONFIG_FILES="$CONFIG_FILES plugins-scripts/subst" ;; - "t/Makefile") CONFIG_FILES="$CONFIG_FILES t/Makefile" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "plugins-scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins-scripts/Makefile" ;; + "plugins-scripts/subst" ) CONFIG_FILES="$CONFIG_FILES plugins-scripts/subst" ;; + "t/Makefile" ) CONFIG_FILES="$CONFIG_FILES t/Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -3414,403 +2902,333 @@ fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -RELEASE!$RELEASE$ac_delim -INSTALL!$INSTALL$ac_delim -WARRANTY!$WARRANTY$ac_delim -SUPPORT!$SUPPORT$ac_delim -with_nagios_user!$with_nagios_user$ac_delim -with_nagios_group!$with_nagios_group$ac_delim -INSTALL_OPTS!$INSTALL_OPTS$ac_delim -STATEFILES_DIR!$STATEFILES_DIR$ac_delim -SH!$SH$ac_delim -PERL!$PERL$ac_delim -GZIP!$GZIP$ac_delim -GREP!$GREP$ac_delim -ECHO!$ECHO$ac_delim -SED!$SED$ac_delim -CAT!$CAT$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 84; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CYGPATH_W@,$CYGPATH_W,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@install_sh@,$install_sh,;t t +s,@STRIP@,$STRIP,;t t +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@mkdir_p@,$mkdir_p,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@am__leading_dot@,$am__leading_dot,;t t +s,@AMTAR@,$AMTAR,;t t +s,@am__tar@,$am__tar,;t t +s,@am__untar@,$am__untar,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@RELEASE@,$RELEASE,;t t +s,@INSTALL@,$INSTALL,;t t +s,@WARRANTY@,$WARRANTY,;t t +s,@SUPPORT@,$SUPPORT,;t t +s,@with_nagios_user@,$with_nagios_user,;t t +s,@with_nagios_group@,$with_nagios_group,;t t +s,@INSTALL_OPTS@,$INSTALL_OPTS,;t t +s,@STATEFILES_DIR@,$STATEFILES_DIR,;t t +s,@MYMODULES_DIR@,$MYMODULES_DIR,;t t +s,@MYMODULES_DYN_DIR@,$MYMODULES_DYN_DIR,;t t +s,@SH@,$SH,;t t +s,@PERL@,$PERL,;t t +s,@GZIP@,$GZIP,;t t +s,@GREP@,$GREP,;t t +s,@ECHO@,$ECHO,;t t +s,@SED@,$SED,;t t +s,@CAT@,$CAT,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS <conf$$subs.sed -rm -f conf$$subs.sed -cat >>$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -3818,41 +3236,29 @@ cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - - - - esac +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF @@ -3886,3 +3292,5 @@ echo " --with-statefiles-dir: $with_statefiles_dir" echo " --with-nagios-user: $with_nagios_user" echo " --with-nagios-group: $with_nagios_group" +echo " --with-mymodules-dir: $with_mymodules_dir" +echo " --with-mymodules-dyn-dir: $with_mymodules_dyn_dir" | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/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.4.2.1) +AC_INIT(check_oracle_health,1.6.8) AM_INIT_AUTOMAKE([1.9 tar-pax]) AC_CANONICAL_HOST @@ -50,6 +50,22 @@ AC_SUBST(STATEFILES_DIR, $with_statefiles_dir) echo variable with_statefiles_dir is $with_statefiles_dir +AC_ARG_WITH(mymodules_dir, + ACX_HELP_STRING([--with-mymodules-dir=PATH], + [sets directory for own extensions which will be included during the build process (default=/usr/local/nagios/libexec)]), + with_mymodules_dir=$withval, + with_mymodules_dir=/usr/local/nagios/libexec) +AC_SUBST(MYMODULES_DIR, $with_mymodules_dir) +echo variable with_mymodules_dir is $with_mymodules_dir + +AC_ARG_WITH(mymodules_dyn_dir, + ACX_HELP_STRING([--with-mymodules-dyn-dir=PATH], + [sets directory for own extensions which will be included at runtime (default=/usr/local/nagios/libexec)]), + with_mymodules_dyn_dir=$withval, + with_mymodules_dyn_dir=/usr/local/nagios/libexec) +AC_SUBST(MYMODULES_DYN_DIR, $with_mymodules_dyn_dir) +echo variable with_mymodules_dyn_dir is $with_mymodules_dyn_dir + EXTRAS= dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH @@ -81,3 +97,5 @@ ACX_FEATURE([with],[statefiles-dir]) ACX_FEATURE([with],[nagios-user]) ACX_FEATURE([with],[nagios-group]) +ACX_FEATURE([with],[mymodules-dir]) +ACX_FEATURE([with],[mymodules-dyn-dir]) | ||
[+] | Added | check_oracle_health-1.6.8.tar.gz/contrib ^ |
+(directory) | ||
[+] | Added | check_oracle_health-1.6.8.tar.gz/contrib/CheckOracleHealthExt1.pm ^ |
@@ -0,0 +1,68 @@ +package MyQueue; + +our @ISA = qw(DBD::Oracle::Server); + +sub init { + my $self = shift; + my %params = @_; + $self->{running} = 0; + $self->{waiting} = 0; + $self->{held} = 20; + $self->{cancelled} = 0; + $self->{length} = 100; + if ($params{mode} =~ /my::queue::status/) { + ($self->{running}, $self->{waiting}, $self->{held}, $self->{cancelled}) = + $self->{handle}->fetchrow_array(q{ + SELECT COUNT(*) FROM queues WHERE + status IN ('running', 'waiting', 'held', 'cancelled') + GROUP BY status + }); + } elsif ($params{mode} =~ /my::queue::length/) { + $self->{length} = $self->{handle}->fetchrow_array(q{ + SELECT COUNT(*) FROM queues + }); + } elsif ($params{mode} =~ /my::queue::througput/) { + $self->{processed_items} = $self->{handle}->fetchrow_array(q{ + SELECT processed FROM queue_status + }); + $self->valdiff(\%params, qw(processed_items)); + # this automatically creates + # $self->{delta_timestamp} + # the time in seconds since the last run of check_oracle_health + # $self->{delta_processed_items} + # the difference between processed_items now and + # processed_items when check_oracle_health was run last time + $self->{throughput} = $self->{delta_processed_items} / $self->{delta_timestamp}; + } else { + } +} + +sub nagios { + my $self = shift; + my %params = @_; + if ($params{mode} =~ /my::queue::status/) { + if ($self->{held} > 10 || $self->{cancelled} > 10) { + $self->add_nagios_critical("more than 10 queues are held or cancelled"); + } elsif ($self->{waiting} > 20 && $self->{running} < 3) { + $self->add_nagios_warning("more than 20 queues are waiting and less than 3 queues are running"); + } else { + $self->add_nagios_ok("queues are running normal"); + } + $self->add_perfdata(sprintf "held=%d cancelled=%d waiting=%d running=%d", + $self->{running}, $self->{waiting}, $self->{held}, $self->{cancelled}); + } elsif ($params{mode} =~ /my::queue::length/) { + $self->add_nagios( + $self->check_thresholds($self->{length}, 100, 500), + sprintf "queue length is %d", $self->{length}); + $self->add_perfdata(sprintf "queuelen=%d;%d;%d", + $self->{length}, $self->{warningrange}, $self->{criticalrange}); + } elsif ($params{mode} =~ /my::queue::througput/) { + $self->add_nagios( + $self->check_thresholds($self->{throughput}, "50:", "10:"), + sprintf "queue throughput is %d", $self->{throughput}); + $self->add_perfdata(sprintf "throughput=%.2f;%d;%d", + $self->{throughput}, $self->{warningrange}, $self->{criticalrange}); + } else { + $self->add_nagios_unknown("unknown mode"); + } +} | ||
[+] | Added | check_oracle_health-1.6.8.tar.gz/contrib/README.my-extensions ^ |
@@ -0,0 +1,139 @@ +# you will find instructions how to write extensions here + +Self-written code is addressed by using a mode which starts with my- +--mode=my-thing-does ? + +check_oracle_health will then look for a package named MyThing. + +So you first have to write a Module which describes MyThing. Such a thing iinherits from DBD::Oracle::Server and needs two methods: init and nagios. + +Start with a file called CheckOracleHealthExt1.pm and skeleton code: + +################################################### +package MyThing; + +our @ISA = qw(DBD::Oracle::Server); + +sub init { + my $self = shift; + my %params = @_; +} + +sub nagios { + my $self = shift; + my %params = @_; +} +################################################### + +When you call check_oracle_health with --mode=my-thing-does, it will +- create a DBD::Oracle::Server object + $obj = DBD::Oracle::Server->new() +- connect to the database + $obj->connect() +- re-bless the object + bless $obj, "MyThing" +- call $obj->init() +- if that was ok, call $obj->nagios() + + +So you need to write code which +- initializes the parameters you want to check +- calculates the nagios result from these parameters + +For your convenience there are some predefined methods and variables: + +Variable $self + $self is a hash-based object of type My::Thing + You can pass metrics from the init() method to the nagios() method by + adding attributes to the hash. + One important predefined attribute is $self->{handle} which points to + a database Connection object. You surely will use this. + +Variable %params + $params{mode} contains the string you passed to the + --mode command line parameter, only with the "-" replaced by "::". + In the above example it will be "my::thing::does". + Because you can have only one init() method for your MyThing object but + more than one related modes (my-thing-does, my-thing-length, my-thing-rate) + you use $params{mode} for branching in your code. (see the example file) + +Method add_nagios + $self->add_nagios(1, "i warn you"); + This method can be called several times. The messages will be concatenated. + The first parameter is one of 0..3 and sets the nagios level. The worst level + among several calls to add_nagios will determine the plugin's exit code. + +Method add_nagios_[ok|warning|critical|unknown] + $self->add_nagios_critical("i warned you!!! now it's too late"); + $self->add_nagios_ok("everything is ok. i am the exit message"); + These methods are wrappers for add_nagios which make your code more readable. + +Method add_perfdata + $self->add_perfdata("metric1=0 metric2=100"); + $self->add_perfdata("metric3=0); + $self->add_perfdata(sprintf "metric_xy=%d", $self->{xy}); + You can call add_perfdata as often as you like. + The strings will be concatenated. + +Method valdiff + $self->valdiff(\%params, qw(metric1 metric2)); + Use this if you want to know how a metric has changed since the last run + of check_oracle_health. + Provided you have attributes metric1 and metric2 this method will create + new attributes for your $self object. + $self->{delta_metric1} which is the difference between the value of + $self->{metric1} during the current run and $self->{metric1} during the + last run. + $self->{delta_timestamp} which is the number of seconds which passed + since the last run of check_oracle_health. + If you have ever-growing values, you can simply calculate the rate: + $self->{metric1_per_second} = $self->{delta_metric1} / $self->{delta_timestamp} + The valdiff method will automatically save the current value to a state file + and read the past value from this file. + If you used the --name parameter which appears as $params{name} in your code + then you probably need to separate the saved values from each other. Otherwise + name1 would read the same saved value as name2. They would overwrite the + saved values. Use $params{differentiator} to use different state files. + $params{differenciator} = lc $self->{name}; + $self->valdiff(\%params, qw(gets misses)); + +Method fetchrow_array + my($column1, $column2) = $self->{handle}->fetchrow_array(q{ + SELECT col1, col2 FROM table1 where col1 = 'val1' + }); + $self->{connected_users} = $self->{handle}->fetchrow_array(q{ + SELECT COUNT(*) FROM v$session WHERE type = 'USER' + }); + This method is used like the Perl DBI method fetchrow_array. + + +Method fetchall_array + my @results = $self->{handle}->fetchall_array(q{ + SELECT col1, col2, col3 FROM table1 + }); + foreach (@results) { + my($column1, $column2, $column3) = @{$_}; + ... + } + This method is used like the Perl DBI method fetchall_array. + + + + +Now you have written your first extension to check_oracle_health. Maybe you +just modified the example file contrib/CheckOracleHealthExt1.pm +There are two methods how to import your own code into check_oracle_health: + +- the static method +with ./configure --with-mymodules-dir=<dir> parameter you build a plugin which +contains both my code and your code in a single file. When you call "make" +every file in <dir> which matches CheckOracleHealthExt*.pm is appended +to the final plugin check_oracle_health. + +- the dynamic method +with ./configure --with-mymodules-dyn-dir=<dir> you build a plugin which will +search at runtime the <dir> for files matching CheckOracleHealthExt*.pm and +import them. This way you can have different extensions on different hosts. +You also can modify your extension without having to rebuild the plugin. +On the other hand you have to distribute your extensions along with the plugin. + | ||
[+] | Added | check_oracle_health-1.6.8.tar.gz/contrib/check_oracle_health.php ^ |
@@ -0,0 +1,148 @@ +<?php +# +# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org) +# $Id: check_oracle_health_connection-time.php 523 2008-09-26 17:10:20Z pitchfork $ +# + +foreach ($DS as $i) { + if(preg_match('/^connection_time/', $NAME[$i])) { + $ds_name[1] = "Connection Time"; + $opt[1] = "--vertical-label \"Connection Time\" --title \"Connection Time $hostname / $servicedesc\" "; + $def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ; + $def[1] .= "AREA:var1#F2F2F2:\"\" " ; + $def[1] .= "LINE1:var1#F30000:\"Connection Time\" " ; + $def[1] .= "GPRINT:var1:LAST:\"%3.2lf LAST \" "; + $def[1] .= "GPRINT:var1:MAX:\"%3.2lf MAX \" "; + $def[1] .= "GPRINT:var1:AVERAGE:\"%3.2lf AVERAGE \" "; + } + if(preg_match('/^tbs_.*_usage_pct/', $NAME[$i])) { + # if exists array tbss && > 0 -> next + if(isset($tbss)) continue; + # hash bauen mit tablespace als key + $tbss = array(); + $dsnr = array(); + $units = array(); + foreach ($DS as $t) { + if(preg_match('/^tbs_(.*)_usage_pct/', $NAME[$t], $match)) { + $tbss[] = $match[1]; + } + $dsnr[] = $DS[$t]; + $units[] = $UNIT[$t]; + $warn[] = $WARN[$t]; + $crit[] = $CRIT[$t]; + } + foreach ($tbss as $key => $tbs) { + $ds_usage_pct = $dsnr[$key * 3]; + $ds_used = $dsnr[$key * 3 + 1]; + $ds_alloc = $dsnr[$key * 3 + 2]; + $unit_usage_pct = $units[$key * 3]; + $unit_used = $units[$key * 3 + 1]; + $unit_alloc = $units[$key * 3 + 2]; + #$warn_usage_pct = $warn[$key * 3]; + #$warn_used = $warn[$key * 3 + 1]; + #$warn_alloc = $warn[$key * 3 + 2]; + #$crit_usage_pct = $crit[$key * 3]; + #$crit_used = $crit[$key * 3 + 1]; + #$crit_alloc = $crit[$key * 3 + 2]; + $graph1 = $key * 2 + 1; + $graph2 = $key * 2 + 2; + $opt[$graph1] = "--vertical-label \"TBS usage %\" -u102 -l0 --title \"Tablespace $tbs usage $servicedesc\" "; + $ds_name[$graph1] = "TBS usage %"; + $def[$graph1] = "DEF:var1=$rrdfile:".$ds_usage_pct.":AVERAGE " ; + $def[$graph1] .= "AREA:var1#F2F2F2:\"\" " ; + $def[$graph1] .= "LINE1:var1#FF6600:\"used %\" " ; + $def[$graph1] .= "GPRINT:var1:LAST:\"%3.2lf %% LAST \" "; + $def[$graph1] .= "GPRINT:var1:MAX:\"%3.2lf %% MAX \" "; + $def[$graph1] .= "GPRINT:var1:AVERAGE:\"%3.2lf %% AVERAGE \" "; + if ($warn_usage_pct != "") { + $def[$graph1] .= "HRULE:$warn_usage_pct#FFFF00 "; + } + if ($crit_usage_pct != "") { + $def[$graph1] .= "HRULE:$crit_usage_pct#FF0000 "; + } + $opt[$graph2] = " -X 0 --vertical-label \"TBS usage $unit_used\" --title \"Tablespace $tbs usage $servicedesc\" "; + $ds_name[$graph2] = "TBS usage ".$unit_used; + $def[$graph2] = "DEF:var1=$rrdfile:$ds_used:AVERAGE " ; + $def[$graph2] .= "DEF:var2=$rrdfile:$ds_alloc:AVERAGE " ; + $def[$graph2] .= "AREA:var2#F2F2F2:\"\" " ; + $def[$graph2] .= "AREA:var1#C3C3C3:\"\" " ; + $def[$graph2] .= "LINE1:var2#F30000:\"alloc ".$unit_alloc."\" " ; + $def[$graph2] .= "GPRINT:var2:LAST:\"%6.2lf ".$unit_alloc." LAST \" "; + $def[$graph2] .= "GPRINT:var2:MAX:\"%6.2lf ".$unit_alloc." MAX \" "; + $def[$graph2] .= "GPRINT:var2:AVERAGE:\"%6.2lf ".$unit_alloc." AVERAGE \\n\" "; + $def[$graph2] .= "LINE1:var1#FF6600:\"used ".$unit_used."\" " ; + $def[$graph2] .= "GPRINT:var1:LAST:\"%6.2lf ".$unit_used." LAST \" "; + $def[$graph2] .= "GPRINT:var1:MAX:\"%6.2lf ".$unit_used." MAX \" "; + $def[$graph2] .= "GPRINT:var1:AVERAGE:\"%6.2lf ".$unit_used." AVERAGE \\n\" "; + } + } +} + + +# <?php +# # +# # Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org) +# # Default Template used if no other template is found. +# # Don`t delete this file ! +# # $Id: default.php 367 2008-01-23 18:10:31Z pitchfork $ +# # +# # +# # Define some colors .. +# # +# define("_WARNRULE", '#FFFF00'); +# define("_CRITRULE", '#FF0000'); +# define("_AREA", '#EACC00'); +# define("_LINE", '#000000'); +# # +# # Inital Logic ... +# # +# +# foreach ($DS as $i) { +# +# $warning = ""; +# $minimum = ""; +# $critical = ""; +# $warning = ""; +# $vlabel = ""; +# +# if ($WARN[$i] != "") { +# $warning = $WARN[$i]; +# } +# if ($CRIT[$i] != "") { +# $critical = $CRIT[$i]; +# } +# if ($MIN[$i] != "") { +# $lower = " --lower=" . $MIN[$i]; +# $minimum = $MIN[$i]; +# } +# if ($CRIT[$i] != "") { +# $upper = " --upper=" . $MAX[$i]; +# $maximum = $MAX[$i]; +# } +# if ($UNIT[$i] == "%%") { +# $vlabel = "%"; +# } +# else { +# $vlabel = $UNIT[$i]; +# } +# +# $opt[$i] = '--vertical-label "' . $vlabel . '" --title "' . $hostname . ' / ' . $servicedesc . '"' . $lower; +# +# $def[$i] = "DEF:var1=$rrdfile:$DS[$i]:AVERAGE "; +# $def[$i] .= "AREA:var1" . _AREA . ":\"$NAME[$i] \" "; +# $def[$i] .= "LINE1:var1" . _LINE . ":\"\" "; +# $def[$i] .= "GPRINT:var1:LAST:\"%3.4lf %s$UNIT[$i] LAST \" "; +# $def[$i] .= "GPRINT:var1:MAX:\"%3.4lf %s$UNIT[$i] MAX \" "; +# $def[$i] .= "GPRINT:var1:AVERAGE:\"%3.4lf %s$UNIT[$i] AVERAGE \\n\" "; +# if ($warning != "") { +# $def[$i] .= "HRULE:" . $warning . _WARNRULE . ':"Warning on ' . $warning . '\n" '; +# } +# if ($critical != "") { +# $def[$i] .= "HRULE:" . $critical . _CRITRULE . ':"Critical on ' . $critical . '\n" '; +# } +# $def[$i] .= 'COMMENT:"Default Template\r" '; +# $def[$i] .= 'COMMENT:"Check Command ' . $TEMPLATE[$i] . '\r" '; +# } +# ?> + +?> | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Makefile.am ^ |
@@ -5,6 +5,7 @@ VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t libexec_SCRIPTS=check_oracle_health +MY_MODULES= EXTRA_MODULES=\ Nagios/DBD/Oracle/Server/Instance/SGA/DataBuffer.pm \ Nagios/DBD/Oracle/Server/Instance/SGA/SharedPool/DictionaryCache.pm \ @@ -19,11 +20,13 @@ Nagios/DBD/Oracle/Server/Instance/Enqueue.pm \ Nagios/DBD/Oracle/Server/Instance/Sysstat.pm \ Nagios/DBD/Oracle/Server/Instance.pm \ + Nagios/DBD/Oracle/Server/Database/FlashRecoveryArea.pm \ Nagios/DBD/Oracle/Server/Database/Tablespace/Datafile.pm \ Nagios/DBD/Oracle/Server/Database/Tablespace/Segment.pm \ Nagios/DBD/Oracle/Server/Database/Tablespace.pm \ Nagios/DBD/Oracle/Server/Database.pm \ - Nagios/DBD/Oracle/Server.pm + Nagios/DBD/Oracle/Server.pm \ + Nagios/Extraopts.pm EXTRA_DIST=check_oracle_health.pl $(EXTRA_MODULES) CLEANFILES=$(libexec_SCRIPTS) @@ -44,12 +47,20 @@ $(libexec_SCRIPTS) : $(EXTRA_DIST) $(ECHO) "#! #PERL# -w" | $(AWK) -f ./subst > $@ - $(ECHO) "# nagios: -epn" >> $@ +#since 1.5.1 $(ECHO) "# nagios: -epn" >> $@ $(ECHO) >> $@ $(ECHO) "my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );" >> $@ $(ECHO) "my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );" >> $@ for m in ${EXTRA_MODULES}; do \ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "my %ERROR" >> $@; \ done + if [ -d "${MYMODULES_DIR}" ]; then \ + for m in ${MYMODULES_DIR}/CheckOracleHealthExt*.pm; do \ + if [ -f $$m ]; then \ + $(ECHO) found $$m; \ + $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "my %ERROR" >> $@; \ + fi \ + done \ + fi $(CAT) check_oracle_health.pl | $(GREP) -v "^use Nagios" | $(GREP) -v "^my %ERROR" | $(AWK) -f ./subst >> $@ chmod +x $@ | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Makefile.in ^ |
@@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,9 +14,12 @@ @SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -48,6 +51,7 @@ DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) VPATH = $(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t +INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ @@ -63,7 +67,6 @@ ECHO_T = @ECHO_T@ GREP = @GREP@ GZIP = @GZIP@ -INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_OPTS = @INSTALL_OPTS@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -73,7 +76,8 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ +MYMODULES_DIR = @MYMODULES_DIR@ +MYMODULES_DYN_DIR = @MYMODULES_DYN_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -92,10 +96,7 @@ SUPPORT = @SUPPORT@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ +ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -105,43 +106,33 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ -builddir = @builddir@ datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ -htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ -localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ with_nagios_group = @with_nagios_group@ with_nagios_user = @with_nagios_user@ SUFFIXES = .pl .pm .sh libexec_SCRIPTS = check_oracle_health +MY_MODULES = EXTRA_MODULES = \ Nagios/DBD/Oracle/Server/Instance/SGA/DataBuffer.pm \ Nagios/DBD/Oracle/Server/Instance/SGA/SharedPool/DictionaryCache.pm \ @@ -156,11 +147,13 @@ Nagios/DBD/Oracle/Server/Instance/Enqueue.pm \ Nagios/DBD/Oracle/Server/Instance/Sysstat.pm \ Nagios/DBD/Oracle/Server/Instance.pm \ + Nagios/DBD/Oracle/Server/Database/FlashRecoveryArea.pm \ Nagios/DBD/Oracle/Server/Database/Tablespace/Datafile.pm \ Nagios/DBD/Oracle/Server/Database/Tablespace/Segment.pm \ Nagios/DBD/Oracle/Server/Database/Tablespace.pm \ Nagios/DBD/Oracle/Server/Database.pm \ - Nagios/DBD/Oracle/Server.pm + Nagios/DBD/Oracle/Server.pm \ + Nagios/Extraopts.pm EXTRA_DIST = check_oracle_health.pl $(EXTRA_MODULES) CLEANFILES = $(libexec_SCRIPTS) @@ -202,7 +195,7 @@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libexecSCRIPTS: $(libexec_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" + test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)" @list='$(libexec_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ @@ -219,6 +212,7 @@ echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(libexecdir)/$$f"; \ done +uninstall-info-am: tags: TAGS TAGS: @@ -227,21 +221,23 @@ distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ + $(mkdir_p) $(distdir)/Nagios $(distdir)/Nagios/DBD/Oracle $(distdir)/Nagios/DBD/Oracle/Server $(distdir)/Nagios/DBD/Oracle/Server/Database $(distdir)/Nagios/DBD/Oracle/Server/Database/Tablespace $(distdir)/Nagios/DBD/Oracle/Server/Instance $(distdir)/Nagios/DBD/Oracle/Server/Instance/SGA $(distdir)/Nagios/DBD/Oracle/Server/Instance/SGA/SharedPool + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -257,7 +253,7 @@ all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(libexecdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -304,20 +300,12 @@ install-data-am: -install-dvi: install-dvi-am - install-exec-am: install-libexecSCRIPTS -install-html: install-html-am - install-info: install-info-am install-man: -install-pdf: install-pdf-am - -install-ps: install-ps-am - installcheck-am: maintainer-clean: maintainer-clean-am @@ -336,20 +324,16 @@ ps-am: -uninstall-am: uninstall-libexecSCRIPTS - -.MAKE: install-am install-strip +uninstall-am: uninstall-info-am uninstall-libexecSCRIPTS .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libexecSCRIPTS install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am \ + install-libexecSCRIPTS install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am uninstall uninstall-am \ + pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ uninstall-libexecSCRIPTS @@ -367,13 +351,21 @@ $(libexec_SCRIPTS) : $(EXTRA_DIST) $(ECHO) "#! #PERL# -w" | $(AWK) -f ./subst > $@ - $(ECHO) "# nagios: -epn" >> $@ +#since 1.5.1 $(ECHO) "# nagios: -epn" >> $@ $(ECHO) >> $@ $(ECHO) "my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );" >> $@ $(ECHO) "my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );" >> $@ for m in ${EXTRA_MODULES}; do \ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "my %ERROR" >> $@; \ done + if [ -d "${MYMODULES_DIR}" ]; then \ + for m in ${MYMODULES_DIR}/CheckOracleHealthExt*.pm; do \ + if [ -f $$m ]; then \ + $(ECHO) found $$m; \ + $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "my %ERROR" >> $@; \ + fi \ + done \ + fi $(CAT) check_oracle_health.pl | $(GREP) -v "^use Nagios" | $(GREP) -v "^my %ERROR" | $(AWK) -f ./subst >> $@ chmod +x $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/DBD/Oracle/Server.pm ^ |
@@ -4,6 +4,7 @@ use Time::HiRes; use IO::File; use File::Copy 'cp'; +use Sys::Hostname; use Data::Dumper; my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); @@ -12,7 +13,8 @@ { our $verbose = 0; our $scream = 0; # scream if something is not implemented - our $access = "tns"; # how do we access the database. + our $access = "dbi"; # how do we access the database. + our $my_modules_dyn_dir = ""; # where we look for self-written extensions my @servers = (); my $initerrors = undef; @@ -35,13 +37,16 @@ my $class = shift; my %params = @_; my $self = { - access => $params{method} || "tns", + access => $params{method} || "dbi", connect => $params{connect}, - user => $params{user}, + username => $params{username}, password => $params{password}, timeout => $params{timeout}, warningrange => $params{warningrange}, criticalrange => $params{criticalrange}, + verbose => $params{verbose}, + ident => $params{ident}, + report => $params{report}, version => 'unknown', instance => undef, database => undef, @@ -50,9 +55,43 @@ bless $self, $class; $self->init_nagios(); if ($self->dbconnect(%params)) { - $self->{version} = $self->{handle}->{version}; - $self->{os} = $self->{handle}->{os}; - $self->{dbuser} = $self->{handle}->{dbuser}; + $self->{version} = $self->{handle}->fetchrow_array( + q{ SELECT version FROM v$instance }); + if (! $self->{version}) { + # This is left over from a test with oracle 7. + # Just a reminder that it's basically possible to run this plugin + # against such a dinosaur. At least tablespace-usage works. + # The rest of the modes probably won't work. At least i didn't try it. + # Don't even ask me to have a look at it. You'll have to pay for it. + # And believe me, upgrading to a recent version of Oracle will be + # much more cheaper. + $self->{version} = $self->{handle}->fetchrow_array( + q{ SELECT version FROM product_component_version + WHERE product LIKE '%Server%' }); + $self->{os} = 'Unix'; + $self->{dbuser} = $self->{username}; + $self->{thread} = 1; + $self->{parallel} = 'no'; + } else { + ($self->{os}, $self->{dbuser}, $self->{thread}, $self->{parallel}, $self->{instance_name}, $self->{database_name}) = $self->{handle}->fetchrow_array( + q{ select dbms_utility.port_string,sys_context('userenv', 'session_user'),i.thread#,i.parallel, i.instance_name, d.name FROM dual, v$instance i, v$database d }); + #$self->{os} = $self->{handle}->fetchrow_array( + # q{ SELECT dbms_utility.port_string FROM dual }); + #$self->{dbuser} = $self->{handle}->fetchrow_array( + # q{ SELECT sys_context('userenv', 'session_user') FROM dual }); + #$self->{thread} = $self->{handle}->fetchrow_array( + # q{ SELECT thread# FROM v$instance }); + #$self->{parallel} = $self->{handle}->fetchrow_array( + # q{ SELECT parallel FROM v$instance }); + if ($self->{ident}) { + #$self->{instance_name} = $self->{handle}->fetchrow_array( + # q{ SELECT instance_name FROM v$instance }); + #$self->{database_name} = $self->{handle}->fetchrow_array( + # q{ SELECT name FROM v$database }); + $self->{identstring} = sprintf "(host: %s inst: %s, db: %s) ", + hostname(), $self->{instance_name}, $self->{database_name}; + } + } DBD::Oracle::Server::add_server($self); $self->init(%params); } @@ -63,17 +102,87 @@ my $self = shift; my %params = @_; $params{handle} = $self->{handle}; + $self->set_global_db_thresholds(\%params); if ($params{mode} =~ /^server::instance/) { $self->{instance} = DBD::Oracle::Server::Instance->new(%params); } elsif ($params{mode} =~ /^server::database/) { $self->{database} = DBD::Oracle::Server::Database->new(%params); } elsif ($params{mode} =~ /^server::sql/) { - $self->{genericsql} = $self->{handle}->fetchrow_array($params{selectname}); - $self->add_nagios_unknown(sprintf "got no valid response for %s", - $params{selectname}) unless - (defined $self->{genericsql} && $self->{genericsql} =~ /^\s*\d+\.{0,1}\d*\s*$/); + $self->set_local_db_thresholds(%params); + if ($params{regexp}) { + # sql output is treated as text + if ($params{name2} eq $params{name}) { + $self->add_nagios_unknown(sprintf "where's the regexp????"); + } else { + $self->{genericsql} = + $self->{handle}->fetchrow_array($params{selectname}); + if (! defined $self->{genericsql}) { + $self->add_nagios_unknown(sprintf "got no valid response for %s", + $params{selectname}); + } + } + } else { + # sql output must be a number (or array of numbers) + @{$self->{genericsql}} = + $self->{handle}->fetchrow_array($params{selectname}); + if (! (defined $self->{genericsql} && + (scalar(grep { /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)$/ } @{$self->{genericsql}})) == + scalar(@{$self->{genericsql}}))) { + $self->add_nagios_unknown(sprintf "got no valid response for %s", + $params{selectname}); + } else { + # name2 in array + # units in array + } + } } elsif ($params{mode} =~ /^server::connectiontime/) { $self->{connection_time} = $self->{tac} - $self->{tic}; + } elsif ($params{mode} =~ /^my::([^:.]+)/) { + my $class = $1; + my $loaderror = undef; + substr($class, 0, 1) = uc substr($class, 0, 1); + foreach my $libpath (split(":", $DBD::Oracle::Server::my_modules_dyn_dir)) { + foreach my $extmod (glob $libpath."/CheckOracleHealth*.pm") { + eval { + $self->trace(sprintf "loading module %s", $extmod); + require $extmod; + }; + if ($@) { + $loaderror = $extmod; + $self->trace(sprintf "failed loading module %s: %s", $extmod, $@); + } + } + } + my $obj = { + handle => $params{handle}, + warningrange => $params{warningrange}, + criticalrange => $params{criticalrange}, + }; + bless $obj, "My$class"; + $self->{my} = $obj; + if ($self->{my}->isa("DBD::Oracle::Server")) { + my $dos_init = $self->can("init"); + my $dos_nagios = $self->can("nagios"); + my $my_init = $self->{my}->can("init"); + my $my_nagios = $self->{my}->can("nagios"); + if ($my_init == $dos_init) { + $self->add_nagios_unknown( + sprintf "Class %s needs an init() method", ref($self->{my})); + } elsif ($my_nagios == $dos_nagios) { + $self->add_nagios_unknown( + sprintf "Class %s needs a nagios() method", ref($self->{my})); + } else { + $self->{my}->init_nagios(%params); + $self->{my}->init(%params); + } + } else { + $self->add_nagios_unknown( + sprintf "Class %s is not a subclass of DBD::Oracle::Server%s", + ref($self->{my}), + $loaderror ? sprintf " (syntax error in %s?)", $loaderror : "" ); + } + } else { + printf "broken mode %s\n", $params{mode}; } } @@ -97,20 +206,63 @@ $self->add_nagios( $self->check_thresholds($self->{connection_time}, 1, 5), sprintf "%.2f seconds to connect as %s", - $self->{connection_time}, $self->{dbuser}); + $self->{connection_time}, $self->{dbuser}||$self->{username}); $self->add_perfdata(sprintf "connection_time=%.4f;%d;%d", $self->{connection_time}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /^server::sql/) { - $self->add_nagios( - $self->check_thresholds($self->{genericsql}, 1, 5), - sprintf "%s: %s", - $params{name2} ? lc $params{name2} : lc $params{selectname}, - $self->{genericsql}); - $self->add_perfdata(sprintf "\'%s\'=%s;%s;%s", - $params{name2} ? lc $params{name2} : lc $params{selectname}, - $self->{genericsql}, - $self->{warningrange}, $self->{criticalrange}); + if ($params{regexp}) { + if (substr($params{name2}, 0, 1) eq '!') { + $params{name2} =~ s/^!//; + if ($self->{genericsql} !~ /$params{name2}/) { + $self->add_nagios_ok( + sprintf "output %s does not match pattern %s", + $self->{genericsql}, $params{name2}); + } else { + $self->add_nagios_critical( + sprintf "output %s matches pattern %s", + $self->{genericsql}, $params{name2}); + } + } else { + if ($self->{genericsql} =~ /$params{name2}/) { + $self->add_nagios_ok( + sprintf "output %s matches pattern %s", + $self->{genericsql}, $params{name2}); + } else { + $self->add_nagios_critical( + sprintf "output %s does not match pattern %s", + $self->{genericsql}, $params{name2}); + } + } + } else { + $self->add_nagios( + # the first item in the list will trigger the threshold values + $self->check_thresholds($self->{genericsql}[0], 1, 5), + sprintf "%s: %s%s", + $params{name2} ? lc $params{name2} : lc $params{selectname}, + # float as float, integers as integers + join(" ", map { + (sprintf("%d", $_) eq $_) ? $_ : sprintf("%f", $_) + } @{$self->{genericsql}}), + $params{units} ? $params{units} : ""); + my $i = 0; + # workaround... getting the column names from the database would be nicer + my @names2_arr = split(/\s+/, $params{name2}); + foreach my $t (@{$self->{genericsql}}) { + $self->add_perfdata(sprintf "\'%s\'=%s%s;%s;%s", + $names2_arr[$i] ? lc $names2_arr[$i] : lc $params{selectname}, + # float as float, integers as integers + (sprintf("%d", $t) eq $t) ? $t : sprintf("%f", $t), + $params{units} ? $params{units} : "", + ($i == 0) ? $self->{warningrange} : "", + ($i == 0) ? $self->{criticalrange} : "" + ); + $i++; + } + } + } elsif ($params{mode} =~ /^my::([^:.]+)/) { + $self->{my}->nagios(%params); + $self->merge_nagios($self->{my}); } } } @@ -152,9 +304,9 @@ my $defaultwarningrange = shift; my $defaultcriticalrange = shift; my $level = $ERRORS{OK}; - $self->{warningrange} = $self->{warningrange} ? + $self->{warningrange} = defined $self->{warningrange} ? $self->{warningrange} : $defaultwarningrange; - $self->{criticalrange} = $self->{criticalrange} ? + $self->{criticalrange} = defined $self->{criticalrange} ? $self->{criticalrange} : $defaultcriticalrange; if ($self->{warningrange} !~ /:/ && $self->{criticalrange} !~ /:/) { # warning = 10, critical = 20, warn if > 10, crit if > 20 @@ -233,31 +385,130 @@ sub calculate_result { my $self = shift; + my $multiline = 0; + map { + $self->{nagios_level} = $ERRORS{$_} if + (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}})); + } ("OK", "UNKNOWN", "WARNING", "CRITICAL"); if ($ENV{NRPE_MULTILINESUPPORT} && length join(" ", @{$self->{nagios}->{perfdata}}) > 200) { - foreach my $level ("CRITICAL", "WARNING", "UNKNOWN", "OK") { - # first the bad news - if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$level}}})) { - $self->{nagios_message} .= - "\n".join("\n", @{$self->{nagios}->{messages}->{$ERRORS{$level}}}); + $multiline = 1; + } + my $all_messages = join(($multiline ? "\n" : ", "), map { + join(($multiline ? "\n" : ", "), @{$self->{nagios}->{messages}->{$ERRORS{$_}}}) + } grep { + scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}}) + } ("CRITICAL", "WARNING", "UNKNOWN", "OK")); + my $bad_messages = join(($multiline ? "\n" : ", "), map { + join(($multiline ? "\n" : ", "), @{$self->{nagios}->{messages}->{$ERRORS{$_}}}) + } grep { + scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}}) + } ("CRITICAL", "WARNING", "UNKNOWN")); + my $all_messages_short = $bad_messages ? $bad_messages : 'no problems'; + my $all_messages_html = "<table style=\"border-collapse: collapse;\">". + join("", map { + my $level = $_; + join("", map { + sprintf "<tr valign=\"top\"><td class=\"service%s\">%s</td></tr>", + $level, $_; + } @{$self->{nagios}->{messages}->{$ERRORS{$_}}}); + } grep { + scalar(@{$self->{nagios}->{messages}->{$ERRORS{$_}}}) + } ("CRITICAL", "WARNING", "UNKNOWN", "OK")). + "</table>"; + if (exists $self->{identstring}) { + $self->{nagios_message} .= $self->{identstring}; + } + if ($self->{report} eq "long") { + $self->{nagios_message} .= $all_messages; + } elsif ($self->{report} eq "short") { + $self->{nagios_message} .= $all_messages_short; + } elsif ($self->{report} eq "html") { + $self->{nagios_message} .= $all_messages_short."\n".$all_messages_html; + } + $self->{perfdata} = join(" ", @{$self->{nagios}->{perfdata}}); +} + +sub set_global_db_thresholds { + my $self = shift; + my $params = shift; + my $warning = undef; + my $critical = undef; + return unless defined $params->{dbthresholds}; + $params->{name0} = $params->{dbthresholds}; + # :pluginmode :name :warning :critical + # mode empty + # + eval { + if ($self->{handle}->fetchrow_array(q{ + SELECT table_name FROM user_tables + WHERE table_name = 'CHECK_ORACLE_HEALTH_THRESHOLDS' + })) { + my @dbthresholds = $self->{handle}->fetchall_array(q{ + SELECT * FROM check_oracle_health_thresholds + }); + $params->{dbthresholds} = \@dbthresholds; + foreach (@dbthresholds) { + if (($_->[0] eq $params->{cmdlinemode}) && + (! defined $_->[1] || ! $_->[1])) { + ($warning, $critical) = ($_->[2], $_->[3]); + } } } - $self->{nagios_message} =~ s/^\n//g; - $self->{perfdata} = join("\n", @{$self->{nagios}->{perfdata}}); - } else { - foreach my $level ("CRITICAL", "WARNING", "UNKNOWN", "OK") { - # first the bad news - if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$level}}})) { - $self->{nagios_message} .= - join(", ", @{$self->{nagios}->{messages}->{$ERRORS{$level}}}).", "; + }; + if (! $@) { + if ($warning) { + $params->{warningrange} = $warning; + $self->trace("read warningthreshold %s from database", $warning); + } + if ($critical) { + $params->{criticalrange} = $critical; + $self->trace("read criticalthreshold %s from database", $critical); + } + } +} + +sub set_local_db_thresholds { + my $self = shift; + my %params = @_; + my $warning = undef; + my $critical = undef; + # :pluginmode :name :warning :critical + # mode name0 + # mode name2 + # mode name + # + # first: argument of --dbthresholds, it it exists + # second: --name2 + # third: --name + if (ref($params{dbthresholds}) eq 'ARRAY') { + my $marker; + foreach (@{$params{dbthresholds}}) { + if ($_->[0] eq $params{cmdlinemode}) { + if (defined $_->[1] && $params{name0} && $_->[1] eq $params{name0}) { + ($warning, $critical) = ($_->[2], $_->[3]); + $marker = $params{name0}; + last; + } elsif (defined $_->[1] && $params{name2} && $_->[1] eq $params{name2}) { + ($warning, $critical) = ($_->[2], $_->[3]); + $marker = $params{name2}; + last; + } elsif (defined $_->[1] && $params{name} && $_->[1] eq $params{name}) { + ($warning, $critical) = ($_->[2], $_->[3]); + $marker = $params{name}; + last; + } } } - $self->{nagios_message} =~ s/, $//g; - $self->{perfdata} = join(" ", @{$self->{nagios}->{perfdata}}); - } - foreach my $level ("OK", "UNKNOWN", "WARNING", "CRITICAL") { - if (scalar(@{$self->{nagios}->{messages}->{$ERRORS{$level}}})) { - $self->{nagios_level} = $ERRORS{$level}; + if ($warning) { + $self->{warningrange} = $warning; + $self->trace("read warningthreshold %s for %s from database", + $marker, $warning); + } + if ($critical) { + $self->{criticalrange} = $critical; + $self->trace("read criticalthreshold %s for %s from database", + $marker, $critical); } } } @@ -287,6 +538,11 @@ sprintf "connection could not be established within %d seconds", $self->{timeout}); } else { + if ($self->{connect} =~ /^(.*?)\/(.*)@(.*)$/) { + $self->{connect} = sprintf "%s/***@%s", $1, $3; + } elsif ($self->{connect} =~ /^(.*?)@(.*)$/) { + $self->{connect} = sprintf "%s@%s", $1, $2; + } $self->add_nagios($ERRORS{CRITICAL}, sprintf "cannot connect to %s. %s", $self->{connect}, $self->{handle}->{errstr}); @@ -306,6 +562,7 @@ if ($self->{verbose}) { printf("%s: ", scalar localtime); printf($format, @_); + printf "\n"; } if ($self->{trace}) { my $logfh = new IO::File; @@ -329,10 +586,10 @@ $handle2 = ref($self->{handle}->{handle}); } } - $self->trace(sprintf "DESTROY %s with handle %s %s", ref($self), $handle1, $handle2); + #$self->trace(sprintf "DESTROY %s with handle %s %s", ref($self), $handle1, $handle2); if (ref($self) eq "DBD::Oracle::Server") { } - $self->trace(sprintf "DESTROY %s exit with handle %s %s", ref($self), $handle1, $handle2); + #$self->trace(sprintf "DESTROY %s exit with handle %s %s", ref($self), $handle1, $handle2); if (ref($self) eq "DBD::Oracle::Server") { #printf "humpftata\n"; } @@ -344,10 +601,18 @@ my $extension = ""; if ($params{connect} =~ /(\w+)\/(\w+)@(\w+)/) { $params{connect} = $3; + } else { + # just to be sure + $params{connect} =~ s/\//_/g; + } + my $mode = $params{mode}; + if ($^O =~ /MSWin/) { + $mode =~ s/::/_/g; + $params{statefilesdir} = $self->system_vartmpdir(); } mkdir $params{statefilesdir} unless -d $params{statefilesdir}; my $statefile = sprintf "%s/%s_%s", - $params{statefilesdir}, $params{connect}, $params{mode}; + $params{statefilesdir}, $params{connect}, $mode; $extension .= $params{differenciator} ? "_".$params{differenciator} : ""; $extension .= $params{tablespace} ? "_".$params{tablespace} : ""; $extension .= $params{datafile} ? "_".$params{datafile} : ""; @@ -375,9 +640,16 @@ my $extension = ""; if ($params{connect} =~ /(\w+)\/(\w+)@(\w+)/) { $params{connect} = $3; + } else { + $params{connect} =~ s/\//_/g; + } + my $mode = $params{mode}; + if ($^O =~ /MSWin/) { + $mode =~ s/::/_/g; + $params{statefilesdir} = $self->system_vartmpdir(); } my $statefile = sprintf "%s/%s_%s", - $params{statefilesdir}, $params{connect}, $params{mode}; + $params{statefilesdir}, $params{connect}, $mode; $extension .= $params{differenciator} ? "_".$params{differenciator} : ""; $extension .= $params{tablespace} ? "_".$params{tablespace} : ""; $extension .= $params{datafile} ? "_".$params{datafile} : ""; @@ -418,7 +690,13 @@ $empty_events; }; foreach (@keys) { - $self->{'delta_'.$_} = $self->{$_} - $last_values->{$_}; + $last_values->{$_} = 0 if ! exists $last_values->{$_}; + if ($self->{$_} >= $last_values->{$_}) { + $self->{'delta_'.$_} = $self->{$_} - $last_values->{$_}; + } else { + # vermutlich db restart und zaehler alle auf null + $self->{'delta_'.$_} = $self->{$_}; + } $self->debug(sprintf "delta_%s %f", $_, $self->{'delta_'.$_}); } $self->{'delta_timestamp'} = time - $last_values->{timestamp}; @@ -470,6 +748,18 @@ return $newer; } +sub instance_rac { + my $self = shift; + my @instances = DBD::Oracle::Server::return_servers(); + return (lc $instances[0]->{parallel} eq "yes") ? 1 : 0; +} + +sub instance_thread { + my $self = shift; + my @instances = DBD::Oracle::Server::return_servers(); + return $instances[0]->{thread}; +} + sub windows_server { my $self = shift; my @instances = DBD::Oracle::Server::return_servers(); @@ -523,27 +813,29 @@ my $self = { mode => $params{mode}, timeout => $params{timeout}, - access => $params{method} || "tns", + access => $params{method} || "dbi", connect => $params{connect}, - user => $params{user}, + username => $params{username}, password => $params{password}, + verbose => $params{verbose}, tnsadmin => $ENV{TNS_ADMIN}, oraclehome => $ENV{ORACLE_HOME}, handle => undef, }; bless $self, $class; - if ($params{method} eq "tns") { - bless $self, "DBD::Oracle::Server::Connection::Tns"; + if ($params{method} eq "dbi") { + bless $self, "DBD::Oracle::Server::Connection::Dbi"; } elsif ($params{method} eq "sqlplus") { bless $self, "DBD::Oracle::Server::Connection::Sqlplus"; + } elsif ($params{method} eq "sqlrelay") { + bless $self, "DBD::Oracle::Server::Connection::Sqlrelay"; } $self->init(%params); return $self; } - -package DBD::Oracle::Server::Connection::Tns; +package DBD::Oracle::Server::Connection::Dbi; use strict; use Net::Ping; @@ -555,30 +847,36 @@ sub init { my $self = shift; + my %params = @_; my $retval = undef; if ($self->{mode} =~ /^server::tnsping/) { if (! $self->{connect}) { $self->{errstr} = "Please specify a database"; } else { $self->{sid} = $self->{connect}; - $self->{user} = time; - $self->{password} = time; + $self->{username} ||= time; # prefer an existing user + $self->{password} ||= time; } } else { - if (! $self->{connect} || ! $self->{user} || ! $self->{password}) { - if ($self->{connect} && $self->{connect} =~ /(\w+)\/(\w+)@(\w+)/) { + if (! $self->{connect} || ! $self->{username} || ! $self->{password}) { + if ($self->{connect} && $self->{connect} =~ /(\w+)\/(\w+)@([\w\-\.]+)/) { $self->{connect} = $3; - $self->{user} = $1; + $self->{username} = $1; $self->{password} = $2; $self->{sid} = $self->{connect}; - } elsif ($self->{connect} && ! $self->{user} && ! $self->{password}) { + } elsif ($self->{connect} && $self->{connect} =~ /^(sys|sysdba)@([\w\-\.]+)/) { + $self->{connect} = $2; + $self->{username} = $1; + $self->{password} = ''; + $self->{sid} = $self->{connect}; + } elsif ($self->{connect} && ! $self->{username} && ! $self->{password}) { # maybe this is a os authenticated user delete $ENV{TWO_TASK}; $self->{sid} = $self->{connect}; if ($^O ne "hpux") { #hpux && 1.21 only accepts "DBI:Oracle:SID" $self->{connect} = ""; #linux 1.20 only accepts "DBI:Oracle:" + ORACLE_SID } - $self->{user} = '/'; + $self->{username} = '/'; $self->{password} = ""; } else { $self->{errstr} = "Please specify database, username and password"; @@ -602,21 +900,26 @@ my $oldaction = POSIX::SigAction->new(); sigaction(SIGALRM ,$action ,$oldaction ); alarm($self->{timeout} - 1); # 1 second before the global unknown timeout + my $dsn = sprintf "DBI:Oracle:%s", $self->{connect}; + my $connecthash = { RaiseError => 0, AutoCommit => 0, PrintError => 0 }; + if ($self->{username} eq "sys" || $self->{username} eq "sysdba") { + $connecthash = { RaiseError => 0, AutoCommit => 0, PrintError => 0, + #ora_session_mode => DBD::Oracle::ORA_SYSDBA + ora_session_mode => 0x0002 }; + $dsn = sprintf "DBI:Oracle:"; + } if ($self->{handle} = DBI->connect( - sprintf("DBI:Oracle:%s", $self->{connect}), - $self->{user}, + $dsn, + $self->{username}, $self->{password}, - { RaiseError => 0, AutoCommit => 0, PrintError => 0 })) { - $self->{version} = $self->{handle}->selectrow_array( - q{ SELECT version FROM v$instance }); - $self->{os} = $self->{handle}->selectrow_array( - q{ select dbms_utility.port_string from dual }); - # return decimal numbers with . instead of , + $connecthash)) { $self->{handle}->do(q{ ALTER SESSION SET NLS_NUMERIC_CHARACTERS=".," }); - $self->{dbuser} = $self->{handle}->selectrow_array( - q{ select sys_context('userenv', 'session_user') from dual }); $retval = $self; + if ($self->{mode} =~ /^server::tnsping/) { + $self->{handle}->disconnect(); + die "ORA-01017"; # fake a successful connect with wrong password + } } else { $self->{errstr} = DBI::errstr(); } @@ -701,6 +1004,8 @@ my @arguments = @_; my $sth = undef; my @row = (); + $self->trace(sprintf "fetchrow_array: %s", $sql); + $self->trace(sprintf "args: %s", Data::Dumper::Dumper(\@arguments)); eval { $sth = $self->{handle}->prepare($sql); if (scalar(@arguments)) { @@ -713,6 +1018,8 @@ if ($@) { $self->debug(sprintf "bumm %s", $@); } + $self->trace(sprintf "RESULT:\n%s\n", + Data::Dumper::Dumper(\@row)); if (-f "/tmp/check_oracle_health_simulation/".$self->{mode}) { my $simulation = do { local (@ARGV, $/) = "/tmp/check_oracle_health_simulation/".$self->{mode}; <> }; @@ -728,6 +1035,8 @@ my @arguments = @_; my $sth = undef; my $rows = undef; + $self->trace(sprintf "fetchall_array: %s", $sql); + $self->trace(sprintf "args: %s", Data::Dumper::Dumper(\@arguments)); eval { $sth = $self->{handle}->prepare($sql); if (scalar(@arguments)) { @@ -740,13 +1049,14 @@ if ($@) { printf STDERR "bumm %s\n", $@; } + $self->trace(sprintf "RESULT:\n%s\n", + Data::Dumper::Dumper($rows)); if (-f "/tmp/check_oracle_health_simulation/".$self->{mode}) { my $simulation = do { local (@ARGV, $/) = "/tmp/check_oracle_health_simulation/".$self->{mode}; <> }; @{$rows} = map { [ split(/\s+/, $_) ] } split(/\n/, $simulation); } return @{$rows}; - } sub func { @@ -778,6 +1088,7 @@ use strict; use File::Temp qw/tempfile/; +use File::Basename qw/dirname/; our @ISA = qw(DBD::Oracle::Server::Connection); @@ -786,118 +1097,271 @@ sub init { my $self = shift; + my %params = @_; my $retval = undef; + $self->{loginstring} = "traditional"; + my $template = $self->{mode}.'XXXXX'; + if ($^O =~ /MSWin/) { + $template =~ s/::/_/g; + } ($self->{sql_commandfile_handle}, $self->{sql_commandfile}) = - tempfile($self->{mode}."XXXXX", SUFFIX => ".sql", + tempfile($template, SUFFIX => ".sql", DIR => $self->system_tmpdir() ); close $self->{sql_commandfile_handle}; ($self->{sql_resultfile_handle}, $self->{sql_resultfile}) = - tempfile($self->{mode}."XXXXX", SUFFIX => ".out", + tempfile($template, SUFFIX => ".out", DIR => $self->system_tmpdir() ); close $self->{sql_resultfile_handle}; + ($self->{sql_outfile_handle}, $self->{sql_outfile}) = + tempfile($template, SUFFIX => ".out", + DIR => $self->system_tmpdir() ); + close $self->{sql_outfile_handle}; if ($self->{mode} =~ /^server::tnsping/) { if (! $self->{connect}) { $self->{errstr} = "Please specify a database"; } else { $self->{sid} = $self->{connect}; - $self->{user} = time; + $self->{username} ||= time; # prefer an existing user $self->{password} = time; } } else { - if (! $self->{connect} || ! $self->{user} || ! $self->{password}) { - if ($self->{connect} && $self->{connect} =~ /(\w+)\/(\w+)@(\w+)/) { - $self->{connect} = $3; - $self->{user} = $1; - $self->{password} = $2; - $self->{sid} = $self->{connect}; - } elsif ($self->{connect} && ! $self->{user} && ! $self->{password}) { - # maybe this is a os authenticated user + if ($self->{connect} && ! $self->{username} && ! $self->{password} && + $self->{connect} =~ /(\w+)\/(\w+)@([\w\-\._]+)/) { + # --connect nagios/oradbmon@bba + $self->{connect} = $3; + $self->{username} = $1; + $self->{password} = $2; + $self->{sid} = $self->{connect}; + if ($self->{username} eq "sys") { delete $ENV{TWO_TASK}; - $self->{sid} = $self->{connect}; - if ($^O ne "hpux") { #hpux && 1.21 only accepts "DBI:Oracle:SID" - $self->{connect} = ""; #linux 1.20 only accepts "DBI:Oracle:" + ORACLE_SID - } - $self->{user} = '/'; - $self->{password} = ""; + $self->{loginstring} = "sys"; } else { - $self->{errstr} = "Please specify database, username and password"; - return undef; + $self->{loginstring} = "traditional"; } - } else { + } elsif ($self->{connect} && ! $self->{username} && ! $self->{password} && + $self->{connect} =~ /sysdba@([\w\-\._]+)/) { + # --connect sysdba@bba + $self->{connect} = $1; + $self->{username} = "/"; + $self->{sid} = $self->{connect}; + $self->{loginstring} = "sysdba"; + } elsif ($self->{connect} && ! $self->{username} && ! $self->{password} && + $self->{connect} =~ /([\w\-\._]+)/) { + # --connect bba + $self->{connect} = $1; + # maybe this is a os authenticated user + delete $ENV{TWO_TASK}; + $self->{sid} = $self->{connect}; + if ($^O ne "hpux") { #hpux && 1.21 only accepts "DBI:Oracle:SID" + $self->{connect} = ""; #linux 1.20 only accepts "DBI:Oracle:" + ORACLE_SID + } + $self->{username} = '/'; + $self->{password} = ""; + $self->{loginstring} = "extauth"; + } elsif ($self->{username} && + $self->{username} =~ /^\/@([\w\-\._]+)/) { + # --user /@ubba1 + $self->{username} = $1; + $self->{sid} = $self->{connect}; + $self->{loginstring} = "passwordstore"; + } elsif ($self->{connect} && $self->{username} && ! $self->{password} && + $self->{username} eq "sysdba") { + # --connect bba --user sysdba + $self->{connect} = $1; + $self->{username} = "/"; + $self->{sid} = $self->{connect}; + $self->{loginstring} = "sysdba"; + } elsif ($self->{connect} && $self->{username} && $self->{password}) { + # --connect bba --username nagios --password oradbmon $self->{sid} = $self->{connect}; + $self->{loginstring} = "traditional"; + } else { + $self->{errstr} = "Please specify database, username and password"; + return undef; } } if (! exists $self->{errstr}) { eval { $ENV{ORACLE_SID} = $self->{sid}; - $ENV{PATH} = $ENV{ORACLE_HOME}."/bin". - (defined $ENV{PATH} ? - ":".$ENV{PATH} : ""); - $ENV{LD_LIBRARY_PATH} = $ENV{ORACLE_HOME}."/lib". - (defined $ENV{LD_LIBRARY_PATH} ? - ":".$ENV{LD_LIBRARY_PATH} : ""); - my $sqlplus = -x $ENV{ORACLE_HOME}.'/bin/sqlplus' ? - $ENV{ORACLE_HOME}.'/bin/sqlplus' : $ENV{ORACLE_HOME}.'/sqlplus'; - if (! -x $sqlplus) { + if (! exists $ENV{ORACLE_HOME}) { + if ($^O =~ /MSWin/) { + $self->trace("environment variable ORACLE_HOME is not set"); + foreach my $path (split(';', $ENV{PATH})) { + $self->trace(sprintf "try to find sqlplus.exe in %s", $path); + if (-x $path.'/'.'sqlplus.exe') { + if ($path =~ /[\\\/]bin[\\\/]*$/) { + $ENV{ORACLE_HOME} = dirname($path); + } else { + $ENV{ORACLE_HOME} = $path; + } + last; + } + } + } else { + foreach my $path (split(':', $ENV{PATH})) { + if (-x $path.'/sqlplus') { + if ($path =~ /[\/]bin[\/]*$/) { + $ENV{ORACLE_HOME} = dirname($path); + } else { + $ENV{ORACLE_HOME} = $path; + } + last; + } + } + } + if (! exists $ENV{ORACLE_HOME}) { + $ENV{ORACLE_HOME} |= ''; + } else { + $self->trace("set ORACLE_HOME = ".$ENV{ORACLE_HOME}); + } + } else { + if ($^O =~ /MSWin/) { + $ENV{PATH} = $ENV{ORACLE_HOME}.';'.$ENV{ORACLE_HOME}.'/'.'bin'. + (defined $ENV{PATH} ? ";".$ENV{PATH} : ""); + $self->trace("set PATH = ".$ENV{PATH}); + } else { + $ENV{PATH} = $ENV{ORACLE_HOME}."/bin". + (defined $ENV{PATH} ? ":".$ENV{PATH} : ""); + $ENV{LD_LIBRARY_PATH} = $ENV{ORACLE_HOME}."/lib".":".$ENV{ORACLE_HOME}. + (defined $ENV{LD_LIBRARY_PATH} ? ":".$ENV{LD_LIBRARY_PATH} : ""); + } + } + # am 30.9.2008 hat perl das /bin/sqlplus in $ENV{ORACLE_HOME}.'/bin/sqlplus' + # eiskalt evaluiert und + # /u00/app/oracle/product/11.1.0/db_1/u00/app/oracle/product/11.1.0/db_1/bin/sqlplus + # draus gemacht. Leider nicht in Mini-Scripts reproduzierbar, sondern nur hier. + # Das ist der Grund fuer die vielen ' und . + my $sqlplus = undef; + my $tnsping = undef; + $self->trace(sprintf "ORACLE_HOME is now %s", $ENV{ORACLE_HOME}); + my @attempts = (); + if ($^O =~ /MSWin/) { + @attempts = qw(bin/sqlplus.exe sqlplus.exe); + } else { + @attempts = qw(bin/sqlplus sqlplus); + } + foreach my $try (@attempts) { + $self->trace(sprintf "try to find %s/%s", $ENV{ORACLE_HOME}, $try); + if (-x $ENV{ORACLE_HOME}.'/'.$try && -f $ENV{ORACLE_HOME}.'/'.$try) { + $sqlplus = $ENV{ORACLE_HOME}.'/'.$try; + } + } + if (! $sqlplus && -x '/usr/bin/sqlplus') { + # last hope + $sqlplus = '/usr/bin/sqlplus'; + } + if (-x $ENV{ORACLE_HOME}.'/'.'bin'.'/'.'tnsping') { + $tnsping = $ENV{ORACLE_HOME}.'/'.'bin'.'/'.'tnsping'; + } elsif (-x $ENV{ORACLE_HOME}.'/'.'tnsping') { + $tnsping = $ENV{ORACLE_HOME}.'/'.'tnsping'; + } elsif (-x $ENV{ORACLE_HOME}.'/'.'tnsping.exe') { + $tnsping = $ENV{ORACLE_HOME}.'/'.'tnsping.exe'; + } elsif (-x '/usr/bin/tnsping') { + $tnsping = '/usr/bin/tnsping'; + } + if (! $sqlplus) { die "nosqlplus\n"; + } else { + $self->trace(sprintf "found %s", $sqlplus); } if ($self->{mode} =~ /^server::tnsping/) { - $self->{sqlplus} = $self->{user} eq "/" ? - sprintf "%s -S / < /dev/null", - $sqlplus - : - sprintf "%s -S %s/%s@%s < /dev/null", - $sqlplus, - $self->{user}, $self->{password}, $self->{sid}; + if ($self->{loginstring} eq "traditional") { + $self->{sqlplus} = sprintf "%s -S \"%s/%s@%s\" < /dev/null", + $sqlplus, + $self->{username}, $self->{password}, $self->{sid}; + } elsif ($self->{loginstring} eq "extauth") { + $self->{sqlplus} = sprintf "%s -S / < /dev/null", + $sqlplus; + } elsif ($self->{loginstring} eq "passwordstore") { + $self->{sqlplus} = sprintf "%s -S /@%s < /dev/null", + $sqlplus, + $self->{username}; + } elsif ($self->{loginstring} eq "sysdba") { + $self->{sqlplus} = sprintf "%s -S / as sysdba < /dev/null", + $sqlplus; + } elsif ($self->{loginstring} eq "sys") { + $self->{sqlplus} = sprintf "%s -S \"%s/%s@%s\" as sysdba < /dev/null", + $sqlplus, + $self->{username}, $self->{password}, $self->{sid}; + } + if ($^O =~ /MSWin/) { + #$self->{sqlplus} =~ s/ < \/dev\/null//g; + $self->{sqlplus} =~ s/ < \/dev\/null/ < NUL:/g; # works with powershell + } } else { - $self->{sqlplus} = $self->{user} eq "/" ? - sprintf "%s -S / < %s > %s", - $sqlplus, - $self->{sql_commandfile}, $self->{sql_resultfile} - : - sprintf "%s -S %s/%s@%s < %s > %s", - $sqlplus, - $self->{user}, $self->{password}, $self->{sid}, - $self->{sql_commandfile}, $self->{sql_resultfile}; + if ($self->{loginstring} eq "traditional") { + $self->{sqlplus} = sprintf "%s -S \"%s/%s@%s\" < %s > %s", + $sqlplus, + $self->{username}, $self->{password}, $self->{sid}, + $self->{sql_commandfile}, $self->{sql_outfile}; + } elsif ($self->{loginstring} eq "extauth") { + $self->{sqlplus} = sprintf "%s -S / < %s > %s", + $sqlplus, + $self->{sql_commandfile}, $self->{sql_outfile}; + } elsif ($self->{loginstring} eq "passwordstore") { + $self->{sqlplus} = sprintf "%s -S /@%s < %s > %s", + $sqlplus, + $self->{username}, + $self->{sql_commandfile}, $self->{sql_outfile}; + } elsif ($self->{loginstring} eq "sysdba") { + $self->{sqlplus} = sprintf "%s -S / as sysdba < %s > %s", + $sqlplus, + $self->{sql_commandfile}, $self->{sql_outfile}; + } elsif ($self->{loginstring} eq "sys") { + $self->{sqlplus} = sprintf "%s -S \"%s/%s@%s\" as sysdba < %s > %s", + $sqlplus, + $self->{username}, $self->{password}, $self->{sid}, + $self->{sql_commandfile}, $self->{sql_outfile}; + } } use POSIX ':signal_h'; local $SIG{'ALRM'} = sub { - die "alarm\n"; + die "timeout\n"; }; - my $mask = POSIX::SigSet->new( SIGALRM ); - my $action = POSIX::SigAction->new( - sub { die "alarm\n" ; }, $mask); - my $oldaction = POSIX::SigAction->new(); - sigaction(SIGALRM ,$action ,$oldaction ); + if ($^O !~ /MSWin/) { + my $mask = POSIX::SigSet->new( SIGALRM ); + my $action = POSIX::SigAction->new( + sub { die "alarm\n" ; }, $mask); + my $oldaction = POSIX::SigAction->new(); + sigaction(SIGALRM ,$action ,$oldaction ); + } alarm($self->{timeout} - 1); # 1 second before the global unknown timeout if ($self->{mode} =~ /^server::tnsping/) { - my $exit_output = `$self->{sqlplus}`; - if ($?) { - printf STDERR "ping exit bumm \n"; + if ($tnsping) { + my $exit_output = `$tnsping $self->{sid}`; + if ($?) { + # printf STDERR "tnsping exit bumm \n"; + # immer 1 bei misserfolg + } + if ($exit_output =~ /^OK \(\d+/m) { + die "ORA-01017"; # fake a successful connect with wrong password + } elsif ($exit_output =~ /^(TNS\-\d+)/m) { + die $1; + } else { + die "TNS-03505"; + } + } else { + my $exit_output = `$self->{sqlplus}`; + if ($?) { + printf STDERR "ping exit bumm \n"; + } + $exit_output =~ s/\n//g; + $exit_output =~ s/at $0//g; + chomp $exit_output; + die $exit_output; } - $exit_output =~ s/\n//g; - $exit_output =~ s/at $0//g; - chomp $exit_output; - die $exit_output; } else { - $self->{version} = $self->fetchrow_array( - q{ SELECT version FROM v$instance }); - $self->{os} = $self->fetchrow_array( - q{ select dbms_utility.port_string from dual }); - # return decimal numbers with . instead of , - # als prefix for alle cmdfiles - # $self->{handle}->do(q{ - # ALTER SESSION SET NLS_NUMERIC_CHARACTERS=".," }); - $self->{dbuser} = $self->fetchrow_array( - q{ select sys_context('userenv', 'session_user') from dual }); + my $answer = $self->fetchrow_array( + q{ SELECT 42 FROM dual}); + die $self->{errstr} unless defined $answer and $answer == 42; } $retval = $self; }; if ($@) { $self->{errstr} = $@; - $self->{errstr} =~ s/at $0 .*//g; + $self->{errstr} =~ s/at .* line \d+//g; chomp $self->{errstr}; $retval = undef; } @@ -913,6 +1377,10 @@ my @arguments = @_; my $sth = undef; my @row = (); + $sql =~ s/%/%%/g; # sonst mault printf bei "...like '%xy%'" + $self->trace(sprintf "fetchrow_array: %s", $sql); + $sql =~ s/%%/%/g; + $self->trace(sprintf "args: %s", Data::Dumper::Dumper(\@arguments)); foreach (@arguments) { # replace the ? by the parameters if (/^\d+$/) { @@ -924,8 +1392,7 @@ $self->create_commandfile($sql); my $exit_output = `$self->{sqlplus}`; if ($?) { - printf STDERR "fetchrow_array exit bumm \n"; - my $output = do { local (@ARGV, $/) = $self->{sql_resultfile}; <> }; + my $output = do { local (@ARGV, $/) = $self->{sql_outfile}; <> }; my @oerrs = map { /(ORA\-\d+:.*)/ ? $1 : (); } split(/\n/, $output); @@ -940,8 +1407,11 @@ if ($@) { $self->debug(sprintf "bumm %s", $@); } + $self->trace(sprintf "RESULT:\n%s\n", + Data::Dumper::Dumper(\@row)); unlink $self->{sql_commandfile}; unlink $self->{sql_resultfile}; + unlink $self->{sql_outfile}; return $row[0] unless wantarray; return @row; } @@ -952,6 +1422,10 @@ my @arguments = @_; my $sth = undef; my $rows = undef; + $sql =~ s/%/%%/g; # sonst mault printf bei "...like '%xy%'" + $self->trace(sprintf "fetchall_array: %s", $sql); + $sql =~ s/%%/%/g; + $self->trace(sprintf "args: %s", Data::Dumper::Dumper(\@arguments)); foreach (@arguments) { # replace the ? by the parameters if (/^\d+$/) { @@ -978,6 +1452,7 @@ map { s/\s+$//g; $_ } split /\|/ ] } grep { ! /^\d+ rows selected/ } + grep { ! /^\d+ [Zz]eilen ausgew / } grep { ! /^Elapsed: / } grep { ! /^\s*$/ } split(/\n/, $output); $rows = \@rows; @@ -985,8 +1460,11 @@ if ($@) { $self->debug(sprintf "bumm %s", $@); } + $self->trace(sprintf "RESULT:\n%s\n", + Data::Dumper::Dumper($rows)); unlink $self->{sql_commandfile}; unlink $self->{sql_resultfile}; + unlink $self->{sql_outfile}; return @{$rows}; } @@ -1037,6 +1515,7 @@ $self->trace("try to clean up command and result files"); unlink $self->{sql_commandfile} if -f $self->{sql_commandfile}; unlink $self->{sql_resultfile} if -f $self->{sql_resultfile}; + unlink $self->{sql_outfile} if -f $self->{sql_outfile}; } sub create_commandfile { @@ -1048,6 +1527,7 @@ printf CMDCMD "SET LINESIZE 32767\n"; printf CMDCMD "SET COLSEP '|'\n"; printf CMDCMD "SET TAB OFF\n"; + printf CMDCMD "SET FEEDBACK OFF\n"; printf CMDCMD "SET TRIMSPOOL ON\n"; printf CMDCMD "SET NUMFORMAT 9.999999EEEE\n"; printf CMDCMD "SPOOL %s\n", $self->{sql_resultfile}; @@ -1057,6 +1537,190 @@ close CMDCMD; } +package DBD::Oracle::Server::Connection::Sqlrelay; + +use strict; +use Net::Ping; + +our @ISA = qw(DBD::Oracle::Server::Connection); + + +sub init { + my $self = shift; + my %params = @_; + my $retval = undef; + if ($self->{mode} =~ /^server::tnsping/) { + if (! $self->{connect}) { + $self->{errstr} = "Please specify a database"; + } else { + if ($self->{connect} =~ /([\.\w]+):(\d+)/) { + $self->{host} = $1; + $self->{port} = $2; + $self->{socket} = ""; + } elsif ($self->{connect} =~ /([\.\w]+):([\w\/]+)/) { + $self->{host} = $1; + $self->{socket} = $2; + $self->{port} = ""; + } + } + } else { + if (! $self->{connect} || ! $self->{username} || ! $self->{password}) { + if ($self->{connect} && $self->{connect} =~ /(\w+)\/(\w+)@([\.\w]+):(\d+)/) { + $self->{username} = $1; + $self->{password} = $2; + $self->{host} = $3; + $self->{port} = $4; + $self->{socket} = ""; + } elsif ($self->{connect} && $self->{connect} =~ /(\w+)\/(\w+)@([\.\w]+):([\w\/]+)/) { + $self->{username} = $1; + $self->{password} = $2; + $self->{host} = $3; + $self->{socket} = $4; + $self->{port} = ""; + } else { + $self->{errstr} = "Please specify database, username and password"; + return undef; + } + } else { + if ($self->{connect} =~ /([\.\w]+):(\d+)/) { + $self->{host} = $1; + $self->{port} = $2; + $self->{socket} = ""; + } elsif ($self->{connect} =~ /([\.\w]+):([\w\/]+)/) { + $self->{host} = $1; + $self->{socket} = $2; + $self->{port} = ""; + } else { + $self->{errstr} = "Please specify database, username and password"; + return undef; + } + } + } + if (! exists $self->{errstr}) { + eval { + require DBI; + use POSIX ':signal_h'; + local $SIG{'ALRM'} = sub { + die "alarm\n"; + }; + my $mask = POSIX::SigSet->new( SIGALRM ); + my $action = POSIX::SigAction->new( + sub { die "alarm\n" ; }, $mask); + my $oldaction = POSIX::SigAction->new(); + sigaction(SIGALRM ,$action ,$oldaction ); + alarm($self->{timeout} - 1); # 1 second before the global unknown timeout + if ($self->{handle} = DBI->connect( + sprintf("DBI:SQLRelay:host=%s;port=%d;socket=%s", $self->{host}, $self->{port}, $self->{socket}), + $self->{username}, + $self->{password}, + { RaiseError => 1, AutoCommit => 0, PrintError => 1 })) { + $self->{handle}->do(q{ + ALTER SESSION SET NLS_NUMERIC_CHARACTERS=".," }); + $retval = $self; + if ($self->{mode} =~ /^server::tnsping/ && $self->{handle}->ping()) { + # database connected. fake a "unknown user" + $self->{errstr} = "ORA-01017"; + } + } else { + $self->{errstr} = DBI::errstr(); + } + }; + if ($@) { + $self->{errstr} = $@; + $self->{errstr} =~ s/at [\w\/\.]+ line \d+.*//g; + $retval = undef; + } + } + $self->{tac} = Time::HiRes::time(); + return $retval; +} + +sub fetchrow_array { + my $self = shift; + my $sql = shift; + my @arguments = @_; + my $sth = undef; + my @row = (); + $self->trace(sprintf "fetchrow_array: %s", $sql); + $self->trace(sprintf "args: %s", Data::Dumper::Dumper(\@arguments)); + eval { + $sth = $self->{handle}->prepare($sql); + if (scalar(@arguments)) { + $sth->execute(@arguments); + } else { + $sth->execute(); + } + @row = $sth->fetchrow_array(); + }; + if ($@) { + $self->debug(sprintf "bumm %s", $@); + } + $self->trace(sprintf "RESULT:\n%s\n", + Data::Dumper::Dumper(\@row)); + if (-f "/tmp/check_oracle_health_simulation/".$self->{mode}) { + my $simulation = do { local (@ARGV, $/) = + "/tmp/check_oracle_health_simulation/".$self->{mode}; <> }; + @row = split(/\s+/, (split(/\n/, $simulation))[0]); + } + return $row[0] unless wantarray; + return @row; +} + +sub fetchall_array { + my $self = shift; + my $sql = shift; + my @arguments = @_; + my $sth = undef; + my $rows = undef; + $self->trace(sprintf "fetchall_array: %s", $sql); + $self->trace(sprintf "args: %s", Data::Dumper::Dumper(\@arguments)); + eval { + $sth = $self->{handle}->prepare($sql); + if (scalar(@arguments)) { + $sth->execute(@arguments); + } else { + $sth->execute(); + } + $rows = $sth->fetchall_arrayref(); + }; + if ($@) { + printf STDERR "bumm %s\n", $@; + } + $self->trace(sprintf "RESULT:\n%s\n", + Data::Dumper::Dumper($rows)); + if (-f "/tmp/check_oracle_health_simulation/".$self->{mode}) { + my $simulation = do { local (@ARGV, $/) = + "/tmp/check_oracle_health_simulation/".$self->{mode}; <> }; + @{$rows} = map { [ split(/\s+/, $_) ] } split(/\n/, $simulation); + } + return @{$rows}; +} + +sub func { + my $self = shift; + $self->{handle}->func(@_); +} + + +sub execute { + my $self = shift; + my $sql = shift; + eval { + my $sth = $self->{handle}->prepare($sql); + $sth->execute(); + }; + if ($@) { + printf STDERR "bumm %s\n", $@; + } +} + +sub DESTROY { + my $self = shift; + #$self->trace(sprintf "disconnecting DBD %s", + # $self->{handle} ? "with handle" : "without handle"); + #$self->{handle}->disconnect() if $self->{handle}; +} + 1; | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/DBD/Oracle/Server/Database.pm ^ |
@@ -18,6 +18,7 @@ invalid_objects => undef, invalid_indexes => undef, invalid_ind_partitions => undef, + invalid_registry_components => undef, }, staleobjects => undef, tablespaces => [], @@ -39,6 +40,14 @@ } else { $self->add_nagios_critical("unable to aquire tablespace info"); } + } elsif ($params{mode} =~ /server::database::flash_recovery_area/) { + DBD::Oracle::Server::Database::FlashRecoveryArea::init_flash_recovery_areas(%params); + if (my @flash_recovery_areas = + DBD::Oracle::Server::Database::FlashRecoveryArea::return_flash_recovery_areas()) { + $self->{flash_recovery_areas} = \@flash_recovery_areas; + } else { + $self->add_nagios_critical("unable to aquire flash recovery area info"); + } } elsif ($params{mode} =~ /server::database::invalidobjects/) { $self->init_invalid_objects(%params); } elsif ($params{mode} =~ /server::database::stalestats/) { @@ -73,8 +82,16 @@ FROM dba_ind_partitions WHERE status <> 'USABLE' }); + # should be only VALID + $self->{invalidobjects}->{invalid_registry_components} = + $self->{handle}->fetchrow_array(q{ + SELECT COUNT(DISTINCT STATUS) + FROM dba_registry + WHERE status <> 'VALID' + }); if (! defined $self->{invalidobjects}->{invalid_objects} || ! defined $self->{invalidobjects}->{invalid_indexes} || + ! defined $self->{invalidobjects}->{invalid_registry_components} || ! defined $self->{invalidobjects}->{invalid_ind_partitions}) { $self->add_nagios_critical("unable to get invalid objects"); return undef; @@ -130,6 +147,17 @@ $_->nagios(%params); $self->merge_nagios($_); } + } elsif ($params{mode} =~ /server::database::tablespace::listflash_recovery_areas/) { + foreach (sort { $a->{name} cmp $b->{name}; } @{$self->{flash_recovery_areas}}) { + printf "%s\n", $_->{name}; + } + $self->add_nagios_ok("have fun"); + } elsif ($params{mode} =~ /server::database::flash_recovery_area/) { + foreach (@{$self->{flash_recovery_areas}}) { + # sind hier noch nach pctused sortiert + $_->nagios(%params); + $self->merge_nagios($_); + } } elsif ($params{mode} =~ /server::database::invalidobjects/) { my @message = (); push(@message, sprintf "%d invalid objects", @@ -141,10 +169,14 @@ push(@message, sprintf "%d invalid index partitions", $self->{invalidobjects}->{invalid_ind_partitions}) if $self->{invalidobjects}->{invalid_ind_partitions}; + push(@message, sprintf "%d invalid registry components", + $self->{invalidobjects}->{invalid_registry_components}) if + $self->{invalidobjects}->{invalid_registry_components}; if (scalar(@message)) { $self->add_nagios($self->check_thresholds( $self->{invalidobjects}->{invalid_objects} + $self->{invalidobjects}->{invalid_indexes} + + $self->{invalidobjects}->{invalid_registry_components} + $self->{invalidobjects}->{invalid_ind_partitions}, 0.1, 0.1), join(", ", @message)); } else { | ||
[+] | Added | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/DBD/Oracle/Server/Database/FlashRecoveryArea.pm ^ |
@@ -0,0 +1,192 @@ +package DBD::Oracle::Server::Database::FlashRecoveryArea; + +use strict; + +our @ISA = qw(DBD::Oracle::Server::Database); + +my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 ); +my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' ); + +{ + my @flash_recovery_areas = (); + my $initerrors = undef; + + sub add_flash_recovery_area { + push(@flash_recovery_areas, shift); + } + + sub return_flash_recovery_areas { + return reverse + sort { $a->{name} cmp $b->{name} } @flash_recovery_areas; + } + + sub init_flash_recovery_areas { + # as far as i understand it, there is only one flra. + # we use an array here anyway, because the tablespace code can be reused + my %params = @_; + my $num_flash_recovery_areas = 0; + if (($params{mode} =~ /server::database::flash_recovery_area::usage/) || + ($params{mode} =~ /server::database::flash_recovery_area::free/) || + ($params{mode} =~ /server::database::flash_recovery_area::listflash_recovery_areas/)) { + my @flash_recovery_arearesult = (); + if (DBD::Oracle::Server::return_first_server()->version_is_minimum("10.x")) { + @flash_recovery_arearesult = $params{handle}->fetchall_array(q{ + SELECT + name, space_limit, space_used, space_reclaimable, number_of_files + FROM + v$recovery_file_dest + }); + } else { + # no flash before 10.x + } + foreach (@flash_recovery_arearesult) { + my ($name, $space_limit, $space_used, $space_reclaimable, + $number_of_files) = @{$_}; + if ($params{regexp}) { + next if $params{selectname} && $name !~ /$params{selectname}/; + } else { + next if $params{selectname} && lc $params{selectname} ne lc $name; + } + my %thisparams = %params; + $thisparams{name} = $name; + $thisparams{space_limit} = $space_limit; + $thisparams{space_used} = $space_used; + $thisparams{space_reclaimable} = $space_reclaimable; + $thisparams{number_of_files} = lc $number_of_files; + my $flash_recovery_area = DBD::Oracle::Server::Database::FlashRecoveryArea->new( + %thisparams); + add_flash_recovery_area($flash_recovery_area); + $num_flash_recovery_areas++; + } + if (! $num_flash_recovery_areas) { + $initerrors = 1; + return undef; + } + } + } +} + +sub new { + my $class = shift; + my %params = @_; + my $self = { + verbose => $params{verbose}, + handle => $params{handle}, + name => $params{name}, + space_limit => $params{space_limit}, + space_used => $params{space_used}, + space_reclaimable => $params{space_reclaimable}, + number_of_files => $params{number_of_files}, + warningrange => $params{warningrange}, + criticalrange => $params{criticalrange}, + }; + bless $self, $class; + $self->init(%params); + return $self; +} + +sub init { + my $self = shift; + my %params = @_; + $self->init_nagios(); + if ($params{mode} =~ /server::database::flash_recovery_area::(usage|free)/) { + $self->{percent_used} = + ($self->{space_used} - $self->{space_reclaimable}) / $self->{space_limit} * 100; + $self->{percent_free} = 100 - $self->{percent_used}; + $self->{bytes_used} = $self->{space_used} - $self->{space_reclaimable}; + $self->{bytes_free} = $self->{space_limit} - $self->{space_used}; + } +} + +sub nagios { + my $self = shift; + my %params = @_; + if (! $self->{nagios_level}) { + if ($params{mode} =~ /server::database::flash_recovery_area::usage/) { + $self->check_thresholds($self->{percent_used}, "90", "98"); + $self->add_nagios( + $self->check_thresholds($self->{percent_used}, "90", "98"), + sprintf("flra (%s) usage is %.2f%%", + $self->{name}, $self->{percent_used})); + $self->add_perfdata(sprintf "\'flra_usage_pct\'=%.2f%%;%d;%d", + $self->{percent_used}, + $self->{warningrange}, $self->{criticalrange}); + $self->add_perfdata(sprintf "\'flra_usage\'=%dMB;%d;%d;%d;%d", + ($self->{space_used} - $self->{space_reclaimable}) / 1048576, + $self->{warningrange} * $self->{space_limit} / 100 / 1048576, + $self->{criticalrange} * $self->{space_limit} / 100 / 1048576, + 0, $self->{space_limit} / 1048576); + } elsif ($params{mode} =~ /server::database::flash_recovery_area::free/) { + if (($self->{warningrange} && $self->{warningrange} !~ /^\d+:/) || + ($self->{criticalrange} && $self->{criticalrange} !~ /^\d+:/)) { + $self->add_nagios_unknown("you want an alert if free space is _above_ a threshold????"); + return; + } + if (! $params{units}) { + $params{units} = "%"; + } + $self->{warning_bytes} = 0; + $self->{critical_bytes} = 0; + if ($params{units} eq "%") { + $self->add_nagios( + $self->check_thresholds($self->{percent_free}, "5:", "2:"), + sprintf("flra %s has %.2f%% free space left", + $self->{name}, $self->{percent_free}) + ); + $self->{warningrange} =~ s/://g; + $self->{criticalrange} =~ s/://g; + $self->add_perfdata(sprintf "\'flra_free_pct\'=%.2f%%;%d:;%d:", + $self->{percent_free}, + $self->{warningrange}, $self->{criticalrange}); + $self->add_perfdata(sprintf "\'flra_free\'=%dMB;%.2f:;%.2f:;0;%.2f", + $self->{bytes_free} / 1048576, + $self->{warningrange} * $self->{space_limit} / 100 / 1048576, + $self->{criticalrange} * $self->{space_limit} / 100 / 1048576, + $self->{space_limit} / 1048576); + } else { + my $factor = 1024 * 1024; # default MB + if ($params{units} eq "GB") { + $factor = 1024 * 1024 * 1024; + } elsif ($params{units} eq "MB") { + $factor = 1024 * 1024; + } elsif ($params{units} eq "KB") { + $factor = 1024; + } + $self->{warningrange} ||= "5:"; + $self->{criticalrange} ||= "2:"; + my $saved_warningrange = $self->{warningrange}; + my $saved_criticalrange = $self->{criticalrange}; + # : entfernen weil gerechnet werden muss + $self->{warningrange} =~ s/://g; + $self->{criticalrange} =~ s/://g; + $self->{warningrange} = $self->{warningrange} ? + $self->{warningrange} * $factor : 5 * $factor; + $self->{criticalrange} = $self->{criticalrange} ? + $self->{criticalrange} * $factor : 2 * $factor; + $self->{percent_warning} = 100 * $self->{warningrange} / $self->{space_limit}; + $self->{percent_critical} = 100 * $self->{criticalrange} / $self->{space_limit}; + $self->{warningrange} .= ':'; + $self->{criticalrange} .= ':'; + $self->add_nagios( + $self->check_thresholds($self->{bytes_free}, "5242880:", "1048576:"), + sprintf("flra (%s) has %.2f%s free space left", $self->{name}, + $self->{bytes_free} / $factor, $params{units}) + ); + $self->{warningrange} = $saved_warningrange; + $self->{criticalrange} = $saved_criticalrange; + $self->{warningrange} =~ s/://g; + $self->{criticalrange} =~ s/://g; + $self->add_perfdata(sprintf "\'flra_free_pct\'=%.2f%%;%.2f:;%.2f:", + $self->{percent_free}, $self->{percent_warning}, + $self->{percent_critical}); + $self->add_perfdata(sprintf "\'flra_free\'=%.2f%s;%.2f:;%.2f:;0;%.2f", + $self->{bytes_free} / $factor, $params{units}, + $self->{warningrange}, + $self->{criticalrange}, + $self->{space_limit} / $factor); + } + } + } +} + + | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/DBD/Oracle/Server/Database/Tablespace.pm ^ |
@@ -24,6 +24,7 @@ my %params = @_; my $num_tablespaces = 0; if (($params{mode} =~ /server::database::tablespace::usage/) || + ($params{mode} =~ /server::database::tablespace::free/) || ($params{mode} =~ /server::database::tablespace::remainingfreetime/) || ($params{mode} =~ /server::database::tablespace::listtablespaces/)) { my @tablespaceresult = (); @@ -84,12 +85,12 @@ AND a.tablespace_name = d.tablespace_name (+) UNION ALL SELECT - a.tablespace_name "Tablespace", + d.tablespace_name "Tablespace", b.status "Status", b.contents "Type", b.extent_management "Extent Mgmt", sum(a.bytes_free + a.bytes_used) bytes, -- allocated - d.maxbytes bytes_max, + SUM(DECODE(d.autoextensible, 'YES', d.maxbytes, 'NO', d.bytes)) bytes_max, SUM(a.bytes_free + a.bytes_used - NVL(c.bytes_used, 0)) bytes_free FROM sys.v_$TEMP_SPACE_HEADER a, @@ -103,15 +104,14 @@ and d.tablespace_name = a.tablespace_name and b.tablespace_name = a.tablespace_name GROUP BY - a.tablespace_name, b.status, b.contents, b.extent_management, - d.maxbytes + d.tablespace_name ORDER BY 1 }); - } else { + } elsif (DBD::Oracle::Server::return_first_server()->version_is_minimum("8.x")) { @tablespaceresult = $params{handle}->fetchall_array(q{ SELECT a.tablespace_name "Tablespace", @@ -180,6 +180,47 @@ ORDER BY 1 }); + } else { + @tablespaceresult = $params{handle}->fetchall_array(q{ + SELECT + a.tablespace_name "Tablespace", + b.status "Status", + b.contents "Type", + 'DICTIONARY' "Extent Mgmt", + a.bytes bytes, + a.maxbytes bytes_max, + c.bytes_free bytes_free + FROM + ( + -- belegter und maximal verfuegbarer platz pro datafile + -- nach tablespacenamen zusammengefasst + -- => bytes + -- => maxbytes + SELECT + a.tablespace_name, + SUM(a.bytes) bytes, + SUM(a.bytes) maxbytes + FROM + dba_data_files a + GROUP BY + tablespace_name + ) a, + sys.dba_tablespaces b, + ( + -- freier platz pro tablespace + -- => bytes_free + SELECT + a.tablespace_name, + SUM(a.bytes) bytes_free + FROM + dba_free_space a + GROUP BY + tablespace_name + ) c + WHERE + a.tablespace_name = c.tablespace_name (+) + AND a.tablespace_name = b.tablespace_name + }); } foreach (@tablespaceresult) { my ($name, $status, $type, $extentmgmt, $bytes, $bytes_max, $bytes_free) = @{$_}; @@ -188,6 +229,7 @@ } else { next if $params{selectname} && lc $params{selectname} ne lc $name; } + # host_filesys_pctAvailable my %thisparams = %params; $thisparams{name} = $name; $thisparams{bytes} = $bytes; @@ -314,11 +356,12 @@ my $class = shift; my %params = @_; my $self = { + verbose => $params{verbose}, handle => $params{handle}, name => $params{name}, bytes => $params{bytes}, bytes_max => $params{bytes_max}, - bytes_free => $params{bytes_free}, + bytes_free => $params{bytes_free} || 0, extent_management => $params{extent_management}, type => $params{type}, status => $params{status}, @@ -327,7 +370,6 @@ datafiles => [], io_total => 0, usage_history => [], - extent_management => $params{extent_management}, allocation_type => $params{allocation_type}, largest_free_extent => $params{largest_free_extent}, warningrange => $params{warningrange}, @@ -342,28 +384,47 @@ my $self = shift; my %params = @_; $self->init_nagios(); - if ($params{mode} =~ /server::database::tablespace::usage/) { - # (total - free) / total * 100 = % used - # (used + free - free) / ( used + free) - if ($self->{bytes_max} == 0) { - $self->{percent_used} = - ($self->{bytes} - $self->{bytes_free}) / $self->{bytes} * 100; - } elsif ($self->{bytes_max} > $self->{bytes}) { - $self->{percent_used} = - ($self->{bytes} - $self->{bytes_free}) / $self->{bytes_max} * 100; + $self->set_local_db_thresholds(%params); + if ($params{mode} =~ /server::database::tablespace::(usage|free)/) { + if (! defined $self->{bytes_max}) { + $self->{bytes} = 0; + $self->{bytes_max} = 0; + $self->{bytes_free} = 0; + $self->{percent_used} = 0; + $self->{real_bytes_max} = $self->{bytes}; + $self->{real_bytes_free} = $self->{bytes_free}; + $self->{percent_as_bar} = '____________________'; } else { - # alter tablespace USERS add datafile 'users02.dbf' - # size 5M autoextend on next 200K maxsize 6M; - # bytes = 5M, maxbytes = 6M - # ..... data arriving...until ORA-01652: unable to extend temp segment - # bytes = 6M, maxbytes = 6M - # alter database datafile 5 resize 8M; - # bytes = 8M, maxbytes = 6M - $self->{percent_used} = - ($self->{bytes} - $self->{bytes_free}) / $self->{bytes} * 100; + # (total - free) / total * 100 = % used + # (used + free - free) / ( used + free) + if ($self->{bytes_max} == 0) { + $self->{percent_used} = + ($self->{bytes} - $self->{bytes_free}) / $self->{bytes} * 100; + $self->{real_bytes_max} = $self->{bytes}; + $self->{real_bytes_free} = $self->{bytes_free}; + } elsif ($self->{bytes_max} > $self->{bytes}) { + $self->{percent_used} = + ($self->{bytes} - $self->{bytes_free}) / $self->{bytes_max} * 100; + $self->{real_bytes_max} = $self->{bytes_max}; + $self->{real_bytes_free} = $self->{bytes_free} + ($self->{bytes_max} - $self->{bytes}); + } else { + # alter tablespace USERS add datafile 'users02.dbf' + # size 5M autoextend on next 200K maxsize 6M; + # bytes = 5M, maxbytes = 6M + # ..... data arriving...until ORA-01652: unable to extend temp segment + # bytes = 6M, maxbytes = 6M + # alter database datafile 5 resize 8M; + # bytes = 8M, maxbytes = 6M + $self->{percent_used} = + ($self->{bytes} - $self->{bytes_free}) / $self->{bytes} * 100; + $self->{real_bytes_max} = $self->{bytes}; + $self->{real_bytes_free} = $self->{bytes_free}; + } } + $self->{percent_free} = 100 - $self->{percent_used}; my $tlen = 20; - my $len = int(($self->{percent_used} / 100 * $tlen) + 0.5); + my $len = int((($params{mode} =~ /server::database::tablespace::usage/) ? + $self->{percent_used} : $self->{percent_free} / 100 * $tlen) + 0.5); $self->{percent_as_bar} = '=' x $len . '_' x ($tlen - $len); } elsif ($params{mode} =~ /server::database::tablespace::fragmentation/) { } elsif ($params{mode} =~ /server::database::tablespace::segment::top10/) { @@ -409,6 +470,8 @@ ($self->{bytes} - $self->{bytes_free}) / $self->{bytes_max} * 100; $self->{usage_history} = $self->load_state( %params ) || []; my $now = time; + my $lookback = ($params{lookback} || 30) * 24 * 3600; + #$lookback = 91 * 24 * 3600; if (scalar(@{$self->{usage_history}})) { $self->trace(sprintf "loaded %d data sets from %s - %s", scalar(@{$self->{usage_history}}), @@ -416,7 +479,7 @@ scalar localtime($now)); # only data sets with valid usage. only newer than 91 days $self->{usage_history} = - [ grep { defined $_->[1] && ($now - $_->[0]) < 7862400 } @{$self->{usage_history}} ]; + [ grep { defined $_->[1] && ($now - $_->[0]) < $lookback } @{$self->{usage_history}} ]; $self->trace(sprintf "trimmed to %d data sets from %s - %s", scalar(@{$self->{usage_history}}), scalar localtime((@{$self->{usage_history}})[0]->[0]), @@ -435,15 +498,29 @@ my %params = @_; if (! $self->{nagios_level}) { if ($params{mode} =~ /server::database::tablespace::usage/) { - $self->add_nagios( - # 'tbs_system_usage_pct'=99.01%;90;98 percent used, warn, crit - # 'tbs_system_usage'=693MB;630;686;0;700 used, warn, crit, 0, max=total - $self->check_thresholds($self->{percent_used}, "90", "98"), - $params{eyecandy} ? - sprintf("[%s] %s", $self->{percent_as_bar}, $self->{name}) : - sprintf("tbs %s usage is %.2f%%", $self->{name}, $self->{percent_used}) - ); - $self->add_perfdata(sprintf "\'tbs_%s_usage_pct\'=%d%%;%d;%d", + if (! $self->{bytes_max}) { + $self->check_thresholds($self->{percent_used}, "90", "98"); + if ($self->{status} eq 'offline') { + $self->add_nagios_warning( + sprintf("tbs %s is offline", $self->{name}) + ); + } else { + $self->add_nagios_critical( + sprintf("tbs %s has has a problem, maybe needs recovery?", $self->{name}) + ); + } + } else { + $self->add_nagios( + # 'tbs_system_usage_pct'=99.01%;90;98 percent used, warn, crit + # 'tbs_system_usage'=693MB;630;686;0;700 used, warn, crit, 0, max=total + $self->check_thresholds($self->{percent_used}, "90", "98"), + $params{eyecandy} ? + sprintf("[%s] %s", $self->{percent_as_bar}, $self->{name}) : + sprintf("tbs %s usage is %.2f%%", + $self->{name}, $self->{percent_used}) + ); + } + $self->add_perfdata(sprintf "\'tbs_%s_usage_pct\'=%.2f%%;%d;%d", lc $self->{name}, $self->{percent_used}, $self->{warningrange}, $self->{criticalrange}); @@ -465,6 +542,130 @@ lc $self->{name}, $self->{fsfi}, $self->{warningrange}, $self->{criticalrange}); + } elsif ($params{mode} =~ /server::database::tablespace::free/) { + # ->percent_free + # ->real_bytes_max + # + # ausgabe + # perfdata tbs_<tbs>_free_pct + # perfdata tbs_<tbs>_free (real_bytes_max - bytes) + bytes_free (with units) + # perfdata tbs_<tbs>_alloc_free bytes_free (with units) + # + # umrechnen der thresholds + # ()/% + # MB + # GB + # KB + if (($self->{warningrange} && $self->{warningrange} !~ /^\d+:/) || + ($self->{criticalrange} && $self->{criticalrange} !~ /^\d+:/)) { + $self->add_nagios_unknown("you want an alert if free space is _above_ a threshold????"); + return; + } + if (! $params{units}) { + $params{units} = "%"; + } + $self->{warning_bytes} = 0; + $self->{critical_bytes} = 0; + if ($params{units} eq "%") { + if (! $self->{bytes_max}) { + $self->check_thresholds($self->{percent_used}, "5:", "2:"); + if ($self->{status} eq 'offline') { + $self->add_nagios_warning( + sprintf("tbs %s is offline", $self->{name}) + ); + } else { + $self->add_nagios_critical( + sprintf("tbs %s has has a problem, maybe needs recovery?", $self->{name}) + ); + } + } else { + $self->add_nagios( + $self->check_thresholds($self->{percent_free}, "5:", "2:"), + sprintf("tbs %s has %.2f%% free space left", + $self->{name}, $self->{percent_free}) + ); + } + $self->{warningrange} =~ s/://g; + $self->{criticalrange} =~ s/://g; + $self->add_perfdata(sprintf "\'tbs_%s_free_pct\'=%.2f%%;%d:;%d:", + lc $self->{name}, + $self->{percent_free}, + $self->{warningrange}, $self->{criticalrange}); + $self->add_perfdata(sprintf "\'tbs_%s_free\'=%dMB;%.2f:;%.2f:;0;%.2f", + lc $self->{name}, + $self->{real_bytes_free} / 1048576, + $self->{warningrange} * $self->{bytes_max} / 100 / 1048576, + $self->{criticalrange} * $self->{bytes_max} / 100 / 1048576, + $self->{real_bytes_max} / 1048576); + } else { + my $factor = 1024 * 1024; # default MB + if ($params{units} eq "GB") { + $factor = 1024 * 1024 * 1024; + } elsif ($params{units} eq "MB") { + $factor = 1024 * 1024; + } elsif ($params{units} eq "KB") { + $factor = 1024; + } + $self->{warningrange} ||= "5:"; + $self->{criticalrange} ||= "2:"; + my $saved_warningrange = $self->{warningrange}; + my $saved_criticalrange = $self->{criticalrange}; + # : entfernen weil gerechnet werden muss + $self->{warningrange} =~ s/://g; + $self->{criticalrange} =~ s/://g; + $self->{warningrange} = $self->{warningrange} ? + $self->{warningrange} * $factor : 5 * $factor; + $self->{criticalrange} = $self->{criticalrange} ? + $self->{criticalrange} * $factor : 2 * $factor; + if (! $self->{bytes_max}) { + $self->{percent_warning} = 0; + $self->{percent_critical} = 0; + $self->{warningrange} .= ':'; + $self->{criticalrange} .= ':'; + $self->check_thresholds($self->{real_bytes_free}, "5242880:", "1048576:"); + if ($self->{status} eq 'offline') { + $self->add_nagios_warning( + sprintf("tbs %s is offline", $self->{name}) + ); + } else { + $self->add_nagios_critical( + sprintf("tbs %s has a problem, maybe needs recovery?", $self->{name}) + ); + } + } else { + $self->{percent_warning} = 100 * $self->{warningrange} / $self->{real_bytes_max}; + $self->{percent_critical} = 100 * $self->{criticalrange} / $self->{real_bytes_max}; + $self->{warningrange} .= ':'; + $self->{criticalrange} .= ':'; + $self->add_nagios( + $self->check_thresholds($self->{real_bytes_free}, "5242880:", "1048576:"), + sprintf("tbs %s has %.2f%s free space left", $self->{name}, + $self->{real_bytes_free} / $factor, $params{units}) + ); + } + $self->{warningrange} = $saved_warningrange; + $self->{criticalrange} = $saved_criticalrange; + $self->{warningrange} =~ s/://g; + $self->{criticalrange} =~ s/://g; + $self->add_perfdata(sprintf "\'tbs_%s_free_pct\'=%.2f%%;%.2f:;%.2f:", + lc $self->{name}, + $self->{percent_free}, $self->{percent_warning}, + $self->{percent_critical}); + $self->add_perfdata(sprintf "\'tbs_%s_free\'=%.2f%s;%.2f:;%.2f:;0;%.2f", + lc $self->{name}, + $self->{real_bytes_free} / $factor, $params{units}, + $self->{warningrange}, + $self->{criticalrange}, + $self->{real_bytes_max} / $factor); + } + } elsif ($params{mode} =~ /server::database::tablespace::fragmentation/) { + $self->add_nagios( + $self->check_thresholds($self->{fsfi}, "30:", "20:"), + sprintf "tbs %s fsfi is %.2f", $self->{name}, $self->{fsfi}); + $self->add_perfdata(sprintf "\'tbs_%s_fsfi\'=%.2f;%s;%s;0;100", + lc $self->{name}, + $self->{fsfi}, + $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} =~ /server::database::tablespace::segment::top10/) { foreach (@{$self->{segments}}) { $_->nagios(%params); @@ -516,7 +717,7 @@ # jetzt werden diejenigen datafiles ermittelt, die aus der reihe tanzen # wie verhaelt sich ihre differenz zum mittelwert zur standardabweichung foreach my $datafile (@{$self->{datafiles}}) { - my $delta = abs($datafile->{io_total} - $averagetotal); + my $delta = abs($datafile->{io_total} - $averagetotal); my $factor = $delta / $sx * 100; $worstfactor = $factor unless $factor <= $worstfactor; if ($self->check_thresholds($factor, 50, 100)) { | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/DBD/Oracle/Server/Database/Tablespace/Datafile.pm ^ |
@@ -31,6 +31,7 @@ if (($params{mode} =~ /server::database::tablespace::datafile::iotraffic/) || ($params{mode} =~ /server::database::tablespace::datafile::listdatafiles/)) { # negative values can occur + # column datafile format a30 my @datafileresults = $params{handle}->fetchall_array(q{ SELECT name datafile, phyrds reads, phywrts writes @@ -96,7 +97,7 @@ WHERE tablespace_name = UPPER(?) AND file_id=file# GROUP BY tablespace_name, file_name }; } - my @datafileresults = $params{handle}->fetchall_array($sql, $params{selectname}, $params{selectname}); + my @datafileresults = $params{handle}->fetchall_array($sql, $params{tablespace}, $params{tablespace}); if (DBD::Oracle::Server::return_first_server()->windows_server()) { fileparse_set_fstype("MSWin32"); } | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/DBD/Oracle/Server/Database/Tablespace/Segment.pm ^ |
@@ -44,25 +44,13 @@ } elsif ($params{mode} =~ /server::database::tablespace::segment::extendspace/) { my @tablespaceresult = $params{handle}->fetchall_array(q{ - SELECT + SELECT /*+ RULE */ -- tablespace, segment, extent -- aber dadurch, dass nur das letzte extent selektiert wird -- werden praktisch nur tablespace und segmente ausgegeben b.tablespace_name "Tablespace", b.segment_type "Type", SUBSTR(ext.owner||'.'||ext.segment_name,1,50) "Object Name", - -- ext.extent_id "ID", -- das zuletzt hinzugefuegte extent - -- fliegt raus - --TO_CHAR( - -- DECODE(freespace.extent_management, - -- 'DICTIONARY', DECODE(b.extents, - -- 1, b.next_extent, ext.bytes * (1 + b.pct_increase / 100)), - -- 'LOCAL', DECODE(freespace.allocation_type, - -- 'UNIFORM', freespace.initial_extent, - -- 'SYSTEM', ext.bytes)) - -- / 1024, '9,999,999,999') "Required Extent(K)", - --TO_CHAR( - -- freespace.largest / 1024, '9,999,999,999') "MaxAvail K" DECODE(freespace.extent_management, 'DICTIONARY', DECODE(b.extents, 1, b.next_extent, ext.bytes * (1 + b.pct_increase / 100)), @@ -72,8 +60,26 @@ ) "Required Extent", freespace.largest "MaxAvail" FROM - dba_segments b, - dba_extents ext, + -- dba_segments b, + -- dba_extents ext, + ( + SELECT + owner, segment_type, segment_name, extents, pct_increase, + next_extent, tablespace_name + FROM + dba_segments + WHERE + tablespace_name = ? + ) b, + ( + SELECT + owner, segment_type, segment_name, extent_id, bytes, + tablespace_name + FROM + dba_extents + WHERE + tablespace_name = ? + ) ext, ( -- dictionary/local, uniform/system, initial, next -- und der groesste freie extent pro tablespace @@ -113,19 +119,11 @@ b.tablespace_name = freespace.tablespace_name AND freespace.tablespace_name = ? - --AND - -- DECODE(freespace.Extent_Management, - -- 'DICTIONARY', DECODE(b.extents, - -- 1, b.next_extent, ext.bytes * (1 + b.pct_increase / 100)), - -- 'LOCAL', DECODE(freespace.allocation_type, - -- 'UNIFORM', freespace.initial_extent, - -- 'SYSTEM', ext.bytes) - -- ) > freespace.largest ORDER BY b.tablespace_name, b.segment_type, b.segment_name - }, $params{tablespace}); + }, $params{tablespace}, $params{tablespace}, $params{tablespace}); foreach (@tablespaceresult) { my ($tablespace_name, $segment_type, $object_name, $required_for_next_extent, $largest_free) = @{$_}; @@ -178,28 +176,59 @@ /server::database::tablespace::segment::top10bufferbusywaits/) || ($params{mode} =~ /server::database::tablespace::segment::top10rowlockwaits/)) { + my $sql; my $mode = (split(/::/, $params{mode}))[4]; ## -- SELECT owner, object_name, object_type, value, statistic_name - my $sql = q{ - SELECT COUNT(*) - FROM (select DO.owner, DO.object_name, DO.object_type, SS.value, - SS.statistic_name, row_number () over (order by value desc) RN - FROM dba_objects DO, v$segstat SS - WHERE DO.object_id = SS.obj# - AND statistic_name = ?) - WHERE RN <= 10 - AND owner not in - ('CTXSYS', 'DBSNMP', 'MDDATA', 'MDSYS', 'DMSYS', 'OLAPSYS', - 'ORDPLUGINS', 'ORDSYS', 'OUTLN', 'SI_INFORMTN_SCHEMA', - 'SYS', 'SYSMAN', 'SYSTEM') - }; - $sql = q{ - select DO.owner, DO.object_name, DO.object_type, SS.value, - SS.statistic_name - FROM dba_objects DO, v$segstat SS - WHERE DO.object_id = SS.obj# - AND statistic_name = ? - }; + if (DBD::Oracle::Server::return_first_server()->version_is_minimum("10.x")) { + # this uses oracle analytic function rank() over (), + # needs oracle >= 10.x + # for more information see: + # http://kenntwas.de/2010/linux/monitoring/check_oracle_health-seg-top10-abfragen-verbessern/ + $sql = q{ + SELECT DO.owner, + DO.object_name, + DO.object_type, + SS.VALUE, + SS.statistic_name + FROM dba_objects DO, + (SELECT * + FROM (SELECT S.OBJ#, + s.VALUE, + s.statistic_name, + RANK () OVER (ORDER BY s.VALUE DESC) rk + FROM v$segstat s + WHERE s.statistic_name = ? + /* reduce data to significant values */ + AND VALUE <> 0) + WHERE rk <= 10 /* top 10 */ + ) SS + WHERE DO.object_id = SS.obj# + }; + } else { + my $sql = q{ + SELECT COUNT(*) + FROM (select DO.owner, DO.object_name, DO.object_type, SS.value, + SS.statistic_name, row_number () over (order by value desc) RN + FROM dba_objects DO, v$segstat SS + WHERE DO.object_id = SS.obj# + AND statistic_name = ?) + WHERE RN <= 10 + AND owner not in + ('CTXSYS', 'DBSNMP', 'MDDATA', 'MDSYS', 'DMSYS', 'OLAPSYS', + 'ORDPLUGINS', 'ORDSYS', 'OUTLN', 'SI_INFORMTN_SCHEMA', + 'SYS', 'SYSMAN', 'SYSTEM') + }; + # this is a very heavy operation and de-selecting system users + # makes it even slower, so we fetch all data and do the filtering + # later in perl. + $sql = q{ + select DO.owner, DO.object_name, DO.object_type, SS.value, + SS.statistic_name + FROM dba_objects DO, v$segstat SS + WHERE DO.object_id = SS.obj# + AND statistic_name = ? + }; + } my $statname = { top10logicalreads => "logical reads", top10physicalreads => "physical reads", | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/DBD/Oracle/Server/Instance/Enqueue.pm ^ |
@@ -1,4 +1,4 @@ - package DBD::Oracle::Server::Instance::Enqueue; +package DBD::Oracle::Server::Instance::Enqueue; use strict; | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/DBD/Oracle/Server/Instance/Event.pm ^ |
@@ -33,7 +33,7 @@ my %params = @_; my $num_events = 0; my %longnames = (); - if (($params{mode} =~ /server::instance::event::wait/) || #waits, waited + if (($params{mode} =~ /server::instance::event::wait/) || #waits, waiting ($params{mode} =~ /server::instance::event::listevents/)) { my $sql; my @idlewaits = (); | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/DBD/Oracle/Server/Instance/SGA.pm ^ |
@@ -15,6 +15,8 @@ data_buffer => undef, shared_pool => undef, latches => undef, + warningrange => $params{warningrange}, + criticalrange => $params{criticalrange}, }; bless $self, $class; $self->init(%params); | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/DBD/Oracle/Server/Instance/SGA/RedoLogBuffer.pm ^ |
@@ -32,26 +32,102 @@ my %params = @_; $self->init_nagios(); if ($params{mode} =~ /server::instance::sga::redologbuffer::switchinterval/) { - eval { - # alles was jemals geswitcht hat, letzter switch, zweitletzter switch - $self->{last_switch_interval} = $self->{handle}->fetchrow_array(q { - WITH temptab AS - ( - SELECT sequence#, first_time FROM sys.v_$log WHERE status = 'CURRENT' - UNION ALL - SELECT sequence#, first_time FROM sys.v_$log_history - ) - SELECT (b.first_time - a.first_time) * 1440 * 60 seconds - FROM - ( - SELECT MAX(first_time) AS first_time FROM temptab - ) b, - ( - SELECT MAX(first_time) AS first_time FROM temptab - WHERE first_time < (SELECT MAX(first_time) AS first_time FROM temptab) - ) a - }); - }; + if ($self->instance_rac()) { + eval { + # alles was jemals geswitcht hat, letzter switch, zweitletzter switch + # jetzt - letzter switch = mindestlaenge des naechsten intervals + # wenn das lang genug ist, dann war das letzte, kurze intervall + # wohl nur ein ausreisser oder manueller switch + # derzeit laufendes intervall, letztes intervall, vorletztes intervall + ($self->{next_switch_interval}, $self->{last_switch_interval}, $self->{nextto_last_switch_interval}) = + $self->{handle}->fetchrow_array(q { + WITH temptab AS + ( + SELECT sequence#, first_time FROM sys.v_$log WHERE status = 'CURRENT' + AND thread# = ? + UNION ALL + SELECT sequence#, first_time FROM sys.v_$log_history + WHERE thread# = ? + ORDER BY first_time DESC + ) + SELECT + (sysdate - a.first_time) * 1440 * 60 thisinterval, + (a.first_time - b.first_time) * 1440 * 60 lastinterval, + (b.first_time - c.first_time) * 1440 * 60 nexttolastinterval + FROM + ( + SELECT NVL( + ( + SELECT first_time FROM ( + SELECT first_time, rownum AS irow FROM temptab WHERE ROWNUM <= 1 + ) WHERE irow = 1 + ) , to_date('20090624','YYYYMMDD')) as first_time FROM dual + ) a, + ( + SELECT NVL( + ( + SELECT first_time FROM ( + SELECT first_time, rownum AS irow FROM temptab WHERE ROWNUM <= 2 + ) WHERE irow = 2 + ) , to_date('20090624','YYYYMMDD')) as first_time FROM dual + ) b, + ( + SELECT NVL( + ( + SELECT first_time FROM ( + SELECT first_time, rownum AS irow FROM temptab WHERE ROWNUM <= 3 + ) WHERE irow = 3 + ) , to_date('20090624','YYYYMMDD')) as first_time FROM dual + ) c + }, $self->instance_thread(), $self->instance_thread()); + }; + } else { + eval { + # alles was jemals geswitcht hat, letzter switch, zweitletzter switch + # jetzt - letzter switch = mindestlaenge des naechsten intervals + # wenn das lang genug ist, dann war das letzte, kurze intervall + # wohl nur ein ausreisser oder manueller switch + # derzeit laufendes intervall, letztes intervall, vorletztes intervall + ($self->{next_switch_interval}, $self->{last_switch_interval}, $self->{nextto_last_switch_interval}) = + $self->{handle}->fetchrow_array(q { + WITH temptab AS + ( + SELECT sequence#, first_time FROM sys.v_$log WHERE status = 'CURRENT' + UNION ALL + SELECT sequence#, first_time FROM sys.v_$log_history ORDER BY first_time DESC + ) + SELECT + (sysdate - a.first_time) * 1440 * 60 thisinterval, + (a.first_time - b.first_time) * 1440 * 60 lastinterval, + (b.first_time - c.first_time) * 1440 * 60 nexttolastinterval + FROM + ( + SELECT NVL( + ( + SELECT first_time FROM ( + SELECT first_time, rownum AS irow FROM temptab WHERE ROWNUM <= 1 + ) WHERE irow = 1 + ) , to_date('20090624','YYYYMMDD')) as first_time FROM dual + ) a, + ( + SELECT NVL( + ( + SELECT first_time FROM ( + SELECT first_time, rownum AS irow FROM temptab WHERE ROWNUM <= 2 + ) WHERE irow = 2 + ) , to_date('20090624','YYYYMMDD')) as first_time FROM dual + ) b, + ( + SELECT NVL( + ( + SELECT first_time FROM ( + SELECT first_time, rownum AS irow FROM temptab WHERE ROWNUM <= 3 + ) WHERE irow = 3 + ) , to_date('20090624','YYYYMMDD')) as first_time FROM dual + ) c + }); + }; + } if (! defined $self->{last_switch_interval}) { $self->add_nagios_critical( sprintf "unable to get last switch interval"); @@ -93,11 +169,70 @@ if (! $self->{nagios_level}) { if ($params{mode} =~ /server::instance::sga::redologbuffer::switchinterval/) { - $self->add_nagios( - # 10: minutes, 1: minute = 600:, 60: - $self->check_thresholds($self->{last_switch_interval}, "600:", "60:"), - sprintf "Last redo log file switch interval was %d minutes", - $self->{last_switch_interval} / 60); + my $nextlevel = $self->check_thresholds($self->{next_switch_interval}, "600:", "60:"); + my $nexttolastlevel = $self->check_thresholds($self->{nextto_last_switch_interval}, "600:", "60:"); + my $lastlevel = $self->check_thresholds($self->{last_switch_interval}, "600:", "60:"); + if ($lastlevel) { + # nachschauen, ob sich die situation schon entspannt hat + if ($nextlevel == 2) { + # das riecht nach aerger. kann zwar auch daran liegen, weil der check unmittelbar nach dem kurzen switch + # ausgefuehrt wird, aber dann bleibts beim soft-hard und beim retry schauts schon besser aus. + if ($self->{next_switch_interval} < 0) { + # jetzt geht gar nichts mehr + $self->add_nagios( + 2, + "Found a redo log with a timestamp in the future!!"); + $self->{next_switch_interval} = 0; + } else { + $self->add_nagios( + # 10: minutes, 1: minute = 600:, 60: + $nextlevel, + sprintf "Last redo log file switch interval was %d minutes%s. Next interval presumably >%d minutes", + $self->{last_switch_interval} / 60, + $self->instance_rac() ? sprintf " (thread %d)", $self->instance_thread() : "", + $self->{next_switch_interval} / 60); + } + } elsif ($nextlevel == 1) { + # das kommt daher, weil retry_interval < warningthreshold + if ($nexttolastlevel) { + # aber vorher war auch schon was faul. da braut sich vieleicht was zusammen. + # die warnung ist sicher berechtigt. + $self->add_nagios( + $nextlevel, + sprintf "Last redo log file switch interval was %d minutes%s. Next interval presumably >%d minutes. Second incident in a row.", + $self->{last_switch_interval} / 60, + $self->instance_rac() ? sprintf " (thread %d)", $self->instance_thread() : "", + $self->{next_switch_interval} / 60); + } else { + # hier bin ich grosszuegig. vorletztes intervall war ok, letztes intervall war nicht ok. + # ich rechne mir also chancen aus, dass $nextlevel nur auf warning ist, weil der retry zu schnell + # nach dem letzten switch stattfindet. sollte sich entspannen und wenns wirklich ein problem gibt + # dann kommt sowieso wieder ein switch. also erstmal ok. + $self->add_nagios( + 0, + sprintf "Last redo log file switch interval was %d minutes%s. Next interval presumably >%d minutes. Probably a single incident.", + $self->{last_switch_interval} / 60, + $self->instance_rac() ? sprintf " (thread %d)", $self->instance_thread() : "", + $self->{next_switch_interval} / 60); + } + } else { + # war wohl ein einzelfall. also gehen wir davon aus, dass das warninglevel nur wegen des retrys + # unterschritten wurde und der naechste switch wieder lange genug sein wird + $self->add_nagios( + $nextlevel, # sollte 0 sein + sprintf "Last redo log file switch interval was %d minutes%s. Next interval presumably >%d minutes", + $self->{last_switch_interval} / 60, + $self->instance_rac() ? sprintf " (thread %d)", $self->instance_thread() : "", + $self->{next_switch_interval} / 60); + } + } else { + $self->add_nagios( + $lastlevel, + sprintf "Last redo log file switch interval was %d minutes%s. Next interval presumably >%d minutes", + $self->{last_switch_interval} / 60, + $self->instance_rac() ? sprintf " (thread %d)", $self->instance_thread() : "", + $self->{next_switch_interval} / 60); + } $self->add_perfdata(sprintf "redo_log_file_switch_interval=%ds;%s;%s", $self->{last_switch_interval}, $self->{warningrange}, $self->{criticalrange}); | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/DBD/Oracle/Server/Instance/SGA/SharedPool.pm ^ |
@@ -69,11 +69,24 @@ sub init_shared_pool_free { my $self = shift; my %params = @_; - $self->{free} = $self->{handle}->fetchrow_array(q{ - SELECT ROUND((SUM(DECODE(name, 'free memory', bytes, 0)) / - SUM(bytes)) * 100,2) FROM v$sgastat - }); - if (! defined $self->{free}) { + if (DBD::Oracle::Server::return_first_server()->version_is_minimum("9.x")) { + $self->{free_percent} = $self->{handle}->fetchrow_array(q{ + SELECT ROUND(a.bytes / b.sm * 100,2) FROM + (SELECT bytes FROM v$sgastat + WHERE name='free memory' AND pool='shared pool') a, + (SELECT SUM(bytes) sm FROM v$sgastat + WHERE pool = 'shared pool' AND bytes <= + (SELECT bytes FROM v$sgastat + WHERE name='free memory' AND pool='shared pool')) b + }); + } else { + # i don't know if the above code works for 8.x, so i leave the old one here + $self->{free_percent} = $self->{handle}->fetchrow_array(q{ + SELECT ROUND((SUM(DECODE(name, 'free memory', bytes, 0)) / + SUM(bytes)) * 100,2) FROM v$sgastat where pool = 'shared pool' + }); + } + if (! defined $self->{free_percent}) { $self->add_nagios_critical("unable to get sga free"); return undef; } @@ -113,10 +126,10 @@ $self->merge_nagios($self->{dictionary_cache}); } elsif ($params{mode} eq "server::instance::sga::sharedpool::free") { $self->add_nagios( - $self->check_thresholds($self->{free}, "10:", "5:"), - sprintf "SGA shared pool free %.2f%%", $self->{free}); + $self->check_thresholds($self->{free_percent}, "10:", "5:"), + sprintf "SGA shared pool free %.2f%%", $self->{free_percent}); $self->add_perfdata(sprintf "sga_shared_pool_free=%.2f%%;%s;%s", - $self->{free}, $self->{warningrange}, $self->{criticalrange}); + $self->{free_percent}, $self->{warningrange}, $self->{criticalrange}); } elsif ($params{mode} eq "server::instance::sga::sharedpool::reloads") { $self->add_nagios( $self->check_thresholds($self->{reload_ratio}, "1", "10"), | ||
[+] | Added | check_oracle_health-1.6.8.tar.gz/plugins-scripts/Nagios/Extraopts.pm ^ |
@@ -0,0 +1,103 @@ +package Extraopts; + +use strict; +use File::Basename; +use Data::Dumper; + +sub new { + my $class = shift; + my %params = @_; + my $self = { + file => $params{file}, + commandline => $params{commandline}, + config => {}, + section => 'default_no_section', + }; + bless $self, $class; + $self->prepare_file_and_section(); + $self->init(); + return $self; +} + +sub prepare_file_and_section { + my $self = shift; + if (! defined $self->{file}) { + # ./check_stuff --extra-opts + $self->{section} = basename($0); + $self->{file} = $self->get_default_file(); + } elsif ($self->{file} =~ /^[^@]+$/) { + # ./check_stuff --extra-opts=special_opts + $self->{section} = $self->{file}; + $self->{file} = $self->get_default_file(); + } elsif ($self->{file} =~ /^@(.*)/) { + # ./check_stuff --extra-opts=@/etc/myconfig.ini + $self->{section} = basename($0); + $self->{file} = $1; + } elsif ($self->{file} =~ /^(.*?)@(.*)/) { + # ./check_stuff --extra-opts=special_opts@/etc/myconfig.ini + $self->{section} = $1; + $self->{file} = $2; + } +} + +sub get_default_file { + my $self = shift; + foreach my $default (qw(/etc/nagios/plugins.ini + /usr/local/nagios/etc/plugins.ini + /usr/local/etc/nagios/plugins.ini + /etc/opt/nagios/plugins.ini + /etc/nagios-plugins.ini + /usr/local/etc/nagios-plugins.ini + /etc/opt/nagios-plugins.ini)) { + if (-f $default) { + return $default; + } + } + return undef; +} + +sub init { + my $self = shift; + if (! defined $self->{file}) { + $self->{errors} = sprintf 'no extra-opts file specified and no default file found'; + } elsif (! -f $self->{file}) { + $self->{errors} = sprintf 'could not open %s', $self->{file}; + } else { + my $data = do { local (@ARGV, $/) = $self->{file}; <> }; + my $in_section = 'default_no_section'; + foreach my $line (split(/\n/, $data)) { + if ($line =~ /\[(.*)\]/) { + $in_section = $1; + } elsif ($line =~ /(.*)=(.*)/) { + $self->{config}->{$in_section}->{$1} = $2; + } + } + } +} + +sub is_valid { + my $self = shift; + return ! exists $self->{errors}; +} + +sub overwrite { + my $self = shift; + my %commandline = (); + if (scalar(keys %{$self->{config}->{default_no_section}}) > 0) { + foreach (keys %{$self->{config}->{default_no_section}}) { + $commandline{$_} = $self->{config}->{default_no_section}->{$_}; + } + } + if (exists $self->{config}->{$self->{section}}) { + foreach (keys %{$self->{config}->{$self->{section}}}) { + $commandline{$_} = $self->{config}->{$self->{section}}->{$_}; + } + } + foreach (keys %commandline) { + if (! exists $self->{commandline}->{$_}) { + $self->{commandline}->{$_} = $commandline{$_}; + } + } +} + + | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/check_oracle_health.pl ^ |
@@ -69,6 +69,9 @@ ['server::database::tablespace::usage', 'tablespace-usage', undef, 'Used space in tablespaces' ], + ['server::database::tablespace::free', + 'tablespace-free', undef, + 'Free space in tablespaces' ], ['server::database::tablespace::remainingfreetime', 'tablespace-remaining-time', undef, 'Remaining time until a tablespace is full' ], @@ -88,7 +91,7 @@ 'soft-parse-ratio', undef, 'Percentage of soft parses' ], ['server::instance::sga::redologbuffer::switchinterval', - 'switch-interval', ['redo-switch-interval'], + 'switch-interval', ['redo-switch-interval', 'rac-switch-interval'], 'Time between redo log file switches' ], ['server::instance::sga::redologbuffer::retryratio', 'retry-ratio', ['redo-retry-ratio'], @@ -147,6 +150,12 @@ ['server::instance::sysstat::rate', 'sysstat', undef, 'change of sysstat values over time' ], + ['server::database::flash_recovery_area::usage', + 'flash-recovery-area-usage', undef, + 'Used space in flash recovery area' ], + ['server::database::flash_recovery_area::free', + 'flash-recovery-area-free', undef, + 'Free space in flash recovery area' ], ['server::sql', 'sql', undef, 'any sql command returning a single number' ], @@ -177,7 +186,7 @@ print <<EOUS; Usage: $PROGNAME [-v] [-t <timeout>] --connect=<connect string> - --user=<username> --password=<password> --mode=<mode> + --username=<username> --password=<password> --mode=<mode> --tablespace=<tablespace> $PROGNAME [-h | --help] $PROGNAME [-V | --version] @@ -185,20 +194,10 @@ Options: --connect the connect string - --user + --username the oracle user --password the oracle user's password - --name - the name of the tablespace, datafile, wait event, - latch, enqueue, sql statement, ... - --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. --warning the warning range --critical @@ -216,13 +215,23 @@ printf "\n"; print <<EOUS; --name - specifies a tablespace, datafile, latch, enqueue, event or sql command - depending on the mode + the name of the tablespace, datafile, wait event, + latch, enqueue, or sql statement depending on the mode. --name2 - a performance data label for mode=sql + 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 Tablespace-related modes check all tablespaces in one run by default. - If only a single tablespace should be checked, use the --tablespace parameter. + 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 @@ -293,7 +302,7 @@ "verbose|v", "debug|d", "connect|c=s", - "user|u=s", + "username|u=s", "password|p=s", "mode|m=s", "tablespace=s", @@ -305,6 +314,7 @@ "perfdata", "warning=s", "critical=s", + "dbthresholds:s", "absolute|a", "basis", "lookback|l=i", @@ -315,13 +325,29 @@ "shell", "eyecandy", "encode", - "3"); + "units=s", + "ident", + "3", + "with-mymodules-dyn-dir=s", + "report=s", + "extra-opts:s"); if (! GetOptions(\%commandline, @params)) { print_help(); exit $ERRORS{UNKNOWN}; } +if (exists $commandline{'extra-opts'}) { + # read the extra file and overwrite other parameters + my $extras = Extraopts->new(file => $commandline{'extra-opts'}, commandline => \%commandline); + if (! $extras->is_valid()) { + printf "extra-opts are not valid: %s\n", $extras->{errors}; + exit $ERRORS{UNKNOWN}; + } else { + $extras->overwrite(); + } +} + if (exists $commandline{version}) { print_revision($PROGNAME, $REVISION); exit $ERRORS{OK}; @@ -361,9 +387,21 @@ } if (exists $commandline{method}) { - # tns, snmp or sqlplus + # dbi, snmp or sqlplus } else { - $commandline{method} = "tns"; + $commandline{method} = "dbi"; +} + +if (exists $commandline{report}) { + # short, long, html +} else { + $commandline{report} = "long"; +} + +if (exists $commandline{'with-mymodules-dyn-dir'}) { + $DBD::Oracle::Server::my_modules_dyn_dir = $commandline{'with-mymodules-dyn-dir'}; +} else { + $DBD::Oracle::Server::my_modules_dyn_dir = '#MYMODULES_DYN_DIR#'; } if (exists $commandline{environment}) { @@ -425,7 +463,10 @@ push(@newargv, sprintf "--%s", $option); } } - if ($runas) { + if ($runas && ($> == 0)) { + # this was not my idea. some people connect as root to their nagios clients. + exec "su", "-c", sprintf("%s %s", $0, join(" ", @newargv)), "-", $runas; + } elsif ($runas) { exec "sudo", "-S", "-u", $runas, $0, @newargv; } else { exec $0, @newargv; @@ -464,8 +505,16 @@ my $nagios_level = $ERRORS{UNKNOWN}; my $nagios_message = ""; my $perfdata = ""; - -if ((! grep { $commandline{mode} eq $_ } map { $_->[1] } @modes) && +my $racmode = 0; +if ($commandline{mode} =~ /^rac-([^\-.]+)/) { + $racmode = 1; + $commandline{mode} =~ s/^rac\-//g; +} +if ($commandline{mode} =~ /^my-([^\-.]+)/) { + my $param = $commandline{mode}; + $param =~ s/\-/::/g; + push(@modes, [$param, $commandline{mode}, undef, 'my extension']); +} elsif ((! grep { $commandline{mode} eq $_ } map { $_->[1] } @modes) && (! grep { $commandline{mode} eq $_ } map { defined $_->[2] ? @{$_->[2]} : () } @modes)) { printf "UNKNOWN - mode %s\n", $commandline{mode}; print_usage(); @@ -481,16 +530,24 @@ ( defined $_->[2] && grep { $commandline{mode} eq $_ } @{$_->[2]}) } @modes )[0], - - method => $commandline{method}, + cmdlinemode => $commandline{mode}, + racmode => $racmode, + method => $commandline{method} || + $ENV{NAGIOS__SERVICEORACLE_METH} || + $ENV{NAGIOS__HOSTORACLE_METH} || 'dbi', connect => $commandline{connect} || - $ENV{NAGIOS__SERVICEORACLE_SID} || $ENV{ORACLE_SID}, - user => $commandline{user} || - $ENV{NAGIOS__SERVICEORACLE_USER}, + $ENV{NAGIOS__SERVICEORACLE_SID} || + $ENV{NAGIOS__HOSTORACLE_SID} || + $ENV{ORACLE_SID}, + username => $commandline{username} || + $ENV{NAGIOS__SERVICEORACLE_USER} || + $ENV{NAGIOS__HOSTORACLE_USER}, password => $commandline{password} || - $ENV{NAGIOS__SERVICEORACLE_PASSWORD}, + $ENV{NAGIOS__SERVICEORACLE_PASS} || + $ENV{NAGIOS__HOSTORACLE_PASS}, warningrange => $commandline{warning}, criticalrange => $commandline{critical}, + dbthresholds => $commandline{dbthresholds}, absolute => $commandline{absolute}, lookback => $commandline{lookback}, tablespace => $commandline{tablespace}, @@ -498,9 +555,14 @@ basis => $commandline{basis}, selectname => $commandline{name} || $commandline{tablespace} || $commandline{datafile}, regexp => $commandline{regexp}, + name => $commandline{name}, name2 => $commandline{name2} || $commandline{name}, + units => $commandline{units}, eyecandy => $commandline{eyecandy}, statefilesdir => $STATEFILESDIR, + ident => $commandline{ident}, + verbose => $commandline{verbose}, + report => $commandline{report}, ); my $server = undef; @@ -516,8 +578,3 @@ printf " | %s", $perfdata if $perfdata; printf "\n"; exit $nagios_level; - - -__END__ - - | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/plugins-scripts/subst.in ^ |
@@ -48,22 +48,12 @@ /^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } } -# If a script contains a reference to a fully qualified command, -# subst will replace the fully qualified command with whatever is -# returned from the which subroutine -# -/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { - match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); - c=substr($0,RSTART,RLENGTH); - newc=which(c,path); - sub(c,newc); -} - # Replace the placeholders with the values from configure /#PERL#/ {sub(/#PERL#/,"@PERL@");} /#GZIP#/ {sub(/#GZIP#/,"@GZIP@");} /#STATEFILES_DIR#/ {sub(/#STATEFILES_DIR#/,"@STATEFILES_DIR@");} /#PACKAGE_VERSION#/ {sub(/#PACKAGE_VERSION#/,"@PACKAGE_VERSION@");} +/#MYMODULES_DYN_DIR#/ {sub(/#MYMODULES_DYN_DIR#/,"@MYMODULES_DYN_DIR@");} { print; | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/t/Makefile.in ^ |
@@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,10 +13,13 @@ # PARTICULAR PURPOSE. @SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -45,6 +48,7 @@ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ @@ -60,7 +64,6 @@ ECHO_T = @ECHO_T@ GREP = @GREP@ GZIP = @GZIP@ -INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_OPTS = @INSTALL_OPTS@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -70,7 +73,8 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ +MYMODULES_DIR = @MYMODULES_DIR@ +MYMODULES_DYN_DIR = @MYMODULES_DYN_DIR@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -89,10 +93,7 @@ SUPPORT = @SUPPORT@ VERSION = @VERSION@ WARRANTY = @WARRANTY@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ +ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -102,39 +103,28 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ -builddir = @builddir@ datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ -htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ -localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ with_nagios_group = @with_nagios_group@ with_nagios_user = @with_nagios_user@ AUTOMAKE_OPTIONS = 1.3 no-dependencies @@ -180,6 +170,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +uninstall-info-am: tags: TAGS TAGS: @@ -188,21 +179,22 @@ distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -261,20 +253,12 @@ install-data-am: -install-dvi: install-dvi-am - install-exec-am: -install-html: install-html-am - install-info: install-info-am install-man: -install-pdf: install-pdf-am - -install-ps: install-ps-am - installcheck-am: maintainer-clean: maintainer-clean-am @@ -293,19 +277,16 @@ ps-am: -uninstall-am: - -.MAKE: install-am install-strip +uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am tests: | ||
[+] | Changed | check_oracle_health-1.6.8.tar.gz/t/check_oracle_health.t ^ |
@@ -80,7 +80,7 @@ cmp_ok( $result->return_code, '==', 0, "connect ok"); like( $result->output, "/OK - connection established/", "Expected output tnsping"); - $result = NPTest->testCmd("./check_oracle_health $oracle_login_details --mode=connection-time"); + $result = NPTest->testCmd("./check_oracle_health $oracle_login_details --mode=connection-time --warning=10 --critical=20"); cmp_ok( $result->return_code, '==', 0, "connect ok"); like( $result->output, "/OK - (\\d+\\.\\d+) seconds to connect | connection_time=(\\d+\\.\\d+);1;5/", "Expected output connection-time"); diag("./check_oracle_health $oracle_login_details --mode=connection-time"); @@ -265,7 +265,7 @@ } SKIP: { - diag("tablespace"); + diag("tablespace usage"); $result = NPTest->testCmd("./check_oracle_health $oracle_login_details --mode=tablespace-usage"); like( $result->output, '/tbs (\w+) usage is ([\.0-9]+)%, tbs (\w+) usage is ([\.0-9]+)%, .* \'tbs_(\w+)_usage_pct\'=([\.0-9]+)%;([\.0-9:]+);([\.0-9:]+) \'tbs_(\w+)_usage\'=(\d+)MB;\d+;\d+;0;\d+ \'tbs_users_alloc\'=(\d+)MB;;;0;(\d+) \'tbs_(\w+)_usage_pct\'=([\.0-9]+)%;([\.0-9:]+);([\.0-9:]+) \'tbs_(\w+)_usage\'=(\d+)MB;\d+;\d+;0;\d+ \'tbs_(\w+)_alloc\'=(\d+)MB;;;0;(\d+)/', "Expected message tbs usage"); $result = NPTest->testCmd("./check_oracle_health $oracle_login_details --mode=tablespace-usage --tablespace=USERS"); @@ -281,6 +281,14 @@ } SKIP: { + diag("tablespace free"); + $result = NPTest->testCmd("./check_oracle_health $oracle_login_details --mode=tablespace-free --name=SYSTEM"); + like( $result->output, '/tbs SYSTEM has ([\.0-9]+)% free space left .* \'tbs_system_free_pct\'=([\.0-9]+)%;([\.0-9]+):;([\.0-9]+): \'tbs_system_free\'=([\.0-9]+)MB;([\.0-9]+):;([\.0-9]+):;0;([\.0-9]+)/'); + $result = NPTest->testCmd("./check_oracle_health $oracle_login_details --mode=tablespace-free --name=SYSTEM --units=KB"); + like( $result->output, '/tbs SYSTEM has ([\.0-9]+)KB free space left .* \'tbs_system_free_pct\'=([\.0-9]+)%;([\.0-9]+):;([\.0-9]+): \'tbs_system_free\'=([\.0-9]+)KB;([\.0-9]+):;([\.0-9]+):;0;([\.0-9]+)/'); +} + +SKIP: { diag ("parser"); $result = NPTest->testCmd("./check_oracle_health $oracle_login_details --mode=soft-parse-ratio"); like( $result->output, '/Soft parse ratio ([\.0-9]+)% \| soft_parse_ratio=([\.0-9]+)%;(\d+):;(\d+):/', "Expected ratio"); @@ -437,6 +445,25 @@ $result->output =~ /CRITICAL - so a kaas: ([\d]+) \| 'so a kaas'=([\d]+);1;5/; ok($1 == $2); diag($result->output); + + my $hash = NPTest->testCmd("echo 'select 4/3 from dual' | ./check_oracle_health $oracle_login_details --mode=encode")->output; + ok($hash eq "select%204%2F3%20from%20dual"); + $result = NPTest->testCmd("./check_oracle_health $oracle_login_details --mode=sql --name=$hash --name2=calc"); + my $match = 'WARNING \- calc\: 1\.33 | \'calc\'=1\.33;1;5'; + like( $result->output, '/'.$match.'/'); + $result = NPTest->testCmd("./check_oracle_health $oracle_login_details --mode=sql --name=$hash --name2=calc --units=B"); + $match = 'WARNING \- calc\: 1\.33B | \'calc\'=1\.33B;1;5'; + like( $result->output, '/'.$match.'/'); + + $hash = NPTest->testCmd("echo 'select 4/2 from dual' | ./check_oracle_health $oracle_login_details --mode=encode")->output; + ok($hash eq "select%204%2F2%20from%20dual"); + $result = NPTest->testCmd("./check_oracle_health $oracle_login_details --mode=sql --name=$hash --name2=calc"); + $match = 'WARNING \- calc\: 2 | \'calc\'=2;1;5'; + like( $result->output, '/'.$match.'/'); + $result = NPTest->testCmd("./check_oracle_health $oracle_login_details --mode=sql --name=$hash --name2=calc --units=B"); + $match = 'WARNING \- calc\: 2B | \'calc\'=2B;1;5'; + like( $result->output, '/'.$match.'/'); + } | ||
Deleted | check_oracle_health-1.6.tar.gz ^ |