Module: check_mk
Branch: master
Commit: 96c0a62c4d372bcd6432527227110fe4cb28043d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=96c0a62c4d372b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 24 11:25:46 2014 +0100
FIX Do not allow spaces in host names in event simulator
Spaces are not allowed because that breaks the syslog message format.
---
.werks/680 | 9 +++++++++
ChangeLog | 1 +
mkeventd/web/plugins/wato/mkeventd.py | 5 ++++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/680 b/.werks/680
new file mode 100644
index 0000000..290446b
--- /dev/null
+++ b/.werks/680
@@ -0,0 +1,9 @@
+Title: Do not allow spaces in host names in event simulator
+Level: 1
+Component: ec
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1390559112
+
+Spaces are not allowed because that breaks the syslog message format.
diff --git a/ChangeLog b/ChangeLog
index 4e991f8..24ba9df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -242,6 +242,7 @@
* 0384 FIX: Trying to prevent problem when restarting mkeventd...
* 0427 FIX: Fixed exception when handling connections from event unix socket...
* 0679 FIX: Allow non-Ascii characters in generated events
+ * 0680 FIX: Do not allow spaces in host names in event simulator...
Livestatus:
* 0337 New header for limiting the execution time of a query...
diff --git a/mkeventd/web/plugins/wato/mkeventd.py
b/mkeventd/web/plugins/wato/mkeventd.py
index ce555ab..5aae1a3 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -680,7 +680,10 @@ vs_mkeventd_event = Dictionary(
size = 40,
default_value = _("myhost089"),
allow_empty = True,
- attrencode = True)
+ attrencode = True,
+ regex = "^\\S*$",
+ regex_error = _("The host name may not contain spaces."),
+ )
),
( "priority",
DropdownChoice(