Module: check_mk
Branch: master
Commit: 91f1cfb7d543f79a18552a193ed3ac5ad0973176
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=91f1cfb7d543f7…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Dec 2 15:56:15 2015 +0100
#2805 FIX ps: Now able to monitor processes which contain + characters
Any + character in process name, e.g <i>asm_diag_+ASM1</i> was interpreted
as regular expression special character.
Such processes could be found during the service discovery.
The check function however, was unable to find this process again, because
of the incorrect escaped + character.
---
.werks/2805 | 14 ++++++++++++++
ChangeLog | 1 +
checks/ps.include | 2 +-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/2805 b/.werks/2805
new file mode 100644
index 0000000..fa7e53f
--- /dev/null
+++ b/.werks/2805
@@ -0,0 +1,14 @@
+Title: ps: Now able to monitor processes which contain + characters
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1449067758
+Class: fix
+
+Any + character in process name, e.g <i>asm_diag_+ASM1</i> was interpreted
+as regular expression special character.
+
+Such processes could be found during the service discovery.
+The check function however, was unable to find this process again, because
+of the incorrect escaped + character.
diff --git a/ChangeLog b/ChangeLog
index 3b4d145..be7800d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -126,6 +126,7 @@
* 2856 FIX: winperf_phydisk: Not discovering on clusters where disk perfcounters are
missing...
* 2875 FIX: citrix_farm.ps1: Add missing end marker of piggy data - fixes problem in
subsequent plugins
* 2857 FIX: fritz.conn: Handling missing connection state infos as UNKNOWN
+ * 2805 FIX: ps: Now able to monitor processes which contain + characters...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/ps.include b/checks/ps.include
index 5ebc422..86b3bf6 100644
--- a/checks/ps.include
+++ b/checks/ps.include
@@ -153,7 +153,7 @@ def instantiate_regex_pattern_once(pattern, match):
def escape_regex_chars(match):
r = ""
for c in match:
- if c in r"[]\().?{}|*^$":
+ if c in r"[]\().?{}|*^$+":
r += "\\"
r += c
return r