Module: check_mk
Branch: master
Commit: 054a17cff55ece9797af4fc549d11297d89fcfec
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=054a17cff55eceā¦
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jul 1 13:58:33 2015 +0200
#2320 FIX winperf_msx_queues: no longer crashes in service discovery if there are no msg
queues available
---
.werks/2320 | 9 +++++++++
ChangeLog | 3 ++-
checks/winperf_msx_queues | 27 ++++++++++++++-------------
3 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/.werks/2320 b/.werks/2320
new file mode 100644
index 0000000..e6fe97d
--- /dev/null
+++ b/.werks/2320
@@ -0,0 +1,9 @@
+Title: winperf_msx_queues: no longer crashes in service discovery if there are no msx
queues available
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1435751870
+
diff --git a/ChangeLog b/ChangeLog
index 204ef72..739c191 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,13 +18,14 @@
* 2362 FIX: mk_logwatch: fix cases where one logfile is listsed more than once in
logwatch.cfg...
* 2363 FIX: jolokia_metrics.uptime: Do not inventory instances where Uptime is
missing - avoid crashed check
* 2381 FIX: emc_datadomain_fans: Made check more robust against broken SNMP output
- * 1261 FIX: apc_symmetra_power: Ignore unused phases while disocery
* 2366 FIX: carel_sensors: fix crash in case of missing temperature sensor
* 2382 FIX: mssql_backup: Formating age output more human friendly
* 2383 FIX: FreeBSD Agent: Fixed handling <<<ps>>> section when
jailed
* 2368 FIX: ucd_cpu_load: fix exception in case of dump SNMP agent sending 12,540000
instead of 12.540000
* 2318 FIX: windows agent: no longer crashes when a cached plugin has several hundred
sections...
* 2319 FIX: winperf_if: fixed exception when using windows_if.ps1 in an old windows
version...
+ * 1261 FIX: apc_symmetra_power: Ignore unused phases while disocery
+ * 2320 FIX: winperf_msx_queues: no longer crashes in service discovery if there are
no msx queues available
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/winperf_msx_queues b/checks/winperf_msx_queues
index ee78352..a770572 100644
--- a/checks/winperf_msx_queues
+++ b/checks/winperf_msx_queues
@@ -73,19 +73,20 @@ winperf_msx_queues = {
winperf_msx_queues_inventory = []
def inventory_winperf_msx_queues(info):
- num_instances = int(info[1][0])
- if num_instances > 0:
- # Its possible to set the wanted queues via wato
- inventory_rules = {}
- for rulset in host_extra_conf(g_hostname, winperf_msx_queues_inventory):
- inventory_rules.update(dict(rulset))
- # In case that rules for this host are set,
- # only use this rules
- if inventory_rules:
- queues = inventory_rules
- else:
- queues = winperf_msx_queues
- return [ (name, { "offset" : offset } ) for name, offset in
queues.items() ]
+ if len(info) > 1:
+ num_instances = int(info[1][0])
+ if num_instances > 0:
+ # Its possible to set the wanted queues via wato
+ inventory_rules = {}
+ for rulset in host_extra_conf(g_hostname, winperf_msx_queues_inventory):
+ inventory_rules.update(dict(rulset))
+ # In case that rules for this host are set,
+ # only use this rules
+ if inventory_rules:
+ queues = inventory_rules
+ else:
+ queues = winperf_msx_queues
+ return [ (name, { "offset" : offset } ) for name, offset in
queues.items() ]
def check_winperf_msx_queues(item, params, info):
num_instances = int(info[1][0])