Module: check_mk
Branch: master
Commit: 1bf1972584d75a3356470ff2da01f66ce134e558
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1bf1972584d75a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Aug 6 10:06:37 2012 +0200
FIX: mssql agent: Fixed handling of databases with spaces in names
---
ChangeLog | 3 ++-
agents/windows/plugins/mssql.vbs | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dad3486..8796b47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,7 +6,6 @@
* parent scan: skip gateways that are reachable via PING
Checks & Agents:
- * mssql_backup: Fixed problems with datetime/timezone calculations
* New Checks for Siemens Blades (BX600)
* New Checks for Fortigate Firewalls
* FIX: megaraid_pdisks: handle case where no enclosure device exists
@@ -21,9 +20,11 @@
* vms_system.ios: new check for total direct/buffered IOs on OpenVMS
* vms_system.procs: new check for number of processes on OpenVMS
* vms_queuejobs: new check for monitoring current VMS queue jobs
+ * FIX: mssql_backup: Fixed problems with datetime/timezone calculations
* FIX: mssql agent: Added compatibility code for MSSQL 9
* FIX: mssql agent: Fixed connection to default instances ("MSSQLSERVER")
* FIX: mssql agent: Fixed check of databases with names starting with numbers
+ * FIX: mssql agent: Fixed handling of databases with spaces in names
* f5_bigip_temp: add performance data
* added perf-o-meters for a lot of temperature checks
* cmctc_lcp.*: added new checks for Rittal CMC-TC LCP
diff --git a/agents/windows/plugins/mssql.vbs b/agents/windows/plugins/mssql.vbs
index 318b7b2..b143457 100644
--- a/agents/windows/plugins/mssql.vbs
+++ b/agents/windows/plugins/mssql.vbs
@@ -157,7 +157,7 @@ For Each instId In instIds.Keys
Set RS = RS.NextRecordset
i = i + 1
Loop
- wscript.echo instId & " " & dbName & " " &
dbSize & " " & unallocated & " " & reserved &
" " & _
+ wscript.echo instId & " " & Replace(dbName, " ",
"_") & " " & dbSize & " " & unallocated
& " " & reserved & " " & _
data & " " & indexSize & " " &
unused
Set RS = CreateObject("ADODB.Recordset")
Next
@@ -173,7 +173,7 @@ For Each instId In instIds.Keys
Do While Not RS.Eof
lastBackupDate = Trim(RS("last_backup_date"))
If lastBackupDate <> "" Then
- wscript.echo instId & " " & dbName & " "
& lastBackupDate
+ wscript.echo instId & " " & Replace(dbName, "
", "_") & " " & lastBackupDate
End If
RS.MoveNext
Loop