[monitoring-plugins] check_by_ssh: added --hostname support

Sven Nierlein git at monitoring-plugins.org
Wed Aug 6 16:00:07 CEST 2014


 Module: monitoring-plugins
 Branch: master
 Commit: 57fb03cea59c266a0930c3a368cbed40bbc66169
 Author: Sven Nierlein <sven at nierlein.de>
   Date: Wed Aug  6 15:51:18 2014 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=57fb03c

check_by_ssh: added --hostname support

just like the guidelines and the help already suggests.

Signed-off-by: Sven Nierlein <sven at nierlein.de>

---

 plugins/check_by_ssh.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c
index 58f333d..a877f88 100644
--- a/plugins/check_by_ssh.c
+++ b/plugins/check_by_ssh.c
@@ -169,7 +169,8 @@ process_arguments (int argc, char **argv)
 		{"verbose", no_argument, 0, 'v'},
 		{"fork", no_argument, 0, 'f'},
 		{"timeout", required_argument, 0, 't'},
-		{"host", required_argument, 0, 'H'},
+		{"host", required_argument, 0, 'H'},    /* backward compatibility */
+		{"hostname", required_argument, 0, 'H'},
 		{"port", required_argument,0,'p'},
 		{"output", required_argument, 0, 'O'},
 		{"name", required_argument, 0, 'n'},



More information about the Commits mailing list