Module: check_mk
Branch: master
Commit: 71a80eef2374511250245779042dffdb58f92830
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=71a80eef237451…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Sep 23 09:42:04 2015 +0200
artec checks: minor cleanups
---
checks/artec_documents | 14 +++++++-------
checks/artec_storage | 2 +-
checks/artec_temp | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/checks/artec_documents b/checks/artec_documents
index 42ecbe9..5b52e4e 100644
--- a/checks/artec_documents
+++ b/checks/artec_documents
@@ -37,19 +37,19 @@ def inventory_artec_documents(info):
def check_artec_documents(_no_item, _no_params, info):
+ now = time.time()
for doc_name, doc_val_str in info:
- if doc_val_str == "":
- doc_val_str = "0"
- yield 0, "%s: %s" % (doc_name.replace("Count", "")
\
- .replace("count", "") \
- .strip(), \
- doc_val_str)
+ if doc_val_str:
+ documents = int(doc_val_str)
+ name = doc_name.replace("Count",
"").replace("count", "").strip()
+ rate = get_rate(doc_name, now, documents)
+ yield 0, "%s: %d (%.2f/s)" % (name, documents, rate)
check_info['artec_documents'] = {
'inventory_function' : inventory_artec_documents,
'check_function' : check_artec_documents,
- 'service_description' : 'Documents SUMMARY',
+ 'service_description' : 'Documents',
'snmp_info' : (".1.3.6.1.4.1.31560.0.0.3.1", [
"3", # artecDocumentsName
"1", # artecDocumentsValues
diff --git a/checks/artec_storage b/checks/artec_storage
index e8455e4..218a3af 100644
--- a/checks/artec_storage
+++ b/checks/artec_storage
@@ -52,7 +52,7 @@ def check_artec_storage(_no_item, _no_params, info):
check_info['artec_storage'] = {
'inventory_function' : inventory_artec_storage,
'check_function' : check_artec_storage,
- 'service_description' : 'Storage SUMMARY',
+ 'service_description' : 'Storage',
# 'has_perfdata' : True, # TODO define perf var and adapt man
page
'snmp_info' : (".1.3.6.1.4.1.31560.0.1.3.1", [
"3", # artecStorageName
diff --git a/checks/artec_temp b/checks/artec_temp
index 09549ef..75c01e8 100644
--- a/checks/artec_temp
+++ b/checks/artec_temp
@@ -34,7 +34,7 @@ factory_settings["artec_temp_default_levels"] = {
def inventory_artec_temp(info):
- return [ ("HDD", {}) ]
+ return [ ("Disk", {}) ]
def check_artec_temp(item, params, info):