Module: check_mk
Branch: master
Commit: e37fe1ee722c1d3147bc54c8ff8489b5416f11af
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e37fe1ee722c1d…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jun 6 13:34:27 2013 +0200
fileinfo: no longer inventorize missing files
---
ChangeLog | 1 +
checks/fileinfo | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 63adc24..fae1738 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,7 @@
cache file is twice the maximum cache age
* windows agent: no longer tries to execute directories
* esx_vsphere_datastores: Fix incomplete performance data
+ * fileinfo: no longer inventorize missing files(reported by windows agent)
Notifications:
* Flexible Notification can now filter service levels
diff --git a/checks/fileinfo b/checks/fileinfo
index d922d49..f224d14 100644
--- a/checks/fileinfo
+++ b/checks/fileinfo
@@ -47,6 +47,8 @@ def inventory_fileinfo(info, case):
added_groups = []
for line in info:
if len(line) >= 3:
+ if line[1] == "missing":
+ continue
groups = fileinfo_groups_of_file(line[0])
if case == 'single' and len(groups) == 0:
inventory.append((line[0], {}));
@@ -84,7 +86,7 @@ def check_fileinfo(item, params, info):
for line in info[1:]:
if item == line[0]:
if line[1] == "missing":
- return (3, "File is missing")
+ return (3, "File not found")
state = 0
size = int(line[1])
age = reftime - int(line[2])