[hobbit] Bbwin cluster.exe

DNS dns1407 at yahoo.com
Wed Oct 15 10:33:15 CEST 2008


Hi Padraig,

The vbs-script that i use to monitor a MS 2003 Cluster.... Just copy the code into a vbs-file to (..\bbwin\bin) and configure this as "external" in bbwin.cfg
====Begin====
On Error Resume Next
strMasterState = "green"
strBBFilename = "clusterRES"
'find out where to put BB log files
const HKLM = &H80000002
strBBExtpathNew = "SOFTWARE\BBWin"
strBBExtpathOld = "SOFTWARE\BBWin"
Set oReg=GetObject("winmgmts:\root\default:StdRegProv")
' check for BB Externals Path; reg key changes between versions
oReg.GetStringValue HKLM,strBBExtpathNew,,strExtpath
if isnull(strExtpath) then
oReg.GetStringValue HKLM,strBBExtpathOld,,strExtpath
end if
if isnull(strExtpath) then
wscript.quit
end if
'Create the cluster, shell, network, and file system objects
Set objClus = CreateObject("MSCluster.Cluster")
Set WshNetwork = WScript.CreateObject("WScript.Network")
strComputerName = WshNetwork.ComputerName
'Open a cluster object for the cluster running on the local system
objClus.Open ""
if err then
wscript.quit
end if
strfileoutput = strfileoutput & "CLUSTER NAME: " & objClus.Name & vbcrlf
strfileoutput = strfileoutput & objClus.Version.VendorID & " - " & objClus.Version.MajorVersion &  "." & objClus.Version.MinorVersion & "." & objClus.Version.BuildNumber & " - " & objClus.Version.CSDVersion & vbcrlf & vbcrlf
strfileoutput = strfileoutput & "Cluster Nodes:" & vbcrlf
For Each itmNode in objClus.Nodes
select case itmNode.state
case 0
strfileoutput = strfileoutput & "&green ONLINE  - " & itmNode.Name & vbcrlf
case 1
strfileoutput = strfileoutput & "&red OFFLINE - " & itmNode.Name & vbcrlf
if strMasterState <> "red" then
strMasterState = "red"
end if
end select
Next
strfileoutput = strfileoutput & "Quorum Device: " & objClus.QuorumResource.Name & " - " & objClus.QuorumPath & vbcrlf & vbcrlf
strfileoutput = strfileoutput & objclus.name & " GROUPS" & vbcrlf & vbcrlf
For Each itmGroup in objClus.ResourceGroups
strfileoutput = strfileoutput & itmGroup.Name & " (" & itmGroup.Resources.Count & " Resources)" & vbcrlf
For Each itmRes in itmGroup.Resources
select case itmres.state
case 2
strstate = "&green ONLINE          - "
case 3
strstate = "&yellow OFFLINE         - "
if strMasterState = "green" then
strMasterState = "yellow"
end if
case 4
strstate = "&red FAILED          - "
if strMasterState  <> "red" then
strMasterState = "red"
end if
case 129
strstate = "&yellow ONLINE PENDING  - "
if strMasterState = "green" then
strMasterState = "yellow"
end if
end select
strFileOutput = strFileOutput & strState & itmRes.Name & vbtab & itmRes.TypeName & vbcrlf
strState = ""
Next
strfileoutput = strfileoutput & vbcrlf
Next
'output
strfileoutput = strMasterState & " " & "  MS Cluster Services   " & Now & vbtab & "[" & strComputerName & "]" & vbcrlf & strFileOutput
' Output
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(strExtpath & "\" & strBBFileName, 8 , TRUE)
f.Write strFileOutput
f.Close
set fso = Nothing
set f = Nothing
set objclus = Nothing
wscript.quit
===End ====

Let me know if this is what you looking for....
Kind regards,
DNS




----- Original Message ----
From: "Lennon, Padraig" <Padraig.Lennon at pioneerinvestments.com>
To: hobbit at hswn.dk
Sent: Tuesday, October 14, 2008 6:11:26 PM
Subject: RE: [hobbit] Bbwin cluster.exe

Could you repost the vbs? I can't locate it.. Or even send me on a link to the previous mail you sent?

Thanks


Padraig Lennon
Senior Systems Engineer
Production Services
Pioneer Global Investments (Dublin)
5th Floor Georges Quay Plaza, Dublin 2
ext: 2081
Direct dial: 00353 1 480 2081

-----Original Message-----
From: DNS [mailto:dns1407 at yahoo.com] 
Sent: 14 October 2008 12:20
To: hobbit at hswn.dk
Subject: Re: [hobbit] Bbwin cluster.exe

Don't use Cluster.exe, because this give you very little information..use vbsscript that i send a while ago.... 



----- Original Message ----
From: "Everett, Vernon" <Vernon.Everett at woodside.com.au>
To: "hobbit at hswn.dk" <hobbit at hswn.dk>
Sent: Tuesday, October 14, 2008 10:58:27 AM
Subject: [hobbit] Bbwin cluster.exe

Hi all

I know this is a bbwin question, but the bbwin list appears to have died a horrible death, and our Windoze admin has asked me to help.

--- start Windoze Admin mail ---

Windows 2003 R2 SP2 x64 - bbwin external 'cluster.exe' GetVersionExW failed on this system. Error 122 This version of Windows is not supported for Windows Clustering.

I've searched the lists but haven't been able to reference the BBWin external as in our configuration.

Full unattended install (msiexec.exe /i BBWin_0.11.msi ADDLOCAL=ALL /qb-) so all externals are installed

I've tried to run the below connected via RDP, via RDP using console switch (mstsc /console /v:<servername>) and via ILO console (this is remote management for HP servers)

<servername> C:\Program Files (x86)\BBWin\ext>cluster.exe
GetVersionExW failed on this system. Error 122
This version of Windows is not supported for Windows Clustering.
<servername> C:\Program Files (x86)\BBWin\ext>

The file information for cluster.exe;
File version 0.11.0.38
Build 38
Date 2007/12/27 18:09:33

Please note that BBWin 0.12 includes the same cluster.exe file and does produce the same error message

Microsoft Windows Server 2003 R2, Enterprise x64 Edition Service Pack 2 (build 3790)

Any assistance or pointers would be very much appreciated! (and of course if any additional information is required, please also let me know)

Thanks Lee

--- end Windows Admin mail ---

Has anybody seen this before?

Thanks
    Vernon

NOTICE: This email and any attachments are confidential. 
They may contain legally privileged information or 
copyright material. You must not read, copy, use or 
disclose them without authorisation. If you are not an 
intended recipient, please contact us at once by return 
email and then delete both messages and all attachments.


To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk


      

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk



To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk



      



More information about the Xymon mailing list