Module: check_mk
Branch: master
Commit: 992107001415576b7cd346d8e82e7b88da38f5b8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=99210700141557…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 3 16:59:43 2014 +0100
#1611 mssql.vbs: Supporting SQL-Server 2014 now
---
.werks/1611 | 9 +++++++++
ChangeLog | 1 +
agents/windows/plugins/mssql.vbs | 29 +++++++++++++++--------------
3 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/.werks/1611 b/.werks/1611
new file mode 100644
index 0000000..d9343ef
--- /dev/null
+++ b/.werks/1611
@@ -0,0 +1,9 @@
+Title: mssql.vbs: Supporting SQL-Server 2014 now
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417622375
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 3b6c7bf..7ba5338 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
* 1565 mem.win: set default levels for page file to 80%/90%
* 1608 zpool_status: Add an overall state check (thx to Craig Cook)...
* 1567 postfix_mailq: speedup in Linux agent for large mail queues...
+ * 1611 mssql.vbs: Supporting SQL-Server 2014 now
* 1478 FIX: kernel.util, statgrab_cpu: fix computation of utilization...
* 1480 FIX: brocade_vdx_status: disable check on some devices that do not support
it...
* 1485 FIX: dell_om_disks, dell_om_esmlog, dell_om_mem, dell_om_processors,
dell_om_sensors: detect more devices...
diff --git a/agents/windows/plugins/mssql.vbs b/agents/windows/plugins/mssql.vbs
index 7f508ff..bf58824 100644
--- a/agents/windows/plugins/mssql.vbs
+++ b/agents/windows/plugins/mssql.vbs
@@ -17,8 +17,6 @@
'
' This check has been developed with MSSQL Server 2008 R2. It should work with
' older versions starting from at least MSSQL Server 2005.
-'
-' 16.10.2013 Instanzen mit Unterstrich im Namen -- H.Schniggendiller
' -----------------------------------------------------------------------------
Option Explicit
@@ -36,7 +34,6 @@ Sub addOutput(text)
output = output & text & vbLf
End Sub
-
' Dummy empty output.
' Contains timeout error if this scripts runtime exceeds the timeout
WScript.echo "<<<mssql_versions>>>"
@@ -44,23 +41,27 @@ WScript.echo "<<<mssql_versions>>>"
' Loop all found local MSSQL server instances
' Try different trees to handle different versions of MSSQL
On Error Resume Next
-' MSSQL >= 10
-' try SQL Server 2012:
-Set WMI =
GetObject("WINMGMTS:\\.\root\Microsoft\SqlServer\ComputerManagement11")
+' try SQL Server 2014:
+Set WMI =
GetObject("WINMGMTS:\\.\root\Microsoft\SqlServer\ComputerManagement12")
If Err.Number <> 0 Then
Err.Clear()
-
- ' try SQL Server 2008
- Set WMI =
GetObject("WINMGMTS:\\.\root\Microsoft\SqlServer\ComputerManagement10")
+ ' try SQL Server 2012:
+ Set WMI =
GetObject("WINMGMTS:\\.\root\Microsoft\SqlServer\ComputerManagement11")
If Err.Number <> 0 Then
Err.Clear()
-
- ' try MSSQL < 10
- Set WMI =
GetObject("WINMGMTS:\\.\root\Microsoft\SqlServer\ComputerManagement")
+
+ ' try SQL Server 2008
+ Set WMI =
GetObject("WINMGMTS:\\.\root\Microsoft\SqlServer\ComputerManagement10")
If Err.Number <> 0 Then
- addOutput( "Error: " & Err.Number & " " &
Err.Description )
Err.Clear()
- wscript.quit()
+
+ ' try MSSQL < 10
+ Set WMI =
GetObject("WINMGMTS:\\.\root\Microsoft\SqlServer\ComputerManagement")
+ If Err.Number <> 0 Then
+ addOutput( "Error: " & Err.Number & " " &
Err.Description )
+ Err.Clear()
+ wscript.quit()
+ End If
End If
End If
End If