Module: check_mk
Branch: master
Commit: 34f45af94ce9ee14c0331515371361bb10ac4790
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=34f45af94ce9ee…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Dec 4 12:43:52 2014 +0100
#1628 FIX Remove trailing backslashes from service descriptions
The Nagios core does not support these. But it can happen e.g. due to trailing
backslashes in the names of network interfaces.
---
.werks/1628 | 10 ++++++++++
ChangeLog | 1 +
modules/check_mk.py | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1628 b/.werks/1628
new file mode 100644
index 0000000..b318c85
--- /dev/null
+++ b/.werks/1628
@@ -0,0 +1,10 @@
+Title: Remove trailing backslashes from service descriptions
+Level: 1
+Component: core
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417693356
+Class: fix
+
+The Nagios core does not support these. But it can happen e.g. due to trailing
+backslashes in the names of network interfaces.
diff --git a/ChangeLog b/ChangeLog
index 128ace9..66eb805 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
* 1555 FIX: Improved validation on timeperiod references of non existing periods...
* 1574 FIX: Hosts named like used python modules do not break precompiled checks
anymore...
* 1624 FIX: Remove illegal characters from service descriptions of active checks...
+ * 1628 FIX: Remove trailing backslashes from service descriptions...
Checks & Agents:
* 1197 climaveneta_temp: New check for temperature sensors on Climaveneta clima
devices
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 2065584..0e7ed51 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1353,7 +1353,7 @@ def exit_code_spec(hostname):
# Remove illegal characters from a service description
def sanitize_service_description(descr):
- return "".join([ c for c in descr if c not in nagios_illegal_chars ])
+ return "".join([ c for c in descr if c not in nagios_illegal_chars
]).rstrip("\\")
def service_description(check_type, item):