diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-17 14:07:34 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-17 14:07:34 +0000 |
commit | 2db2f402a3bb0c948667c1401b733014fe90a718 (patch) | |
tree | d389192fa3385893f2c4492a98db6ef4790efd32 /plugins | |
parent | 2b10c19323e2415433db55ac4bfa0604294fa43d (diff) | |
download | monitoring-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.am | 2 | ||||
-rw-r--r-- | plugins/check_mysql.c | 4 | ||||
-rw-r--r-- | plugins/check_mysql_query.c | 4 | ||||
-rw-r--r-- | plugins/t/check_mysql.t | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 7f9d7456..9a1f6d09 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am | |||
@@ -63,7 +63,9 @@ check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS) | |||
63 | check_load_LDADD = $(BASEOBJS) popen.o | 63 | check_load_LDADD = $(BASEOBJS) popen.o |
64 | check_mrtg_LDADD = $(BASEOBJS) | 64 | check_mrtg_LDADD = $(BASEOBJS) |
65 | check_mrtgtraf_LDADD = $(BASEOBJS) | 65 | check_mrtgtraf_LDADD = $(BASEOBJS) |
66 | check_mysql_CPPFLAGS = $(MYSQLINCLUDE) | ||
66 | check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS) | 67 | check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS) |
68 | check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE) | ||
67 | check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS) | 69 | check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS) |
68 | check_nagios_LDADD = $(BASEOBJS) runcmd.o | 70 | check_nagios_LDADD = $(BASEOBJS) runcmd.o |
69 | check_nt_LDADD = $(NETLIBS) | 71 | check_nt_LDADD = $(NETLIBS) |
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 92ac7ff0..9d547ddd 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 | ||
31 | char *db_user = NULL; | 31 | char *db_user = NULL; |
32 | char *db_host = NULL; | 32 | char *db_host = NULL; |
diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c index 321af7aa..b542fb44 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 | ||
28 | char *db_user = NULL; | 28 | char *db_user = NULL; |
29 | char *db_host = NULL; | 29 | char *db_host = NULL; |
diff --git a/plugins/t/check_mysql.t b/plugins/t/check_mysql.t index 78413c6e..852926a7 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 | ||