Module: check_mk
Branch: master
Commit: 705bbeee0429af9ab811336eefca3401efa07db9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=705bbeee0429af…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jul 1 11:05:42 2015 +0200
#2319 FIX winperf_if: fixed exception when using windows_if.ps1 in an old windows version
The windows_if.ps1 plugin does not provide all informations on windows installations
older than Windows 2003. The winperf_if check was unable to work without the missing
data.
This has been fixed.
---
.werks/2319 | 12 ++++++++++++
ChangeLog | 1 +
checks/winperf_if | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/2319 b/.werks/2319
new file mode 100644
index 0000000..fcbc229
--- /dev/null
+++ b/.werks/2319
@@ -0,0 +1,12 @@
+Title: winperf_if: fixed exception when using windows_if.ps1 in an old windows version
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1435741362
+
+The windows_if.ps1 plugin does not provide all informations on windows installations
+older than Windows 2003. The winperf_if check was unable to work without the missing
data.
+This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 4bb2a62..928e332 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@
* 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...
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/winperf_if b/checks/winperf_if
index 105fad8..8b982a0 100644
--- a/checks/winperf_if
+++ b/checks/winperf_if
@@ -142,7 +142,7 @@ def convert_winperf_if(info):
# it may happen that there are non-existing interfaces
# with the same nic_name as an active one (at least on HP
# hardware)
- if as_dict["NetConnectionStatus"] == "4":
+ if as_dict.get("NetConnectionStatus") == "4":
continue
# Exact match