Module: check_mk
Branch: master
Commit: 556aa1e598c7ffbe16dfc2bb54f7bff0a5721f18
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=556aa1e598c7ff…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 4 20:46:36 2017 +0200
Revert "4786 lvm_lvs: New check vor LVM logical volume pools"
Missing man page
This reverts commit c79db101859367821ff28295b68a8e6c63570237.
---
.werks/4786 | 11 -----
agents/plugins/lvm | 3 --
checks/lvm_lvs | 82 ------------------------------------
web/plugins/wato/check_parameters.py | 33 ---------------
4 files changed, 129 deletions(-)
diff --git a/.werks/4786 b/.werks/4786
deleted file mode 100644
index ba0cbea..0000000
--- a/.werks/4786
+++ /dev/null
@@ -1,11 +0,0 @@
-Title: lvm_lvs: New check vor LVM logical volume pools
-Level: 1
-Component: checks
-Compatible: compat
-Edition: cre
-Version: 1.5.0i1
-Date: 1496326054
-Class: feature
-
-In LVM you can configure thin provisioned logical volume pools. These can
-be overprovisioned. This checkplugin measures the usage of these pools.
diff --git a/agents/plugins/lvm b/agents/plugins/lvm
index 00cd5fe..6f0b9de 100755
--- a/agents/plugins/lvm
+++ b/agents/plugins/lvm
@@ -2,8 +2,5 @@
echo "<<<lvm_vgs>>>"
vgs --units b --nosuffix --noheadings --separator ' '
-echo "<<<lvm_lvs:sep(124)>>>"
-lvs --units b --nosuffix --noheadings --separator '|'
-
#echo "<<<lvm_pvs>>>"
#pvs --units b --nosuffix --noheadings --separator ' '
diff --git a/checks/lvm_lvs b/checks/lvm_lvs
deleted file mode 100644
index 8bae5bd..0000000
--- a/checks/lvm_lvs
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/python
-# -*- encoding: utf-8; py-indent-offset: 4 -*-
-# +------------------------------------------------------------------+
-# | ____ _ _ __ __ _ __ |
-# | / ___| |__ ___ ___| | __ | \/ | |/ / |
-# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
-# | | |___| | | | __/ (__| < | | | | . \ |
-# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
-# | |
-# | Copyright Mathias Kettner 2017 mk(a)mathias-kettner.de |
-# +------------------------------------------------------------------+
-#
-# This file is part of Check_MK.
-# The official homepage is at
http://mathias-kettner.de/check_mk.
-#
-# check_mk is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation in version 2. check_mk is distributed
-# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
-# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU General Public License for more de-
-# tails. You should have received a copy of the GNU General Public
-# License along with GNU Make; see the file COPYING. If not, write
-# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-# Boston, MA 02110-1301 USA.
-
-
-# example output
-
-factory_settings["lvm_lvs_default_levels"] = {
- "levels_data" : (80.0, 90.0),
- "levels_meta" : (80.0, 90.0),
-}
-
-def parse_lvm_lvs(info):
- parsed = {}
- for line in info:
- item = "%s/%s" % (line[1], line[4])
- if not line[4] == "" and not item in parsed:
- parsed[item] = []
-
- for line in info:
- item = "%s/%s" % (line[1], line[0])
- if item in parsed:
- parsed[item] = {"data" : line[6], "meta" : line[7]}
-
- return parsed
-
-
-def inventory_lvm_lvs(parsed):
- for key, values in parsed.iteritems():
- yield ( key, {} )
-
-
-def check_lvm_lvs(item, params, parsed):
- for key, values in parsed.iteritems():
- if item == key:
- for key, value in values.iteritems():
- value = float(value)
- warn, crit = params["levels_%s" % key]
- if value >= crit:
- state = 2
- elif value >= warn:
- state = 1
- else:
- state = 0
-
- key = key[0].upper()+key[1:]
- yield 0, "%s usage: %.2f %%" % (key, value)
- if state:
- yield state, "(warn/crit at %s/%s)" % (warn, crit)
-
-
-check_info['lvm_lvs'] = {
- 'parse_function' : parse_lvm_lvs,
- 'inventory_function' : inventory_lvm_lvs,
- 'check_function' : check_lvm_lvs,
- 'service_description' : 'LVM LV Pool %s',
- 'has_perfdata' : True,
- 'default_levels_variable' : 'lvm_lvs_default_levels',
- 'group' : 'lvm_lvs_pools',
-}
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 685f2b7..77d6853 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -4569,39 +4569,6 @@ register_check_parameters(
register_check_parameters(
subgroup_storage,
- "lvm_lvs_pools",
- _("Logical Volume Pools (LVM)"),
- Dictionary(
- elements = [
- ( "levels_meta", Tuple(
- title = _("Levels for Meta"),
- default_value = (80.0, 90.0),
- elements = [
- Percentage(title = _("Warning at"), unit =
_("%")),
- Percentage(title = _("Critical at"), unit =
_("%"))
- ]
- ),
- ),
- ( "levels_data", Tuple(
- title = _("Levels for Data"),
- default_value = (80.0, 90.0),
- elements = [
- Percentage(title = _("Warning at"), unit =
_("%")),
- Percentage(title = _("Critical at"), unit =
_("%"))
- ]
- ),
- ),
- ]
- ),
- TextAscii(
- title = _("Logical Volume Pool"),
- allow_empty = True,
- ),
- match_type = "dict"
-)
-
-register_check_parameters(
- subgroup_storage,
"filehandler",
_("Filehandler"),
Dictionary(