Module: monitoring-plugins
    Branch: master
    Commit: 2bc4cc99d2c3fdbbd06af862cb0ae1098895f860
    Author: Robin Sonefors <[email protected]>
 Committer: Jacob Hansen <[email protected]>
      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 <[email protected]>

---

 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);
                        }

Reply via email to