Module: check_mk
Branch: master
Commit: 69ae21e97a0a79c54b969e77bbad5ecc5ebbf1fe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=69ae21e97a0a79…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Mon Oct 26 16:31:00 2015 +0100
#2706 FIX winperf_if: fixed rare crashes of windows_if.ps1 plugin
On some systems (for unknown reasons) the windows_if.ps1 plugin produced broken field
separators in
its output causing crashes in the check.
---
.werks/2706 | 10 ++++++++++
ChangeLog | 1 +
agents/windows/plugins/windows_if.ps1 | 14 +++++++-------
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/.werks/2706 b/.werks/2706
new file mode 100644
index 0000000..d611ffa
--- /dev/null
+++ b/.werks/2706
@@ -0,0 +1,10 @@
+Title: winperf_if: fixed rare crashes of windows_if.ps1 plugin
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1445872738
+Class: fix
+
+On some systems (for unknown reasons) the windows_if.ps1 plugin produced broken field
separators in
+its output causing crashes in the check.
diff --git a/ChangeLog b/ChangeLog
index b3038b6..a3bbaf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,7 @@
* 2668 FIX: jar_signature: Handle case correctly where certificate is already
expired
* 2669 FIX: mcdata_fcport: fix computation of in and out traffic...
* 2692 FIX: check_http: Fixed broken check when using Nagios (introduced with
1.2.7i3)
+ * 2706 FIX: winperf_if: fixed rare crashes of windows_if.ps1 plugin...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/agents/windows/plugins/windows_if.ps1
b/agents/windows/plugins/windows_if.ps1
index 4d90a98..4be46cc 100644
--- a/agents/windows/plugins/windows_if.ps1
+++ b/agents/windows/plugins/windows_if.ps1
@@ -61,13 +61,13 @@ if ([Environment]::OSVersion.Version.Major -ge "5"){
foreach ($net in Get-WmiObject Win32_NetworkAdapter)
{
if ($net.netconnectionid){
- Write-Host -NoNewline $env:COMPUTERNAME`t
- Write-Host -NoNewline $net.macaddress`t
- Write-Host -NoNewline $net.name`t
- Write-Host -NoNewline $net.netconnectionid`t
- Write-Host -NoNewline $net.netconnectionstatus`t
- Write-Host -NoNewline $net.speed`t
- Write-Host $net.GUID
+ Write-Host $env:COMPUTERNAME "`t"`
+ $net.macaddress "`t"`
+ $net.name "`t"`
+ $net.netconnectionid "`t"`
+ $net.netconnectionstatus "`t"`
+ $net.speed "`t"`
+ $net.GUID
}
}
}