[checkmk-commits] Check_MK Git: check_mk: check_ftp: Now it' s possible to specify a port in wato configuration

Bastian Kuhn bk at mathias-kettner.de
Fri Feb 6 10:56:16 CET 2015


Module: check_mk
Branch: master
Commit: 21dc05eb26223b2cc79716ef59732542bd9f070a
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=21dc05eb26223b2cc79716ef59732542bd9f070a

Author: Bastian Kuhn <bk at mathias-kettner.de>
Date:   Fri Feb  6 10:56:12 2015 +0100

check_ftp: Now it's possible to specify a port in wato configuration

---

 checks/check_ftp                  |    3 +++
 web/plugins/wato/active_checks.py |    6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/checks/check_ftp b/checks/check_ftp
index bc47fae..c9b177d 100644
--- a/checks/check_ftp
+++ b/checks/check_ftp
@@ -33,6 +33,9 @@ def check_ftp_arguments(params):
 
     args = ' -H %s' % quote_shell_string(host)
 
+    if "port" in settings:
+        args += ' -p %d' % settings['port']
+
     if "response_time" in settings:
         args += ' -w %f -c %f' % (
             settings["response_time"][0]/1000.0,
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 52f63fe..6c7bf48 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -232,6 +232,12 @@ register_rule(group,
     Transform(
         Dictionary(
             elements = [
+                ("port",
+                    Integer(
+                        title = _("Portnumber"),
+                        default_value = 21,
+                        )
+                ),
                 ( "response_time",
                   Tuple(
                       title = _("Expected response time"),



More information about the checkmk-commits mailing list