Module: check_mk
Branch: master
Commit: 38ea39e5bf66507fe004d2b77b81f658614761d5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=38ea39e5bf6650…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Nov 20 10:03:31 2013 +0100
Supporting float values as SNMP timeout value now
In some cases it is useful to define a more specific value than
full seconds. So WATO accepts float values for the timeout now.
---
.werks/216 | 9 +++++++++
ChangeLog | 1 +
modules/check_mk.py | 2 +-
web/plugins/wato/check_mk_configuration.py | 5 +++--
4 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/216 b/.werks/216
new file mode 100644
index 0000000..63e6059
--- /dev/null
+++ b/.werks/216
@@ -0,0 +1,9 @@
+Title: Supporting float values as SNMP timeout value now
+Level: 1
+Component: wato
+Version: 1.2.3i7
+Date: 1384938098
+Class: feature
+
+In some cases it is useful to define a more specific value than
+full seconds. So WATO accepts float values for the timeout now.
diff --git a/ChangeLog b/ChangeLog
index 466a33b..6439fe9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,7 @@
WATO:
* 0053 New rule for configuring the display_name of a service...
+ * 0216 Supporting float values as SNMP timeout value now...
* 0048 FIX: Fixed locking issue on host diagnose page
* 0033 FIX: WATO forms: incorrect handling of checkbox state
* 0205 FIX: Allowing star chars in variable names to fix role/permission editing...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 06bca4a..91af074 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -745,7 +745,7 @@ def snmp_base_command(what, hostname):
# Configuration of timing and retries
settings = snmp_timing_of(hostname)
if "timeout" in settings:
- options += " -t %d" % settings["timeout"]
+ options += " -t %0.2f" % settings["timeout"]
if "retries" in settings:
options += " -r %d" % settings["retries"]
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index d7229e0..48bf6d6 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -2027,13 +2027,14 @@ register_rule(group,
"for the SNMP access to devices."),
elements = [
( "timeout",
- Integer(
+ Float(
title = _("Timeout between retries"),
help = _("A request is sent to the SNMP daemon, than wait up to
this "
" number of seconds until retrying."),
default_value = 1,
- minvalue = 1,
+ minvalue = 0.5,
maxvalue = 60,
+ allow_int = True,
unit = _("sec"),
),
),