Module: check_mk
Branch: master
Commit: 769cfff4a9adae85188fa65fe907934dd92c0697
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=769cfff4a9adae…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jul 28 10:06:38 2015 +0200
#2488 FIX veem_jobs: fix problems with spaces or single quotes in the names of jobs
The fix is in the agent plugin <tt>veeam_backup_status.ps1_</tt> so you need
to
update that in order to deploy the fix. Thanks to Andreas Döhler.
---
.werks/2488 | 11 +++++++++++
ChangeLog | 1 +
agents/windows/plugins/veeam_backup_status.ps1_ | 18 +++++++++++++-----
3 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/.werks/2488 b/.werks/2488
new file mode 100644
index 0000000..c9fe55e
--- /dev/null
+++ b/.werks/2488
@@ -0,0 +1,11 @@
+Title: veem_jobs: fix problems with spaces or single quotes in the names of jobs
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1438070733
+
+The fix is in the agent plugin <tt>veeam_backup_status.ps1_</tt> so you need
to
+update that in order to deploy the fix. Thanks to Andreas Döhler.
diff --git a/ChangeLog b/ChangeLog
index 1901761..5c1ee6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -78,6 +78,7 @@
* 2476 FIX: check_bi_aggr: Fixed exception when authentication is enabled
* 2477 FIX: SNMP: Fixed exception when processing specific SNMP data with missing
columns...
* 1274 FIX: heartbeat_crm: Handle case of error messages from CRM
+ * 2488 FIX: veem_jobs: fix problems with spaces or single quotes in the names of
jobs...
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/agents/windows/plugins/veeam_backup_status.ps1_
b/agents/windows/plugins/veeam_backup_status.ps1_
index cf8d38f..36a0226 100644
--- a/agents/windows/plugins/veeam_backup_status.ps1_
+++ b/agents/windows/plugins/veeam_backup_status.ps1_
@@ -6,6 +6,14 @@
# directory given in veeam_backup_status.bat and the .bat file needs to be
# started by the check_mk agent instead.
+$pshost = get-host
+$pswindow = $pshost.ui.rawui
+
+$newsize = $pswindow.buffersize
+$newsize.height = 300
+$newsize.width = 150
+$pswindow.buffersize = $newsize
+
# Get Information from veeam backup and replication in cmk-friendly format
# V0.9
# Load Veeam Backup and Replication Powershell Snapin
@@ -30,7 +38,7 @@ $myBackupJobs = Get-VBRJob | where {$_.IsScheduleEnabled -eq $true }
foreach ($myJob in $myBackupJobs)
{
$myJobName = ""
- $myJobName = $myJob.Name
+ $myJobName = $myJob.Name -replace "\'","_" -replace "
","_"
$myJobType = ""
$myJobType = $myjob.JobType
@@ -78,13 +86,13 @@ foreach ($myJob in $myBackupJobs)
$myTaskTotalSize = $myTask.Progress.TotalSize
$myTaskText = "$myTaskText" + "TotalSizeByte" + "`t" +
"$myTaskTotalSize" + "`n"
-
+
$myTaskReadSize = $myTask.Progress.ReadSize
-
+
$myTaskText = "$myTaskText" + "ReadSizeByte" + "`t" +
"$myTaskReadSize" + "`n"
-
+
$myTaskTransferedSize = $myTask.Progress.TransferedSize
-
+
$myTaskText = "$myTaskText" + "TransferedSizeByte" + "`t"
+ "$myTaskTransferedSize" + "`n"
$myTaskStartTime = ""