Module: check_mk
Branch: master
Commit: f3a2e5003b35664ca71f72c5b60778b2cd379873
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f3a2e5003b3566…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Sun Nov 1 13:47:23 2015 +0100
#2443 FIX Fixed quoting of ! in classical nagios checks configured via WATO
Any <i>!</i> character configured in the WATO rule </i>Classical active
and passive Monitoring checks</i>
or through the command line via custom_checks was incorrectly quoted. Nagios truncated the
command
at the !, which lead to unwanted results.
---
.werks/2443 | 11 +++++++++++
ChangeLog | 1 +
modules/nagios.py | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/2443 b/.werks/2443
new file mode 100644
index 0000000..5eebfb4
--- /dev/null
+++ b/.werks/2443
@@ -0,0 +1,11 @@
+Title: Fixed quoting of ! in classical nagios checks configured via WATO
+Level: 1
+Component: core
+Compatible: compat
+Version: 1.2.7i4
+Date: 1446381757
+Class: fix
+
+Any <i>!</i> character configured in the WATO rule </i>Classical active
and passive Monitoring checks</i>
+or through the command line via custom_checks was incorrectly quoted. Nagios truncated
the command
+at the !, which lead to unwanted results.
diff --git a/ChangeLog b/ChangeLog
index 57faf12..71bce4c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1.2.7i4:
Core & Setup:
* 2682 FIX: Fixed exception Error creating configuration: global name
'extra_host_attributes' is not defined
+ * 2443 FIX: Fixed quoting of ! in classical nagios checks configured via WATO...
Checks & Agents:
* 2434 NetApp monitoring: Cluster-Mode is now supported, changes in existing 7Mode
checks...
diff --git a/modules/nagios.py b/modules/nagios.py
index f369af0..7f51276 100644
--- a/modules/nagios.py
+++ b/modules/nagios.py
@@ -559,7 +559,7 @@ define service {
continue
if command_line:
- command_line = autodetect_plugin(command_line).replace("\\",
"\\\\")
+ command_line = autodetect_plugin(command_line).replace("\\",
"\\\\").replace("!", "\\!")
if "freshness" in entry:
freshness = " check_freshness\t\t1\n" + \