summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2006-03-17 14:07:34 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2006-03-17 14:07:34 (GMT)
commit2db2f402a3bb0c948667c1401b733014fe90a718 (patch)
treed389192fa3385893f2c4492a98db6ef4790efd32 /plugins
parent2b10c19323e2415433db55ac4bfa0604294fa43d (diff)
downloadmonitoring-plugins-2db2f402a3bb0c948667c1401b733014fe90a718.tar.gz
mysql detection cleanup: fixes runtime linking, autodetection of main
locations, detection of lib64 and different layouts git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1327 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Makefile.am2
-rw-r--r--plugins/check_mysql.c4
-rw-r--r--plugins/check_mysql_query.c4
-rw-r--r--plugins/t/check_mysql.t2
4 files changed, 7 insertions, 5 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 7f9d745..9a1f6d0 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -63,7 +63,9 @@ check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS)
63check_load_LDADD = $(BASEOBJS) popen.o 63check_load_LDADD = $(BASEOBJS) popen.o
64check_mrtg_LDADD = $(BASEOBJS) 64check_mrtg_LDADD = $(BASEOBJS)
65check_mrtgtraf_LDADD = $(BASEOBJS) 65check_mrtgtraf_LDADD = $(BASEOBJS)
66check_mysql_CPPFLAGS = $(MYSQLINCLUDE)
66check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS) 67check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS)
68check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE)
67check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS) 69check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS)
68check_nagios_LDADD = $(BASEOBJS) runcmd.o 70check_nagios_LDADD = $(BASEOBJS) runcmd.o
69check_nt_LDADD = $(NETLIBS) 71check_nt_LDADD = $(NETLIBS)
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 92ac7ff..9d547dd 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -25,8 +25,8 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
25#include "utils.h" 25#include "utils.h"
26#include "netutils.h" 26#include "netutils.h"
27 27
28#include <mysql/mysql.h> 28#include <mysql.h>
29#include <mysql/errmsg.h> 29#include <errmsg.h>
30 30
31char *db_user = NULL; 31char *db_user = NULL;
32char *db_host = NULL; 32char *db_host = NULL;
diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c
index 321af7a..b542fb4 100644
--- a/plugins/check_mysql_query.c
+++ b/plugins/check_mysql_query.c
@@ -22,8 +22,8 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
22#include "utils.h" 22#include "utils.h"
23#include "netutils.h" 23#include "netutils.h"
24 24
25#include <mysql/mysql.h> 25#include <mysql.h>
26#include <mysql/errmsg.h> 26#include <errmsg.h>
27 27
28char *db_user = NULL; 28char *db_user = NULL;
29char *db_host = NULL; 29char *db_host = NULL;
diff --git a/plugins/t/check_mysql.t b/plugins/t/check_mysql.t
index 78413c6..852926a 100644
--- a/plugins/t/check_mysql.t
+++ b/plugins/t/check_mysql.t
@@ -48,7 +48,7 @@ SKIP: {
48 $result = NPTest->testCmd("./check_mysql -H $mysqlserver $mysql_login_details"); 48 $result = NPTest->testCmd("./check_mysql -H $mysqlserver $mysql_login_details");
49 cmp_ok( $result->return_code, '==', 0, "Login okay"); 49 cmp_ok( $result->return_code, '==', 0, "Login okay");
50 50
51 $result = NPTest->testCmd("./check_mysql -H $mysqlserver -u dummy"); 51 $result = NPTest->testCmd("./check_mysql -H $mysqlserver -u dummy -pdummy");
52 cmp_ok( $result->return_code, '==', 2, "Login failure"); 52 cmp_ok( $result->return_code, '==', 2, "Login failure");
53 like( $result->output, $bad_login_output, "Expected login failure message"); 53 like( $result->output, $bad_login_output, "Expected login failure message");
54 54