Module: check_mk
Branch: master
Commit: 1e0e8a8a97d1b56ecbdca07616cc9a0421fe4a56
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1e0e8a8a97d1b5…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Feb 6 18:16:55 2013 +0100
oracle_tablespace: checkman update
---
checkman/oracle_tablespaces | 42 +++++++++++++++++++++++++++++-------------
1 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/checkman/oracle_tablespaces b/checkman/oracle_tablespaces
index 8be4f84..3623754 100644
--- a/checkman/oracle_tablespaces
+++ b/checkman/oracle_tablespaces
@@ -23,7 +23,7 @@ description:
{Increment size}: If the configuration parameter
{oracle_tablespaces_check_default_increment} is set to
- {True} (which is the defaut), then the check will warn
+ {True} (which is the default), then the check will warn
you, if the increment size is set to the ORACLE default
value of {1} (which is generally considered as a non-optimal
setting).
@@ -52,8 +52,13 @@ item:
examples:
# Set levels for free space to 20% (WARN) and 10% (CRIT)
- # of maximum tablespace size
- oracle_tablespaces_default_levels = (20.0, 10.0)
+ # of maximum tablespace size and deactivate check of autoextend
+
+
+ oracle_tablespaces_default_levels = {
+ "levels" : (20.0, 10.0),
+ "autoextend" : None
+ }
perfdata:
Three values in bytes: the current size, the used size of the tablespace
@@ -64,18 +69,29 @@ inventory:
which is {ONLINE}.
[parameters]
-autoextend(bool): Either {True} or {False} - depending on
- wether auto extension is expected to be on or off.
-warn(int / float): Warning level for free space. If this is a float,
- it is considered as percentage of the maximum size of the tablespace.
- If it is an integer, it is considered to be MB of free space. If the
- space drops to this level or below, the check will get into warning state.
-crit(int / float): The critical level for free space.
+parameters (dict):
-[configuration]
-oracle_tablespaces_default_levels(int/float, int/float): The default warning and critical levels
- used for inventorized checks. This is preset to {(10.0, 5.0)}.
+ {"autoextend"}: Either {True} or {False} - depending on whether auto extension is
+ expected to be on or off
+
+ {"levels"}: A tuple containing the warn and crit levels for free space.
+ Supported types (int / float). If this is a float, it is considered as
+ percentage of the maximum size of the tablespace. If it is an integer,
+ it is considered to be MB of free space. If the space drops to this level or below,
+ the check will get into warning state. Default is {(10.0, 5.0)}
+ {"magic"}: The magic number, which scales the levels according to the tablespace size.
+ Default is a factor of 1.0, which does no adaptation. A factor less than 1.0 raises the levels
+ for large tablespaces and lowers them for small ones. Please look at online documentation
+ for more details about magic factor.
+
+ {"magic_normsize"}: Norm size of a tablespace for the magic computation
+ The default for this is {1000}. It is measured in {MB}.
+
+ {"levels_low"}: Minimum levels if using magic factor. The warn / crit levels will never fall below
+ these numbers. The preset is set to (0.0, 0.0) (deactivated)
+
+[configuration]
oracle_tablespaces_check_autoext(bool): This boolean setting determines, whether
inventory should activate monitoring of the auto extension setting. Per default
this is set to {True}, so the current state of the auto extension will be
Module: check_mk
Branch: master
Commit: 3ce61a4a7db11b854883fd247344203ec69b8f51
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3ce61a4a7db11b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 6 14:29:51 2013 +0100
Add: winperf_phydisk can now output IOPS
---
ChangeLog | 1 +
checkman/winperf_phydisk | 4 ++++
checks/diskstat.include | 19 +++++++++++++------
checks/winperf_phydisk | 16 ++++++++++------
4 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b0f9ecc..2aa33a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,7 @@
* if: Inventory settings can now be set host based
* FIX: lnx_bonding/ovs_bonding: correct definition of bonding.include
* Add: if check now able to handle interface groups (if_groups)
+ * Add: winperf_phydisk can now output IOPS
Multisite:
* Added comment painter to notification related views
diff --git a/checkman/winperf_phydisk b/checkman/winperf_phydisk
index f14bb0e..d89a342 100644
--- a/checkman/winperf_phydisk
+++ b/checkman/winperf_phydisk
@@ -28,6 +28,8 @@ description:
it possible to ignore short "peaks" and only trigger and longer
phases of high disk activity.
+ The check also gives info on the IOPS.
+
item:
Either {"SUMMARY"} for a summarized check of alls disks or the
name of the disk device, e.g. {"C:"}.
@@ -62,6 +64,8 @@ perfdata:
In the legacy mode only one variable: the throughput since the last check
in in bytes(!) per second, either for read or for write.
+ The IOPS are returned if {"latency_perfdata"} is set to True.
+
inventory:
The inventory is configured via {diskstat_inventory_mode}. If this is set
to {"single"} (the default), then one check will be created for each
diff --git a/checks/diskstat.include b/checks/diskstat.include
index 553ab76..4c84054 100644
--- a/checks/diskstat.include
+++ b/checks/diskstat.include
@@ -130,17 +130,25 @@ def check_diskstat_line(this_time, item, params, line):
if average_range != None:
perfdata = [ perfdata[0], perfdata[2], perfdata[1], perfdata[3] ]
- # Do Latency computation if this information is available:
- if len(line) >= 6 and line[3] >= 0:
- reads, writes, timems = map(int, line[3:6])
- ios = reads + writes
+ # Process IOs when available
+ if line[3] >= 0 and line[4] > 0:
+ reads, writes = map(int, line[3:5])
+ ios = reads + writes
timedif, ios_per_sec = get_counter(countername + ".ios", this_time, ios)
+ infos.append("IOs: %.2f/sec" % ios_per_sec)
+
+ if params.get("latency_perfdata"):
+ perfdata.append(("ios", ios_per_sec))
+
+ # Do Latency computation if this information is available:
+ if len(line) >= 6 and line[5] >= 0:
+ timems = int(line[5])
timedif, timems_per_sec = get_counter(countername + ".time", this_time, timems)
if not ios_per_sec:
latency = 0.0
else:
latency = timems_per_sec / ios_per_sec
- infos.append("IOs: %.2f/sec, Latency: %.2fms" % (ios_per_sec, latency))
+ infos.append("Latency: %.2fms" % latency)
if "latency" in params:
warn, crit = params["latency"]
if latency >= crit:
@@ -153,7 +161,6 @@ def check_diskstat_line(this_time, item, params, line):
warn, crit = None, None
if params.get("latency_perfdata"):
- perfdata.append(("ios", ios_per_sec))
perfdata.append(("latency", latency, warn, crit))
# Queue Lengths (currently only Windows). Windows uses counters here.
diff --git a/checks/winperf_phydisk b/checks/winperf_phydisk
index 052325a..f113775 100644
--- a/checks/winperf_phydisk
+++ b/checks/winperf_phydisk
@@ -45,8 +45,8 @@
# -24 1638326933 1638326933 average_timer
# -24 18448 18448 average_base
# -22 36283 36283 counter
-# -20 17835 17835 counter
-# -18 18448 18448 counter
+# -20 17835 17835 counter ----> Disk Reads/sec
+# -18 18448 18448 counter ----> Disk Writes/sec
# -16 1315437056 1315437056 bulk_count
# -14 672711680 672711680 bulk_count ----> Disk Read Bytes/sec
# -12 642725376 642725376 bulk_count ----> Disk Write Bytes/sec
@@ -66,11 +66,15 @@ def winperf_phydisk_convert(info):
disks = [ d.split('_')[-1] for d in info[1][2:-1] ]
for line in info[2:]:
if line[0] == '-14':
- disk_reads = [ int(x) / 512 for x in line[1:-2] ]
+ disk_read_bytes = [ int(x) / 512 for x in line[1:-2] ]
elif line[0] == '-12':
- disk_writes = [ int(x) / 512 for x in line[1:-2] ]
+ disk_write_bytes = [ int(x) / 512 for x in line[1:-2] ]
+ elif line[0] == '-20':
+ disk_reads = [ int(x) for x in line[1:-2] ]
+ elif line[0] == '-18':
+ disk_writes = [ int(x) for x in line[1:-2] ]
elif line[0] == '1168': # Average Disk Read Queue Length
- disk_readq_ctrs = [ int(x) for x in line[1:-2] ]
+ disk_readq_ctrs = [ int(x) for x in line[1:-2] ]
elif line[0] == '1170': # Average Disk Read Queue Length
disk_writeq_ctrs = [ int(x) for x in line[1:-2] ]
@@ -78,7 +82,7 @@ def winperf_phydisk_convert(info):
# information)
empty = [ -1 for x in disks ]
- return zip(disks, disk_reads, disk_writes, empty, empty, empty, disk_readq_ctrs, disk_writeq_ctrs)
+ return zip(disks, disk_read_bytes, disk_write_bytes, reads, writes, empty, disk_readq_ctrs, disk_writeq_ctrs)
def inventory_winperf_phydisk(info):
return inventory_diskstat_generic(winperf_phydisk_convert(info))