Module: check_mk
Branch: master
Commit: 57bf329bc110f948c906712babfa39dfd0df4e85
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=57bf329bc110f9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Sep 4 10:31:38 2014 +0200
Revert "#1383 Offline disks and required mirror free space are accounted in
oracle_asm_diskgroup"
This reverts commit 82ea21342f0857672b787f1afb04a98899cad6b5.
---
.werks/1383 | 14 ----------
ChangeLog | 2 --
checkman/oracle_asm_diskgroup | 50 ++++++++-------------------------
checks/oracle_asm_diskgroup | 51 ++++------------------------------
web/plugins/wato/check_parameters.py | 22 ---------------
5 files changed, 17 insertions(+), 122 deletions(-)
diff --git a/.werks/1383 b/.werks/1383
deleted file mode 100644
index 2b676f2..0000000
--- a/.werks/1383
+++ /dev/null
@@ -1,14 +0,0 @@
-Title: Offline disks and rewuired mirror free space are accounted in
oracle_asm_diskgroup
-Level: 2
-Component: checks
-Compatible: incomp
-Version: 1.2.5i6
-Date: 1409772890
-Class: feature
-
-New rule in WATO is requirred to account this change. The old
-<i>filesystem_default_levels</i> is replaced by
<i>asm_diskgroup_default_levels</i>. WATO use
-the new rulename but old values must be migrated to
-<i>asm_diskgroup_default_levels</i>.
-
-
diff --git a/ChangeLog b/ChangeLog
index e69f11e..03a5fe7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,8 +43,6 @@
* 1176 winperf_msx_queues: The list of counters for inventory can now be configured
host based using wato
* 0656 brocade_fcport: inventory rule can now choose upon physical und operations
states as well, state choices were also updated
* 1177 Hivemanger: New agent to check hivemanager devices
- * 1383 Offline disks and rewuired mirror free space are accounted in
oracle_asm_diskgroup
- NOTE: Please refer to the migration notes!
* 1051 FIX: tcp_conn_stats: fix missing performance data...
* 1142 FIX: winperf_ts_sessions: fix computation, check has never really worked
* 1090 FIX: zfsget: fixed exception which happened on incomplete zfs entries
diff --git a/checkman/oracle_asm_diskgroup b/checkman/oracle_asm_diskgroup
index 51e0883..fc9bdce 100644
--- a/checkman/oracle_asm_diskgroup
+++ b/checkman/oracle_asm_diskgroup
@@ -4,44 +4,22 @@ catalog: app/oracle
license: GPL
distribution: check_mk
description:
- This check measures the usage of ASM disk groups. The usage
- is checked against a warning and a critical level, which
- can be specified in numerous ways.
+ Checks usage of ORACLE ASM Disk Groups.
- {Requirements:} The {mk_oracle} is needed on the monitored machines.
- See details for {mk_oracle} at manpage of {oracle_instance}.
+ Make sure you have installed the mk_oracle_asm agent plugin on the monitored
+ machines. (It uses asmcmd commandline tool there to gather the needed
+ informations.)
- {Trends:} This checks supports diskgroup {trends}. This means that the
- check is able to compute the {change} of the used space over the time
- and can make a forecast into the future. It can estimate the time when
- the diskgroup will be full.
-
- In a default configuration the check will compute the trend based on the
- data of the last 24 hours using a logarithmic average that gives more recent
- data a higher weight. Also data beyond the 24 hours will to some small degree be
- reflected in the computation. The advantage of this algorithm is a more
- precise prediction and a simpler implementation, which does not need any
- access to any RRDs or similar storage.
-
- Please note that when a diskgroup is started to be monitored,
- the trend of the past is unknown and is assumed to be {zero}.
- It will take at least one trend range of time until the trend
- approximately reflects the reality.
+ See also check manpage for df. All the configuration from there can
+ also be used for ORACLE ASM Disk Groups.
item:
- The name of the disk group as delivered by the agent without the {/} at the
- end.
-
- See also check manpage for {df}. All configurations are usable for ORACLE ASM
- disk groups.
-
- The old parameter {filesystem_default_levels} is replaced with
- {asm_diskgroup_default_levels}.
+ The name of the disk group as delivered by asmcmd.
examples:
# Set default levels for all filesystems (including ORACLE ASM Disk Groups)
# to 90/95
- asm_diskgroup_default_levels = (90, 95)
+ filesystem_default_levels = (90, 95)
# more examples in check manpage for df
@@ -49,17 +27,11 @@ perfdata:
see check manpage for df
inventory:
- Creates one check for every diskgroup in the agent's output.
+ Creates one check for every disk group in the agent's output.
[parameters]
-parameters(dict): see check manpage for df. The following parameters
- are added for more functionality.
-
- {"req_mir_free"}: If this is set to {True}, the free space is checked
- against the req_mir_free instead of free_mb. This works only for
- NORMAL or HIGH redundancy disk groups. {required mirror free space used}
- is added to the output, when {req_mir_free} is {True}
+parameters(dict): see check manpage for df
[configuration]
-asm_diskgroup_default_levels: see check manpage for df and comments above
+filesystem_default_levels: see check manpage for df
diff --git a/checks/oracle_asm_diskgroup b/checks/oracle_asm_diskgroup
index e380e23..f8ec66f 100644
--- a/checks/oracle_asm_diskgroup
+++ b/checks/oracle_asm_diskgroup
@@ -30,15 +30,6 @@
# MOUNTED NORMAL N 512 4096 1048576 3072 2146 309
918 0 Y OCR_VOTE/
# The agent section <<<oracle_asm_diskgroup>>> does not output the
header line
-factory_settings["asm_diskgroup_default_levels"] = {
- "levels" : (80.0, 90.0), # warn/crit in percent
- "magic_normsize" : 20, # Standard size if 20 GB
- "levels_low" : (50.0, 60.0), # Never move warn level below 50% due to
magic factor
- "trend_range" : 24,
- "trend_perfdata" : True, # do send performance data for trends
- "req_mir_free" : False, # Ignore Requirre mirror free space in DG
-}
-
def inventory_oracle_asm_diskgroup(info):
return [ (line[-1].rstrip("/"), {}) for line in info ]
@@ -55,40 +46,10 @@ def check_oracle_asm_diskgroup(item, params, info):
name = line
else:
name = ""
-
- dg_name = name.rstrip('/')
-
- if dg_name == item:
- if typ in ('NORMAL', 'HIGH') and
params.get('req_mir_free'):
-
- req_mir_free_mb = saveint(req_mir_free_mb)
-
- if req_mir_free_mb < 0:
- # requirred mirror free space could be negative!
- req_mir_free_mb = 0
-
- status, infotext, perfdata = df_check_filesystem(g_hostname, item,
int(total_mb),
- int(req_mir_free_mb), params)
- infotext += ', %s redundancy, requirred mirror free space used' %
typ.lower()
-
- else:
- status, infotext, perfdata = df_check_filesystem(g_hostname, item,
int(total_mb),
- int(free_mb), params)
- infotext += ', %s redundancy' % typ.lower()
-
- offline_disks = saveint(offline_disks)
- if offline_disks > 0:
- status = max(2, status)
- infotext += ', %d Offline disks found(!!)' % offline_disks
-
- return (status, infotext, perfdata)
-
- # In case of missing information we assume that the ASM-Instance is
- # checked at a later time.
- # This reduce false notifications for not running ASM-Instances
- raise MKCounterWrapped(None, "Diskgroup %s not found" % item)
-
->>>>>>> 7774f2a... mk_oracle_asm Offline disks and requirred mirror
free space are accounted
+ if name.rstrip('/') == item:
+ return df_check_filesystem(g_hostname, item, int(total_mb),
+ int(free_mb), params)
+ return (3, "Disk group not found")
check_info["oracle_asm_diskgroup"] = {
@@ -96,7 +57,7 @@ check_info["oracle_asm_diskgroup"] = {
'inventory_function' : inventory_oracle_asm_diskgroup,
'service_description' : 'ASM Diskgroup %s',
'has_perfdata' : True,
- 'group' : 'asm_diskgroup',
- 'default_levels_variable' : 'asm_diskgroup_default_levels',
+ 'group' : 'filesystem',
+ 'default_levels_variable' : 'filesystem_default_levels',
"includes" : [ "df.include" ],
}
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 8b2d523..b5712e8 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -3270,28 +3270,6 @@ register_check_parameters(
register_check_parameters(
subgroup_applications,
- "asm_diskgroup",
- _("ASM Diskgroup (used space and growth)"),
- Dictionary(
- elements = filesystem_elements + [
- ("req_mir_free", FixedValue(False, title = _("Use required
mirror free space as free space"),
- totext = "",
- help = _("ASM calculates the free space
depending on free_mb or require mirror "
- "free space. Enable this option to
set the check against require "
- "mirror free space. This only
works for normal or high redundancy. "))
- ),
- ],
- hidden_keys = ["flex_levels"],
- ),
- TextAscii(
- title = _("ASM-Diskgroups"),
- help = _("Specify the name of the ASM-Diskgroup "),
- allow_empty = False),
- "dict"
-)
-
-register_check_parameters(
- subgroup_applications,
"mssql_backup",
_("MSSQL Time since last Backup"),
Optional(