From f9a942d2a11e70ee68d5ea2c9aa762bff004bf43 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 7 Apr 2011 17:24:23 +0200 Subject: Initial version of the 'check_dbi' plugin. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This plugin connects to an SQL database using libdbi, thus supporting all database backends supported by libdbi. It will then issue the specified SQL query and check the result (the numeric value of the first column of the first row to be precise) against the specified warning/critical ranges. The performance data includes the connection time (µs-resolution as provided by gettimeofday()) and the query result. --- configure.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index e8fc7892..072d674d 100644 --- a/configure.in +++ b/configure.in @@ -255,6 +255,19 @@ fi LIBS="$_SAVEDLIBS" CPPFLAGS="$_SAVEDCPPFLAGS" +dnl Check for DBI libraries +_SAVEDLIBS="$LIBS" +AC_CHECK_LIB(dbi,dbi_initialize) +if test "$ac_cv_lib_dbi_dbi_initialize" = "yes"; then + EXTRAS="$EXTRAS check_dbi" + DBILIBS="-ldbi" + AC_SUBST(DBILIBS) +else + AC_MSG_WARN([Skipping dbi plugin]) + AC_MSG_WARN([install DBI libs to compile this plugin (see REQUIREMENTS).]) +fi +LIBS="$_SAVEDLIBS" + dnl Check for radius libraries _SAVEDLIBS="$LIBS" AC_CHECK_LIB(radiusclient,rc_read_config) -- cgit v1.2.3-74-g34f1