Module: check_mk
Branch: master
Commit: 7aae2def06fdc7faa46e93e06148acd7322a4098
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7aae2def06fdc7…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Feb 22 16:15:50 2017 +0100
FIX LVM Volume Groups: fixed broken WATO configuration
Change-Id: I6145fda2e5da35d5353337ba784c3856beb74f5f
---
.werks/4031 | 14 ++++++++++++++
web/plugins/wato/check_parameters.py | 30 +++++++++++++++++++++---------
2 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/.werks/4031 b/.werks/4031
new file mode 100644
index 0000000..3cff2a1
--- /dev/null
+++ b/.werks/4031
@@ -0,0 +1,14 @@
+Title: LVM Volume Groups: fixed broken WATO configuration
+Level: 1
+Component: wato
+Class: fix
+Compatible: incomp
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1487776356
+
+The WATO rule "Volume Groups (LVM)" created incorrect levels, which never
applied.
+This has been fixed. You need to reconfigure all LVM Volume Groups rules from scratch,
because
+their format has changed.
+
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 15efd7a..9671271 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -6429,20 +6429,32 @@ register_check_parameters(
subgroup_storage,
"volume_groups",
_("Volume Groups (LVM)"),
- Alternative(
- title = _("Levels for volume group"),
- show_alternative_title = True,
- default_value = (80.0, 90.0),
- match = match_dual_level_type,
+ Dictionary(
elements = [
- get_free_used_dynamic_valuespec("used", "volume group"),
- get_free_used_dynamic_valuespec("free", "volume group",
default_value = (20.0, 10.0)),
- ]
+ ("levels",
+ Alternative(
+ title = _("Levels for volume group"),
+ show_alternative_title = True,
+ default_value = (80.0, 90.0),
+ match = match_dual_level_type,
+ elements = [
+ get_free_used_dynamic_valuespec("used", "volume
group"),
+ Transform(
+ get_free_used_dynamic_valuespec("free",
"volume group", default_value = (20.0, 10.0)),
+ title = _("Levels for volume group free space"),
+ allow_empty = False,
+ forth = transform_filesystem_free,
+ back = transform_filesystem_free
+ )
+ ]
+ )),
+ ],
+ optional_keys = False
),
TextAscii(
title = _("Volume Group"),
allow_empty = False),
- "first"
+ "dict"
)
register_check_parameters(