Module: check_mk
Branch: master
Commit: f110670f3c5c12764f3b4fbcb738adb066b134e6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f110670f3c5c12…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Apr 2 11:12:00 2013 +0200
FIX: mssql.vbs (agent plugin) now sets auth options for each instance
---
ChangeLog | 1 +
agents/windows/plugins/mssql.vbs | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index cb7d14a..83ccc14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -93,6 +93,7 @@
* FIX: check_mk-mssql_counters.transactions: fix computation also
* check_http: now support the option -L (urlizing the result)
* Added mem section to Mac OSX agent (Thanks to Brad Davis)
+ * FIX: mssql.vbs (agent plugin) now sets auth options for each instance
Multisite:
* FIX: fix localization in non-OMD environment
diff --git a/agents/windows/plugins/mssql.vbs b/agents/windows/plugins/mssql.vbs
index 80ffd7d..dc7eaa4 100644
--- a/agents/windows/plugins/mssql.vbs
+++ b/agents/windows/plugins/mssql.vbs
@@ -88,15 +88,16 @@ hostname =
WScript.CreateObject("WScript.Shell").ExpandEnvironmentStrings("%COMP
Set CONN = CreateObject("ADODB.Connection")
Set RS = CreateObject("ADODB.Recordset")
CONN.Provider = "sqloledb"
+
' Select a special DB
'CONN.Properties("Initial Catalog").Value = "test123"
-' At this place one could implement to user other authentication mechanism
-CONN.Properties("Integrated Security").Value = "SSPI"
-
' Loop all found server instances and connect to them
' In my tests only the connect using the "named instance" string worked
For Each instId In instIds.Keys
+ ' At this place one could implement to use other authentication mechanism
+ CONN.Properties("Integrated Security").Value = "SSPI"
+
If InStr(instId, "_") <> 0 Then
instName = Split(instId, "_")(1)
Else