Module: check_mk
Branch: master
Commit: 473f2fee2bae165b43d72a532f40eb1f91bef6f4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=473f2fee2bae16…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Dec 11 13:37:35 2015 +0100
#1317 FIX fileinfo.groups: Fixed handling of $DATE pattern
Before that fix the feature to use the current date as match criteria for fileinfo groups
only worked
when the filename started with the date. Now the date not longer have to be at the
beginning of the filename.
---
.werks/1317 | 13 +++++++++++++
ChangeLog | 1 +
checks/fileinfo | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/1317 b/.werks/1317
new file mode 100644
index 0000000..2e1f5a6
--- /dev/null
+++ b/.werks/1317
@@ -0,0 +1,13 @@
+Title: fileinfo.groups: Fixed handling of $DATE pattern
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1449837223
+
+Before that fix the feature to use the current date as match criteria for fileinfo groups
only worked
+when the filename started with the date. Now the date not longer have to be at the
beginning of the filename.
+
+
diff --git a/ChangeLog b/ChangeLog
index 4f8ba5e..a60cfa2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -152,6 +152,7 @@
* 2861 FIX: hivemanager_devices: Fixed configuration of states to treat as WARN
* 1312 FIX: carel_uniflair_cooling: Check is now disabled...
* 2868 FIX: cpu_util.include: fixed crash on some systems if per-core statistics were
enabled...
+ * 1317 FIX: fileinfo.groups: Fixed handling of $DATE pattern...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/fileinfo b/checks/fileinfo
index a1c3f2d..77f2636 100644
--- a/checks/fileinfo
+++ b/checks/fileinfo
@@ -61,7 +61,7 @@ def inventory_fileinfo(info, case):
return inventory
def fileinfo_process_date(pattern,reftime):
- disect = re.match('(/.*/)\$DATE:((?:%\w.?){1,})\$(.*)',pattern)
+ disect = re.match('(/.*)\$DATE:((?:%\w.?){1,})\$(.*)',pattern)
if disect:
prefix = disect.group(1)
datepattern = time.strftime(disect.group(2),time.localtime(reftime))