[checkmk-commits] Check_MK Git: check_mk: #1098 FIX esx_vsphere_counters.diskio:

Andreas Boesl ab at mathias-kettner.de
Wed Aug 20 11:32:35 CEST 2014


  Now reports unknown when counter data is missing
Message-ID: <53f46b33.wp9Mn91UdD706Xnx%ab at mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Module: check_mk
Branch: master
Commit: 80c0b048fac00842262744603425852e98edb17e
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=80c0b048fac00842262744603425852e98edb17e

Author: Andreas Boesl <ab at mathias-kettner.de>
Date:   Wed Aug 20 11:32:32 2014 +0200

#1098 FIX esx_vsphere_counters.diskio: Now reports unknown when counter data is missing

---

 .werks/1098                 |    9 +++++++++
 ChangeLog                   |    3 ++-
 checks/esx_vsphere_counters |   11 ++++++++---
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/.werks/1098 b/.werks/1098
new file mode 100644
index 0000000..2b85afc
--- /dev/null
+++ b/.werks/1098
@@ -0,0 +1,9 @@
+Title: esx_vsphere_counters.diskio: Now reports unknown when counter data is missing
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1408527115
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 36714e6..5ed2703 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,9 +39,9 @@
     * 1152 FIX: mk-job: The check now captures currently running jobs and their start time...
     * 0198 FIX: cisco_temp_sensor: Removed dicey detection for temperature value....
     * 0645 FIX: brocade_fcport: since in newer firmware (7.*) swFCPortSpeed is deprecated, we then calculate port speed from IF-MIB::ifHighSpeed
-    * 0647 FIX: printer_input, printer_output: multiple fixes to algorithm for state determination and inventory function...
     * 1097 FIX: windows_agent: preventing missing agent sections on first query...
     * 1009 FIX: df: deal with space in file system type for PlayStation file system...
+    * 1098 FIX: esx_vsphere_counters.diskio: Now reports unknown when counter data is missing
 
     Multisite:
     * 1066 Implemented Dashboard Designer...
@@ -50,6 +50,7 @@
     * 1154 FIX: Availability: Fixed unwanted redirect to edit annotation page after editing availability options...
 
     WATO:
+    * 1095 New WATO Web-API: Now able to manage hosts via web automation calls
     * 1096 New WATO webservices: manage hosts via webinterface...
     * 1064 FIX: Fixed rare issue with WATO communication in distributed setups (different OS versions)...
     * 1089 FIX: Snapshot restore: fixed exception during exception handling......
diff --git a/checks/esx_vsphere_counters b/checks/esx_vsphere_counters
index 89941be..da5a504 100644
--- a/checks/esx_vsphere_counters
+++ b/checks/esx_vsphere_counters
@@ -75,9 +75,14 @@ def inventory_esx_vsphere_counters_diskio(info):
             return [(None, None)]
 
 def check_esx_vsphere_counters_diskio(_no_item, _no_params, info):
-    reads = 0
-    writes = 0
-    latency = 0
+    if not info:
+        return 3, "Counter data is missing"
+
+    read_bytes  = 0
+    write_bytes = 0
+    reads       = 0
+    writes      = 0
+    latency     = 0
     for counter, item, value, unit in info:
         if item == '':
             if counter == 'disk.read':



More information about the checkmk-commits mailing list