Module: check_mk
Branch: master
Commit: 81af9ced3bb8ace764d14ee6cbe5327e50c676f8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=81af9ced3bb8ac…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Mon Mar 27 16:25:56 2017 +0200
4551 FIX zfs_arc_cache: Fixed metrics in html5 graphing
Change-Id: I4c1b4043df15ed611245689c380166e8bc4f2e87
---
.werks/4551 | 10 ++++++++++
checks/zfs_arc_cache | 8 ++++----
web/plugins/metrics/check_mk.py | 8 ++++----
3 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/.werks/4551 b/.werks/4551
new file mode 100644
index 0000000..876dbf0
--- /dev/null
+++ b/.werks/4551
@@ -0,0 +1,10 @@
+Title: zfs_arc_cache: Fixed metrics in html5 graphing
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1490624706
+Class: fix
+
+
diff --git a/checks/zfs_arc_cache b/checks/zfs_arc_cache
index bec57d0..004ffb4 100644
--- a/checks/zfs_arc_cache
+++ b/checks/zfs_arc_cache
@@ -234,7 +234,7 @@ def check_zfs_arc_cache(_no_item, _no_params, parsed):
# size
if "size" in parsed.keys():
- size_bytes = parsed["size"] * 1024.0 * 1024.0
+ size_bytes = parsed["size"]
size_readable = get_bytes_human_readable(size_bytes)
yield 0, "Cache size: %s" % size_readable, \
[("size", size_bytes, '', '', 0)]
@@ -246,9 +246,9 @@ def check_zfs_arc_cache(_no_item, _no_params, parsed):
"arc_meta_max" in parsed.keys():
yield 0, "Arc Meta %d MB used, Limit %d MB, Max %d MB" % \
(parsed["arc_meta_used"], parsed["arc_meta_limit"],
parsed["arc_meta_max"]), \
- [("arc_meta_used", parsed["arc_meta_used"] * 1024 *
1024, '', '', 0),
- ("arc_meta_limit", parsed["arc_meta_limit"] * 1024 *
1024, '', '', 0),
- ("arc_meta_max", parsed["arc_meta_max"] * 1024 *
1024, '', '', 0)]
+ [("arc_meta_used", parsed["arc_meta_used"],
'', '', 0),
+ ("arc_meta_limit", parsed["arc_meta_limit"],
'', '', 0),
+ ("arc_meta_max", parsed["arc_meta_max"], '',
'', 0)]
check_info["zfs_arc_cache"] = {
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index 7e62e8d..0600ec6 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -4549,10 +4549,10 @@ check_metrics["check_mk-docsis_channels_downstream"] =
{
check_metrics["check_mk-zfs_arc_cache"] = {
"hit_ratio" : { "name": "cache_hit_ratio", },
- "size" : { "name": "caches", "scale"
: MB },
- "arc_meta_used" : { "name": "zfs_metadata_used",
"scale" : MB },
- "arc_meta_limit": { "name": "zfs_metadata_limit",
"scale" : MB },
- "arc_meta_max" : { "name": "zfs_metadata_max",
"scale" : MB },
+ "size" : { "name": "caches", },
+ "arc_meta_used" : { "name": "zfs_metadata_used",},
+ "arc_meta_limit": { "name": "zfs_metadata_limit", },
+ "arc_meta_max" : { "name": "zfs_metadata_max",},
}
check_metrics["check_mk-zfs_arc_cache.l2"] = {