Module: check_mk
Branch: master
Commit: 21dc05eb26223b2cc79716ef59732542bd9f070a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=21dc05eb26223b…
Author: Bastian Kuhn <bk(a)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"),