[monitoring-plugins] check_mysql: Allow sockets to be specified to -H
Jacob Hansen
git at monitoring-plugins.org
Thu Mar 21 17:50:16 CET 2019
Module: monitoring-plugins
Branch: master
Commit: 2bc4cc99d2c3fdbbd06af862cb0ae1098895f860
Author: Robin Sonefors <robin.sonefors at op5.com>
Committer: Jacob Hansen <jhansen at op5.com>
Date: Fri May 10 17:21:34 2013 +0200
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=2bc4cc9
check_mysql: Allow sockets to be specified to -H
The help text says that -H accepts a "unix socket (must be an absolute
path)". Now that actually corresponds to reality.
Signed-off-by: Robin Sonefors <robin.sonefors at op5.com>
---
plugins/check_mysql.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 5773afd..0cba50e 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -379,6 +379,9 @@ process_arguments (int argc, char **argv)
if (is_host (optarg)) {
db_host = optarg;
}
+ else if (*optarg == '/') {
+ db_socket = optarg;
+ }
else {
usage2 (_("Invalid hostname/address"), optarg);
}
More information about the Commits
mailing list