Module: check_mk
Branch: master
Commit: ba73cd5edf98d0dbdd4f79468f41ff4f83c880e1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ba73cd5edf98d0…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Mar 14 11:03:45 2014 +0100
FIX Fixed unwanted handling of hostname as regex
Cause of a bug every hostname was treated as regex.
---
.werks/140 | 8 ++++++++
ChangeLog | 1 +
modules/check_mk.py | 2 +-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/.werks/140 b/.werks/140
new file mode 100644
index 0000000..93ea366
--- /dev/null
+++ b/.werks/140
@@ -0,0 +1,8 @@
+Title: Fixed unwanted handling of hostname as regex
+Level: 1
+Component: core
+Version: 1.2.5i1
+Date: 1394791132
+Class: fix
+
+Cause of a bug every hostname was treated as regex.
diff --git a/ChangeLog b/ChangeLog
index c35d1d3..2bc3ce0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@
* 0267 FIX: Fixed auth.serials permission problem in check_mk standalone
installation...
* 0282 FIX: TIMEPERIOD TRANSITION messages no longer cut at 64 bytes...
* 0730 FIX: cmc: fixed bug displaying logentries after a logfile rotation...
+ * 0140 FIX: Fixed unwanted handling of hostname as regex...
Checks & Agents:
* 0306 esx_vsphere_counters: added missing ramdisk levels sfcbtickets
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 12e77b2..fffad57 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1871,7 +1871,7 @@ def in_extraconf_hostlist(hostlist, hostname):
if not use_regex and hostname == hostentry:
return not negate
# Handle Regex
- elif regex(hostentry).match(hostname):
+ elif use_regex and regex(hostentry).match(hostname):
return not negate
except MKGeneralException:
if opt_debug: