[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [hobbit] MS SQL Monitoring on Windows 2003 64-bit
- To: <hobbit (at) hswn.dk>
- Subject: RE: [hobbit] MS SQL Monitoring on Windows 2003 64-bit
- From: "Gillis Bart" <Bart.Gillis (at) cegeka.be>
- Date: Fri, 26 Mar 2010 16:47:13 +0100
- References: <3b3b4f141003220525k8a3b1del23ea569619b85a66 (at) mail.gmail.com> <EBDBC7B4393B6C4F9DDADE295309C9F201CFF50B18 (at) EX1.nibco.com> <3b3b4f141003220850u69d78202m401554fc25f881fc (at) mail.gmail.com> <961092e11003221000x732ac832rcf05424706a1c49e (at) mail.gmail.com> <9583BE62E9201646A6D5E8B9D3E27B880107E975 (at) sv-int-mail1.cegekanv.corp.local> <ac336e5893d4690e5862ed7978f06c2a (at) localhost> <d6b65a271003260158l56e74219td42db0d564afda0c (at) mail.gmail.com>
- Thread-index: AcrMwwOglOL67TDVTYucsJ2bKmZFQwAOBFDA
- Thread-topic: [hobbit] MS SQL Monitoring on Windows 2003 64-bit
Richard,
Thank you for these tips.
I'm not a very good scripter,
any help is welcome.
Best regards
Bart
-----Original Message-----
From: Richard Finegold [mailto:goldfndr (at) gmail.com]
Sent: vrijdag 26 maart 2010 9:59
To: hobbit (at) hswn.dk
Subject: Re: [hobbit] MS SQL Monitoring on Windows 2003 64-bit
On Fri, Mar 26, 2010 at 00:55, doctor (at) makelofine.org
<doctor (at) makelofine.org> wrote:
> On Thu, 25 Mar 2010 11:38:07 +0100, "Gillis Bart"
<Bart.Gillis (at) cegeka.be>
> wrote:
>> Hi,
>>
>> I've adapter the bbsql-server script from deadcat.net so that it is
>> working with the BBWin agent.
[snip]
>> I still have to implement some alerting on those statistics but the
> script
>> works fine on MSSQL 2000 and up.
>> It works on both 32 and 64 bit architecture.
>>
>> I will paste it on xymonton
Ah, I should probably send this publicly...
There was an error when I ran this. Each server I've run this on claim
to have no jobs, so the file for CheckJobStats was never created.
The following code, around line 122, "fixes" it. You can see that it
only opens the file if it exists, then deletes immediately after
reading instead of after the variable assignment. It could be
simplified by always setting tmpStr to No Job History, then replace it
with f.ReadAll as needed.
There are a few other minor improvements that could be made (e.g.
change <td> to <th> in table head; maybe remove <br> from within
tables since it doesn't seem to serve any purpose).
Loop
if fso.FileExists(strFilePath & "\" & tempfilename) then
Set f = fso.OpenTextFile(strFilePath & "\" & tempfilename ,1 )
If Not f.AtEndOfLine Then
tmpStr = f.ReadAll
Else
tmpStr = " No Job History. " &
vbcrlf
End If
f.Close
fso.DeleteFile strFilePath & "\" & tempfilename
else
tmpStr = " No Job History. " & vbcrlf
end if
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk