Module: check_mk
Branch: master
Commit: ad11ff1383444b9b3119eadd2bcc64b9e9caac6a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ad11ff1383444b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Mar 4 16:40:33 2013 +0100
mounts: ignore multiple occurrances of the same device
---
ChangeLog | 1 +
checks/mounts | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 83f8560..a740f57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@
new param average: average the values over the given minute
new param post can now be configured via int and float, now
supports percentage values
+ * mounts: ignore multiple occurrances of the same device
Livestatus:
* Table statehist: Improved detection of vanished hosts and services.
diff --git a/checks/mounts b/checks/mounts
index 46eca5c..1fa7cc6 100644
--- a/checks/mounts
+++ b/checks/mounts
@@ -26,8 +26,10 @@
def inventory_mounts(info):
inventory = []
+ devices = []
for dev, mp, fstype, options, dump, fsck in info:
- if fstype not in [ 'tmpfs' ]:
+ if fstype not in [ 'tmpfs' ] and dev not in devices:
+ devices.append(dev)
opts = options.split(",")
opts.sort()
inventory.append( (mp, opts) )